Derivative of x sin x
The derivative of x sin x is sin x + x cos x. The first term comes from differentiating x, and the second from differentiating sin x.
How to find the derivative of x sin x
Method: product rule.
- 1Use the product rule, with f = x and g = sin x.
- 2f′ = 1 and g′ = cos x.
- 3So the derivative is 1 · sin x + x · cos x.
- 4That is sin x + x cos x.
What it means on the graph
x sin x oscillates between the lines y = x and y = −x, growing as it goes. The x cos x term dominates for large x, making the slopes steeper and steeper.
In the window shown, the derivative is zero at x = −7.97867, x = −4.91318, x = −2.02876, x = 0, x = 2.02876, x = 4.91318, x = 7.97867. Those are the points where the graph of x sin x has a horizontal tangent.
Table of values
The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.
| x | x sin x | sin x + x cos x | Slope, measured |
|---|---|---|---|
| −π | 0 | π | π |
| −π/2 | π/2 | −1 | −1 |
| 0 | 0 | 0 | 0 |
| π/2 | π/2 | 1 | 1 |
| π | 0 | −π | −π |
Second derivative
Differentiating once more gives:
The second derivative tells you which way the graph bends: positive means it curves upward, and negative means it curves downward.
Common mistakes
- Writing cos x alone, which forgets the product rule.
Frequently asked questions
What is the derivative of x sin x?
What is the second derivative of x sin x?
Keep going
Type your own function into the derivative calculator and see every rule applied, step by step.