Properties of the x sin(x) functionΒΆ
Problem
The graph of the function \(f:x\mapsto x\cdot\sin x\) defined in \(\mathbb{R}\) passes through the origin. Determine \(f''(0)\) and describe how the graph of \(f\) is bent close to the origin.
Solution
The first derivative of \(f(x)\) is given by:
\[\frac{\mathrm{d}}{\mathrm{d}x}\left(x \cdot \sin x\right) = \sin x + x \cdot \cos x\]
Taking another derivative, one finds:
\[\begin{split}f''(x) &= \frac{\mathrm{d}^2}{\mathrm{d}x^2} x \cdot \sin x\\
& = \frac{\mathrm{d}}{\mathrm{d}x} \left( \sin x + x \cdot \cos x \right)\\
&= \cos x + \cos x + x \cdot (-\sin x)\\
& = 2 \cdot \cos x - x \cdot \sin x\end{split}\]
For \(x=0\) one obtains \(f''(0) = 2 \cdot \cos 0 - 0 \cdot \sin 0 = 2\).
This result can be verified by means of Sage:
A positive second derivative indicates that the function bends to the left as is the case for \(f\) at \(x=0\).
This behavior can also be seen by plotting the function graph.