Derivative of $x^{2}\,\sin\left(x\right)$

Differentiated with respect to x. Edit the function · Differentiation rules

Step-by-step solution

Input function
$$x^{2}\,\sin\left(x\right)$$

Start of the differentiation
$$\frac{d}{dx}{\left[x^{2}\,\sin\left(x\right)\right]}$$

Yellow: the expression being replaced. Green: its replacement.

Step 1 — Product Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(u \cdot v)=u'v+uv'$$
With:
  • $u = x^{2}$
  • $v = \sin\left(x\right)$

Why: First, differentiate the first factor and multiply by the unchanged second factor. Add the unchanged first factor times the derivative of the second. Do not simply multiply the two derivatives.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{2}\,\sin\left(x\right)\right]}\,}}}$$
✨ After: Product Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{2}\right]}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}\,}}}$$
Step 2 — Power Rule (special case) Differentiation rule
📖 Rule
$$\frac{d}{dx}\left(u^{c}\right)=c\,u^{c-1}$$
With:
  • $u = x$
  • $c = 2$

Why: Bring the current exponent down as a multiplier and subtract one from the exponent. Evaluate that small calculation in a separate step.

Changed part: $\frac{d}{dx}{\left[x^{2}\right]} \;\Longrightarrow\; 2\,x^{2 - 1}$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{2}\right]}\,}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
✨ After: Power Rule (special case)
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2\,x^{2 - 1}\,}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
Step 3 — Evaluate numbers Simplification
📖 Rule

Why: Evaluate only the highlighted numeric expression, preserving exact fractions and decimals.

Changed part: $2 - 1 \;\Longrightarrow\; 1$
🧮 Current expression
$$2\,x^{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2 - 1\,}}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
✨ After: Evaluate numbers
$$2\,x^{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
Step 4 — Power with exponent one Simplification
📖 Rule
$$a^1=a$$

Why: An expression to the first power is the expression itself.

Changed part: $x^{1} \;\Longrightarrow\; x$
🧮 Current expression
$$2\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x^{1}\,}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
✨ After: Power with exponent one
$$2\,\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x\,}}}\,\sin\left(x\right) + x^{2}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}$$
Step 5 — Derivative of Sine Differentiation rule
📖 Rule
$$\frac{d}{dx}\sin\left(x\right)=\cos\left(x\right)$$

Why: The argument is exactly x. Apply the known elementary derivative.

Changed part: $\frac{d}{dx}{\left[\sin\left(x\right)\right]} \;\Longrightarrow\; \cos\left(x\right)$
🧮 Current expression
$$2\,x\,\sin\left(x\right) + x^{2}\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\sin\left(x\right)\right]}\,}}}$$
✨ After: Derivative of Sine
$$2\,x\,\sin\left(x\right) + x^{2}\,\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\cos\left(x\right)\,}}}$$
Final result
$$2\,x\,\sin\left(x\right) + x^{2}\,\cos\left(x\right)$$
Copy link to this solution
Cross-check with a computer algebra system

The derivative computed directly by the computer algebra system Maxima:

$$2\,x\,\sin\left(x\right) + x^{2}\,\cos\left(x\right)$$

Step-by-step result ↔ Maxima: identical ✓