The graph of the derivative $f'(x)$ of a function $f(x)$ is shown in the figure below. If $g$ is a function defined for all $x$ by $g(x) = \left | 2f(x)+x^2 \right |$ and $f(-3)=-1$, how many local minima does the function $g$ have?
This is what I have done. From the figure, I can draw this table
We have $g(x)=\sqrt{( 2f(x)+x^2 )^2}$ so its derivative is $g'(x)=\frac{2(2f(x)+x^2)(2f'(x)+2x)}{2\sqrt{(2f(x)+x^2)^2}}$. I see that $2f'(-3)+2(-3)=0$ and $2f'(-1)+2(-1)=0$ so $g'(-3)=0$ and $g'(-1)=0$. I believe that there exists an $-3<x_0<-1$ such that $2f'(x_0)+2(x_0)=0$ which implies $g'(x_0)=0$. I'm stuck here, I don't know the sign of $g'(x)$ in any interval.
This is my prediction. We have $g(x)=\left | 2\left [ f\left ( x \right )-\left ( \frac{-x^2}{2} \right ) \right ] \right |$, consider the graph of the function $y=f(x)$ and the function $y=\frac{-x^2}{2}$. From the table above, I think that the graph of the function $y=f(x)$ is always "higher" (I don't know the exact word) than the graph of the function $y=\frac{-x^2}{2}$ for all $x$, which implies $\left [ f\left ( x \right )-\left ( \frac{-x^2}{2} \right ) \right ] >0$ for all $x$, so $g(x) = 2f(x)+x^2$ and its derivative is $g'(x)=2f'(x)+2x=2[f'(x)-(-x)]$. Now from the figure above, draw the graph of the function $y=-x$. We will see that the two graphs have 3 intersection points, which are $(-3,3)$, $(-1,1)$ and $(x_0,-x_0)$ where $-3<x_0<-1$, we notice that $f'(x)-(-x)>0$ for $-3<x<x_0$ (the graph of $y=f'(x)$ is higher) and $f'(x)-(-x)<0$ for $x_0<x<-1$ (the graph of $y=-x$ is higher). I draw this table
I conclude that $g$ has 2 local minima. If my prediction is right please show me how to prove this, or show me another way to finish this exercise. Thank you.



You're correct, but you can do this in a simpler way:
$$g'(x) = 2 \operatorname{sgn}(2 f(x) + x^2) (f'(x) + x)$$ where
$\operatorname{sgn}(x)$ is the sign of $x$.
We want $$g'(x) = 2 \operatorname{sgn}(2 f(x) + x^2) (f'(x) + x) = 0$$
Divide by $2 \operatorname{sgn}(2 f(x) + x^2)$ to get
$$f'(x) + x = 0$$ or equivalently $$x = -f'(x)$$
We can find all the points where $x = -f'(x)$ by looking at where $y = -x$ intersects the graph of $f'(x)$. We see that this occurs at $(-3,3)$, $(-1,1)$, and somewhere in between, and so we know that $g$ has 3 local extrema (not necessarily minima, as you noticed).
And then your logic about $f'(x)$ being "higher" (I don't know what the term would be either, but I understand what you mean) is correct, completing the solution by showing that minima exist at $x=-3$ and $x=-1$.