Consider the function $ f(x)=\begin{cases} 2x^3-3x^2-12x+9 , & x \leq 3 \\ 9x-x^2-18 , & x>3 \end{cases} $
over the interval $ \ [-2,5]\ $
Then determine the relative and absolute extrema . Also find the interval where $ \ f(x) \ $ is increasing or decreasing .
Answer:
The given function is continuous at $ \ x=3 \ $
At first we have to find the derivative of $ f(x) \ $ to calculate the critical points.
Now,
$ f'(x)=\begin{cases} 6x^2-6x-12 , & x \leq 3 \\ 9-2x, & x >3 \end{cases} \ $
Now $ f'(x)=0 \ \Rightarrow 6x^2-6x-12= 0 , \ \ x \leq 3 \tag 1$
Also $ f'(x)=0 \ \Rightarrow 9-2x= 0 , \ \ x > 3 \tag 2$
From $ (1) \ $, we get
\begin{align} & 6x^2-6x-12=0 \\ \Rightarrow & x^2-x-2=0 \\ \Rightarrow & x^2-2x+x-2=0 \\ \Rightarrow & x=2, \ -1 \end{align}
From $ (2) \ $, we get
$$ 9-2x=0 \\ \Rightarrow x=\frac{9}{2} \ $$
Thus $ x=-1, \ 2 , \ \frac{9}{2} \ $ gives the extreme points.
Am I right so far ?
If right , then how to find the relative and absolute extrema?
As shown below, having graphed the function, your critical points are OK:
$ x=-1, \ 2 , \ \frac{9}{2} \ $ are the relative/local extreme points. The absolute ones are at $-1$ and $2$.