Solution to the example above: The
denominator is always positive (its roots are complex), so the
function is continuous everywhere and the Extreme Value Theorem
applies. Using the quotient rule, the derivative works out to
$$f'(x) = \frac{2(-x^2 +2)}{(x^2-2x+2)^2}.$$ The critical
values are at $x = \pm \sqrt2$. However, only the critical value
$x=\sqrt2$ is in our interval. So the three points we need to
consider are the endpoints $x=0$ and $x=3$, and the critical
point $x=\sqrt2$.
Since \begin{eqnarray*} f(0) & = & 0, \cr f(\sqrt2)
& = & 1+\sqrt2, \cr f(3) & = & 6/5,
\end{eqnarray*} the largest value is $1+\sqrt2$, which is the
absolute maximum (achieved at $x=\sqrt2$).