# Thread: calculate smallest and highest value of the function

1. ## calculate smallest and highest value of the function

calculate smallest and highest value of the function $y=x^3-2x*|x-2|$ on segment [0,3]

2. You check the values of the function at the endpoints, that is at the points $x=0$ & $x=3$.
Now, since your function is not differentiable at $x=2$, you cannot use the derivative at $x=2$.

So if you limit yourself to $(0,2)$ and $(2,3)$ when performing you differentiate and look for max/min, and check the function value at $x=2$.

Now you compare all the values you have. That is, you have your endpoint values, your value at $x=2$, and possibly some values at local max/min which you may have found during the differentiation.

3. Originally Posted by ecnanif
You check the values of the function at the endpoints, that is at the points $x=0$ & $x=3$.
Now, since your function is not differentiable at $x=2$, you cannot use the derivative at $x=2$.

So if you limit yourself to $(0,2)$ and $(2,3)$ when performing you differentiate and look for max/min, and check the function value at $x=2$.

Now you compare all the values you have. That is, you have your endpoint values, your value at $x=2$, and possibly some values at local max/min which you may have found during the differentiation.
Differentiating is not an option, this is not a calculus problem.

CB

4. Originally Posted by Garas
calculate smallest and highest value of the function $y=x^3-2x*|x-2|$ on segment [0,3]
If x< 2, x-2< 0 so |x-2|= -(x-2)= 2- x. Then $y= x^3- 2x(2- x)= x^3+ 2x^2- 4x= x(x^2+ 2x- 4)$. You can complete the square to determine where $x^2+ 2x- 4$ has max or min.

If x> 2, x-2> 0 so |x-2|= x- 2. Then $y= x^3-2x(x-2)= x^3- 2x^2+ 4x= x(x^2- 2x+ 4)$. Again, try completing the square in $x^2- 2x+ 4$.