I have the function $$g(x)=|x^2-x-2|$$ which is defined on $$-\frac{3}{2}\leq x\leq \frac{3}{2}$$
I am struggeling with that g(x) has absolute values wrapped around. I taught that I just draw the graph and flip the negative values upwards but that seems not to work.
I started by finding the roots, $x_1=2, x_2=-1$ and then I taught that because this is a second order function, the max (or min) should be either in one of the limit points or at $\frac{1}{2}$ because it is just between the roots.
I cant get it right, I think that the abs value confuses me, how do I handle them?
Your function is defined on the interval [-3/2;3/2], so if you want to handle the absolute value you can consider the interval on which it is positive and the one where it is negative.
The polynome is negative between the roots, so on [-1;3/2] your function is $g_1(x)=x^2-x-2$ and it is then positive outside so on [-3/2;-1] your function is $g_2(x)=-x^2+x+2$.
And then you can study min and max of this piecewise function.