I have a question regarding differentiation when looking for extremas. I usualy set to find the stationary points (c for which f'(c)= 0) but if my function has absolute values.
I.e my function f(x) = x|x-2| for x in [-1,3] Since it has absolute values I separate my function into to functions
if x >= 2 $$ fx = x^2-2x $$ if x < 2 $$ fx = 2x-x^2$$
then I look for my stationary points and find only 1 that satisfies f'(-1) = 0 since my derivatives are 2x-2 and 2-2x and since f''(1) < 0 (-2) so at 1, I have a local MAX f(1)= 1 then I
- check my boundaries f(-1) = -3 -> absolute min and f(3)= 1 -> maximum?
- check my points where f'(x) does not exist but here I have none?
OR is there like a rule where you have to check for the value of x for which what's inside the absolute value = 0. (for instance x=2 here)? I think I have to check that to since it would mean that it is an undifferentiable value of my function but I do not understand why it is so? f(2) would equal 0 which would be
You have to check all points where the derivative fails to exist along with points where the derivative is zero and the ends of the interval. In your case the derivative fails to exist at $x=2$ To check this, check the derivative at $2^+$ and $2^-$. If they do not agree, the derivative fails to exist. Here they are $+2$ at $2^+$ and $-2$ at $2^-$. If you plot the graph (below) you can see the local minimum at $x=2$.
