Example 2.29. Find the maximum and minimum values of the following functions:

1) $f(x)=x^{3}-3 x^{2}+4$ on the interval $[1,3]$
2) $\phi(x)=x+\frac{1}{x} \quad$ on the interval $[-2,2]$.
Solution.

1. The function $f(x)$ is continuous on the interval $[1,3]$. We find

$$
f^{\prime}(x)=3 x^{2}-6 x
$$

In this case, the critical points are only those where the second derivative $f^{\prime \prime}(x)$ is zero, i.e., $x=0$ and $x=2$. Only one of these critical points, $x=2$, belongs to the interval $[1,3]$. We calculate the values of the function $f(x)$ at the point $x=2$ and at the endpoints of the interval $x=1$ and $x=3$:

$$
f(2)=0, \quad f(1)=2, \quad f(3)=4 .
$$

Thus, the maximum value of the function is 4 and is achieved at the right boundary of the interval at the point $x=3$; the minimum value of the function is zero and is achieved at the internal point $x=2$.

2. The function $\phi(x)$ has a discontinuity at the point $x=0$, which belongs to the interval $[-2,2]$. We investigate the behavior of the function in the neighborhood of the discontinuity:

$$
\lim _{x \rightarrow+0} \phi(x)=+\infty, \lim _{x \rightarrow-0} \phi(x)=-\infty
$$

Therefore, near the point $x=0$, the function $\phi(x)$ achieves arbitrarily large absolute values, both positive and negative, and thus does not have either a minimum or a maximum value.

The investigation of the function is recommended to be carried out according to the following scheme:

1. Find the domain of the function, determine the points of discontinuity and intervals of continuity of the function.
2. Investigate the function for evenness and oddness.
3. Find, if possible, the points of intersection with the coordinate axes. Calculate the limiting values of the function at the boundaries of the domain. Find the asymptotes of the curve, if they exist. After this, a rough sketch of the graph can be made that satisfies the conducted investigation.
4. Refine the graph using the first derivative, i.e., investigate the function for extrema, determine the intervals of monotonicity of the function.
5. Refine the graph using the second derivative, i.e., investigate the function for convexity, concavity, and points of inflection.