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

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

Step-by-step solution

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

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

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

Step 1 — Power Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}\left(u^{c}\right)=c\,u^{c-1}\,u'$$
With:
  • $u = \sin\left(3\,x\right)$
  • $c = 2$

Why: Differentiate the outer power: bring down the exponent and subtract one from it. The chain rule adds the derivative of the entire inner expression as another factor.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\sin\left(3\,x\right)^{2}\right]}\,}}}$$
✨ After: Power Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2\,\sin\left(3\,x\right)^{2 - 1}\,\frac{d}{dx}{\left[\sin\left(3\,x\right)\right]}\,}}}$$
Step 2 — 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\,\sin\left(3\,x\right)^{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2 - 1\,}}}}\,\frac{d}{dx}{\left[\sin\left(3\,x\right)\right]}$$
✨ After: Evaluate numbers
$$2\,\sin\left(3\,x\right)^{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}}\,\frac{d}{dx}{\left[\sin\left(3\,x\right)\right]}$$
Step 3 — Power with exponent one Simplification
📖 Rule
$$a^1=a$$

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

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

Why: Differentiate the outer function while keeping its inner argument u. Multiply by u' and evaluate that inner derivative in its own step.

Changed part: $\frac{d}{dx}{\left[\sin\left(3\,x\right)\right]} \;\Longrightarrow\; \cos\left(3\,x\right)\,\frac{d}{dx}{\left[3\,x\right]}$
🧮 Current expression
$$2\,\sin\left(3\,x\right)\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\sin\left(3\,x\right)\right]}\,}}}$$
✨ After: Derivative of Sine (Chain Rule)
$$2\,\sin\left(3\,x\right)\,\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\cos\left(3\,x\right)\,\frac{d}{dx}{\left[3\,x\right]}\,}}}$$
Step 5 — Constant Factor Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(c\,u)=c\,u'$$
With:
  • $c = 3$
  • $u = x$

Why: Keep the constant multiplier outside the derivative. Next, differentiate only the part depending on x.

Changed part: $\frac{d}{dx}{\left[3\,x\right]} \;\Longrightarrow\; 3\,\frac{d}{dx}{\left[x\right]}$
🧮 Current expression
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right)\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[3\,x\right]}\,}}}$$
✨ After: Constant Factor Rule
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,\frac{d}{dx}{\left[x\right]}\,}}}$$
Step 6 — Derivative of a Variable Differentiation rule
📖 Rule
$$\frac{d}{dx}(x)=1$$

Why: When x increases by one, the value of this term also increases by one. Its derivative is therefore one.

Changed part: $\frac{d}{dx}{\left[x\right]} \;\Longrightarrow\; 1$
🧮 Current expression
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot 3\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x\right]}\,}}}$$
✨ After: Derivative of a Variable
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot 3 \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}$$
Step 7 — Remove a factor of one Simplification
📖 Rule
$$1\cdot a=a,\quad \frac{a}{1}=a$$

Why: Multiplication or division by one leaves the value unchanged.

Changed part: $3 \cdot 1 \;\Longrightarrow\; 3$
🧮 Current expression
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot \bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3 \cdot 1\,}}}$$
✨ After: Remove a factor of one
$$2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,}}}$$
Step 8 — Combine numeric factors Simplification
📖 Rule
$$a\cdot u\cdot b=(a\cdot b)\cdot u$$

Why: Multiply the numeric factors together and write the result first. The other factors stay unchanged. If the product is 1, the factor disappears entirely.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2\,\sin\left(3\,x\right)\,\cos\left(3\,x\right) \cdot 3\,}}}$$
✨ After: Combine numeric factors
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,6\,\sin\left(3\,x\right)\,\cos\left(3\,x\right)\,}}}$$
Final result
$$6\,\sin\left(3\,x\right)\,\cos\left(3\,x\right)$$
Copy link to this solution
Cross-check with a computer algebra system

The derivative computed directly by the computer algebra system Maxima:

$$6\,\cos\left(3\,x\right)\,\sin\left(3\,x\right)$$

Step-by-step result ↔ Maxima: identical ✓