Home›
Derivatives›
Chain Rule with Trig Functions — 10 Worked Example
🟡 Derivatives
Chain Rule with Trig Functions — 10 Worked Examples
The chain rule handles composite trig functions like sin(3x), cos(x²), and tan(eˣ). Here are 10 examples going from easy to hard.
AM
Dr. Aisha Malik
April 2026 · 10 min read
10 min read
✓ Reviewed April 2026
Every trig derivative you know — d/dx[sin x] = cos x, d/dx[cos x] = −sin x, and so on — has a chain rule version. When the argument is not plain x but some function g(x), the trig derivative just picks up a multiplicative factor of g'(x). That's all the chain rule adds here.
Quick Review: Chain Rule
The chain rule says: if y = f(g(x)), then dy/dx = f'(g(x)) · g'(x). For trig functions, the outer derivative is the trig derivative, and you always multiply by the derivative of the inner function.
d/dx[sin(u)] = cos(u) · u'
d/dx[cos(u)] = −sin(u) · u'
d/dx[tan(u)] = sec²(u) · u'
Example 1 — sin(3x)
📋 Differentiate y = sin(3x)
Outersin(u) → cos(u), so cos(3x)
Inneru = 3x → u' = 3
Answerdy/dx = 3cos(3x)
Example 2 — cos(x²)
📋 Differentiate y = cos(x²)
Outercos(u) → −sin(u), so −sin(x²)
Inneru = x² → u' = 2x
Answerdy/dx = −2x·sin(x²)
Example 3 — tan(5x³)
📋 Differentiate y = tan(5x³)
Outertan(u) → sec²(u), so sec²(5x³)
Inneru = 5x³ → u' = 15x²
Answerdy/dx = 15x²·sec²(5x³)
Example 4 — sin²(x)
This is sin(x) raised to the power 2 — the outer function is a power, not a trig function.
📋 Differentiate y = sin²(x) = [sin(x)]²
Outeru² → 2u, so 2·sin(x)
Inneru = sin(x) → u' = cos(x)
Answerdy/dx = 2sin(x)cos(x) = sin(2x)
Example 5 — cos³(2x)
📋 Differentiate y = cos³(2x) = [cos(2x)]³
Step 1Outer power: 3[cos(2x)]² · d/dx[cos(2x)]
Step 2d/dx[cos(2x)] = −sin(2x) · 2 = −2sin(2x)
Answerdy/dx = −6cos²(2x)·sin(2x)
Example 6 — sin(eˣ)
📋 Differentiate y = sin(eˣ)
Outersin(u) → cos(u) = cos(eˣ)
Innereˣ → eˣ
Answerdy/dx = eˣ·cos(eˣ)
Example 7 — e^sin(x)
📋 Differentiate y = e^sin(x)
Outereᵘ → eᵘ = e^sin(x)
Innersin(x) → cos(x)
Answerdy/dx = cos(x)·e^sin(x)
Example 8 — tan(ln x)
📋 Differentiate y = tan(ln x)
Outertan(u) → sec²(u) = sec²(ln x)
Innerln x → 1/x
Answerdy/dx = sec²(ln x) / x
Example 9 — sin(cos(x)) — Double Chain Rule
📋 Differentiate y = sin(cos(x))
Outersin(u) → cos(u) = cos(cos(x))
Innercos(x) → −sin(x)
Answerdy/dx = −sin(x)·cos(cos(x))
Example 10 — √(sin(3x))
📋 Differentiate y = √(sin(3x)) = [sin(3x)]^(1/2)
Step 1Power: ½[sin(3x)]^(−½) · d/dx[sin(3x)]
Step 2d/dx[sin(3x)] = 3cos(3x)
Answerdy/dx = 3cos(3x) / (2√(sin(3x)))
Common Mistakes
⚠ Most Common Errors
Forgetting to multiply by the inner derivative. The most frequent mistake: writing d/dx[sin(3x)] = cos(3x) instead of 3cos(3x). Always ask: "what is inside the trig function, and what is its derivative?"
Frequently Asked Questions
What are the derivatives of all six trig functions?▾
d/dx[sin x]=cos x, d/dx[cos x]=−sin x, d/dx[tan x]=sec²x, d/dx[cot x]=−csc²x, d/dx[sec x]=sec x·tan x, d/dx[csc x]=−csc x·cot x. With the chain rule, multiply each by the derivative of the inner function.
How do I handle trig functions raised to powers?▾
sin²(x) means [sin(x)]² — the outer function is the square, the inner function is sin(x). Apply the power rule first, then multiply by the derivative of sin(x). You need the chain rule twice for something like sin²(3x).
When do I need the chain rule twice?▾
When there are three nested layers — like sin²(3x) = [sin(3x)]². You differentiate the outermost layer first, then work inward. Each layer requires one application of the chain rule.
All Six Trig Functions with Chain Rule
Here are the chain rule templates for all six standard trig functions. In each case u = g(x) is the inner function:
d/dx[sin(u)] = cos(u) · u'
d/dx[cos(u)] = −sin(u) · u'
d/dx[tan(u)] = sec²(u) · u'
d/dx[cot(u)] = −csc²(u) · u'
d/dx[sec(u)] = sec(u)tan(u) · u'
d/dx[csc(u)] = −csc(u)cot(u) · u'
Examples with sec and csc
📋 Less common but important
d/dx[sec(2x)]= sec(2x)tan(2x) · 2 = 2sec(2x)tan(2x)
d/dx[csc(x³)]= −csc(x³)cot(x³) · 3x² = −3x²csc(x³)cot(x³)
d/dx[tan²(x)]= 2tan(x) · sec²(x)
When Product and Chain Rules Both Apply
📋 d/dx[x²·sin(3x)]
Product rule= d/dx[x²]·sin(3x) + x²·d/dx[sin(3x)]
Chain rule on sin(3x)= 2x·sin(3x) + x²·cos(3x)·3
Answer= 2x·sin(3x) + 3x²·cos(3x)
📋 d/dx[sin(x)/eˣ]
Quotient rule= [cos(x)·eˣ − sin(x)·eˣ] / e²ˣ
Simplify= (cos x − sin x) / eˣ
Inverse Trig — Chain Rule Too
d/dx[arcsin(u)] = u' / √(1−u²)
d/dx[arctan(u)] = u' / (1+u²)
d/dx[arccos(u)] = −u' / √(1−u²)
📋 Inverse trig with chain rule
d/dx[arctan(3x)]= 3/(1+9x²)
d/dx[arcsin(x²)]= 2x/√(1−x⁴)
AM
Dr. Aisha Malik, PhD Mathematics
Senior Lecturer in Applied Mathematics · 12 years teaching calculus
Dr. Malik holds a PhD in Applied Mathematics from the University of Edinburgh and has taught calculus to over 4,000 students. She has reviewed this article for mathematical accuracy and pedagogical clarity.
Technically reviewed by: Prof. James Chen, Stanford Mathematics Department · April 2026