Answer
$(-1,5)$ and $(1,1)$ and $(3,5)$ are the critical points of $y$.
At $x=-1$ and $x=3$, function $y$ has the absolute and local maximum value of $5$, and at $x=1$, it has the local minimum value of $1$. There is no absolute minimum value.
Work Step by Step
$y=-x^2-2x+4$ for $x\le1$ and $y=-x^2+6x-4$ for $x\gt1$
- Domain: $R$. Therefore, there is no endpoint.
1) Find the derivative of function $y$:
- For $x\le1$: $y'=-2x-2$
We have $y'=0$ when $-2x-2=0$, or $x=-1$. So there is a critical point at $x=-1$.
- For $x\gt1$: $y'=-2x+6$
We have $y'=0$ when $-2x+6=0$, or $x=3$. So there is another critical point at $x=3$.
- Also, we need to check whether $y'$ is defined at $x=1$ or not. To do so, let's check the graph of function $y$ below.
The curve of $y$ at $x=1$ is not smooth enough for $y$ to be differentiable there. So $y'$ is undefined at $x=1$. That means there is one more critical point at $x=1$.
2) Evaluate $y$ at the critical points:
- For $x=-1$, we would use the function $y=-x^2-2x+4$.
$$y=-(-1)^2-2(-1)+4=-1+2+4=5$$
- For $x=1$, we would use the function $y=-x^2-2x+4$.
$$y=-(1)^2-2\times1+4=-1-2+4=1$$
- For $x=3$, we would use the function $y=-x^2+6x-4$.
$$y=-3^2+6\times3-4=-9+18-4=5$$
So $(-1,5)$ and $(1,1)$ and $(3,5)$ are the critical points of $y$.
Now look at the graph of $y$.
At $x=-1$ and $x=3$, function $y$ has the absolute and local maximum value of $5$, and at $x=1$, it has the local minimum value of $1$. There is no absolute minimum value.