# What are the critical values, if any, of  f(x)= x^2sinx +sinxcos^2x in [0,pi]?

##### 1 Answer
Jul 11, 2018

$x \approx 2.3339$

#### Explanation:

Given: $f \left(x\right) = {x}^{2} \sin x + \sin x {\cos}^{2} x \text{ from } \left[0 , \pi\right]$

One way to find the critical values is to graph and find the maximum using a graphing calculator :

relative max: $\left(2.333931 , 4.2818209\right)$
graph{x^2sin x + sinx( cos x)^2 [-2, 3.14159, -2, 5]}

The second way is to find the first derivative and set it equal to zero and solve for $x$:

Find the first derivative using the product rule: $\left(u v\right) ' = u v ' + v u '$

For the first part of the function let u = x^2; " "u' = 2x, " "v = sinx; " "v' = cos x

$\frac{d}{\mathrm{dx}} \left({x}^{2} \sin x\right) = {x}^{2} \cos x + 2 x \sin x$

Let u = sin x; " "u' = cos x
 v = (cos x)^2; " "v' = 2cos x (-sin x) = -2cos x sin x

$\frac{d}{\mathrm{dx}} \left(\sin x {\cos}^{2} x\right) = \cos x \left(- 2 \cos x \sin x\right) + {\left(\cos x\right)}^{2} \cos x$

$= - 2 {\cos}^{2} x \sin x + {\cos}^{3} x$

$f ' \left(x\right) = {x}^{2} \cos x + 2 x \sin x - 2 {\cos}^{2} x \sin x + {\cos}^{3} x$

Find critical values : $f ' = 0$

$f ' \left(x\right) = {x}^{2} \cos x + 2 x \sin x - 2 {\cos}^{2} x \sin x + {\cos}^{3} x = 0$

This is a difficult problem. The easiest way to solve is to use a graphing calculator to graph the derivative and then solve for the zero ($x$-intercept).

graph{x^2 cos x + 2x sin x -2(cos x)^2 sin x + (cos x)^3 [-2, 3.14159, -2, 5]}

$\text{zero at } x \approx 2.3339$