# How do you find the absolute maximal and minimal values of f(x)=x^3−6x^2+9x+4 on the interval [−1, 5]?

Mar 15, 2015

First of all, we are sure that the minimal and maximal values exist by Weierstrass theorem, since $f$ is a continuous function over $\left[1 , 5\right]$, which is a compact set.

To answer, let's consider the derivative: since $f$ is a polynomial, its derivative will be very simple to calculate: we'll need to use the linearity (the derivative of a sum is the sum of the derivatives; and if $k$ is a constant, $\left(k f\right) ' = k \cdot f '$), which means that we can derivate one term at the time. As a general rule, we have $\frac{d}{\mathrm{dx}} {x}^{n} = n {x}^{n - 1}$.

This means that the derivative $f '$ equals
$f ' \left(x\right) = 3 {x}^{2} - 12 x + 9$.

Let's study this derivative to find the minimum and maximum of $f$: $f '$ is a parabola, which goes towards $+ \setminus \infty$ if $x \setminus \to \setminus \pm \setminus \infty$. Its zeroes are given by the formula
${x}_{1 , 2} = \frac{- b \setminus \pm \setminus \sqrt{{b}^{2} - 4 a c}}{2 a}$, and are $1$ and $3$. This means that the function is increasing before $x = 1$, decreasing between $x = 1$ and $x = 3$, and then again increasing after $x = 3$. This means that $x = 1$ is a maximum, while $x = 3$ is a minimum.

Here's the graph, to let you visualize them: graph{x^3-6x^2+9x+4 [-8.71, 11.29, -0.74, 9.68]}