# What is the local max of f(x) =x sin x?

Mar 18, 2018

$x \approx \pm 8 \mathmr{and} x \approx \pm 2$

For more...
https://www.wolframalpha.com/input/?i=max(xsin(x))

#### Explanation:

A maxima at point $a$ must have $f ' \left(a\right) = 0$ and $f ' ' \left(a\right) < 0$

$f ' \left(x\right) = \textcolor{b l u e}{\sin \left(x\right)} + \textcolor{red}{x \cos \left(x\right)}$
$f ' ' \left(x\right) = \textcolor{b l u e}{\cos \left(x\right)} + \textcolor{red}{\cos \left(x\right) - x \sin \left(x\right)} = 2 \cos \left(x\right) - x \sin \left(x\right)$

If you want to have the derivatives explaint, just write a comment or send a note.

$f ' \left(x\right) = 0 = \sin \left(x\right) + x \cos \left(x\right)$

The following lines can only be calculated by approximation e.g. a calculator.

$x \approx \pm 8$
$f ' ' \left(\pm 8\right) < 0$
This is a max

$x \approx \pm 5$
$f ' ' \left(\pm 5\right) > 0$

$x \approx \pm 2$
$f ' ' \left(\pm 2\right) < 0$
This is a max

$x = 0$
$f ' ' \left(0\right) = 1 > 0$

Checking by drawing the graph
graph{xsin(x) [-20, 20, -20, 20]}