§ 01Where We Start From
This page assumes you are comfortable with the chain rule. If you are not, read the Chain Rule page first, it takes about 20 minutes and will make everything here much easier.
The chain rule says: for a composite function y = f(g(x)), the derivative is f′(g(x)) · g′(x). For trig functions, f is one of the six trig functions, and g(x) is whatever sits inside the argument. Once you know f′ for each trig function, the chain rule does the rest automatically.
So this page has one job: tell you what f′ is for each of the six trig functions, and prove it so you can trust it rather than just memorise it. The derivations of d/dx[sin x] and d/dx[cos x] from first principles were already shown on the First Principles page, we build on those results here without repeating them.
§ 02d/dx[sin x] = cos x and d/dx[cos x] = −sin x
These two are the foundation. Every other trig derivative follows from them using the quotient rule or the chain rule.
From first principles (derived in full on the First Principles page):
d/dx [cos x] = −sin x
The minus sign on the cosine derivative is not arbitrary, it comes directly from the minus sign in the compound angle formula for cos(x + h). If you find yourself forgetting which one is negative, remember: the derivative of sin is "moving towards cos", and then cos has a minus sign because the cosine graph is heading downward at x = 0 while the sine graph is heading upward.
An important sign pattern
Differentiating sin four times cycles back to sin:
This cycle is worth memorising. It means d⁴/dx⁴[sin x] = sin x: differentiating four times returns to the original function. You will encounter this in differential equations.
§ 03d/dx[tan x] = sec²x — Derived from sin and cos
We do not need to go back to first principles for tan x. We write tan x = sin x / cos x and apply the quotient rule: using only the two results we already have.
Write tan x as a quotient:
tan x = sin x / cos xApply the quotient rule. Let u = sin x (top) and v = cos x (bottom). Then u′ = cos x and v′ = −sin x:
d/dx[tan x] = (u′v − uv′) / v² = (cos x · cos x − sin x · (−sin x)) / cos²xExpand and simplify the numerator:
= (cos²x + sin²x) / cos²xUse the Pythagorean identity sin²x + cos²x = 1:
= 1 / cos²x = sec²x sec x is defined as 1/cos x, so 1/cos²x = sec²x by definition.§ 04The Other Three — sec x, cosec x, cot x
The remaining three functions are all defined as reciprocals of sin, cos, or tan. Write them that way and the quotient rule or chain rule gives their derivatives cleanly.
d/dx[sec x] = sec x tan x
Write sec x = 1 / cos x = (cos x)^(−1). Apply the chain rule:
d/dx[(cos x)^(−1)] = (−1)(cos x)^(−2) · (−sin x)The two minus signs cancel. Simplify:
= sin x / cos²x = (1/cos x) · (sin x / cos x) = sec x · tan xd/dx[cosec x] = −cosec x cot x
Write cosec x = (sin x)^(−1). Chain rule:
d/dx[(sin x)^(−1)] = (−1)(sin x)^(−2) · cos xSimplify:
= −cos x / sin²x = −(1/sin x) · (cos x/sin x) = −cosec x · cot xd/dx[cot x] = −cosec²x
Write cot x = cos x / sin x. Quotient rule with u = cos x, v = sin x:
= (−sin x · sin x − cos x · cos x) / sin²x = −(sin²x + cos²x) / sin²x = −1/sin²x = −cosec²x§ 05Complete Reference Table — with Chain Rule Forms
This is your one-stop reference. The chain rule column is the form you will use in 90% of problems: it shows what happens when anything other than a bare x sits inside the trig function.
| f(x) | f′(x) | Chain rule: d/dx [f(g(x))] | Note |
|---|---|---|---|
| sin x | cos x | g′(x) · cos(g(x)) | Positive |
| cos x | −sin x | −g′(x) · sin(g(x)) | Negative |
| tan x | sec²x | g′(x) · sec²(g(x)) | From quotient rule on sin/cos |
| sec x | sec x tan x | g′(x) · sec(g(x)) · tan(g(x)) | Both factors keep same argument |
| cosec x | −cosec x cot x | −g′(x) · cosec(g(x)) · cot(g(x)) | Negative; the cosec of sec |
| cot x | −cosec²x | −g′(x) · cosec²(g(x)) | Mirrors tan → sec²; cot → −cosec² |
§ 06Twelve Worked Exercises
Exercises are grouped by function type so you build fluency with each derivative before combining them. Work each problem before revealing the solution.
Group A — sin and cos with the Chain Rule (Exercises 1–4)
- Outer: sin(□) → derivative cos(□). Inner: 5x → derivative 5.
- Chain rule: outer derivative (inner untouched) × inner derivative: dy/dx = cos(5x) · 5 = 5 cos(5x)
- Outer: cos(□) → derivative −sin(□). Inner: x²+1 → derivative 2x.
- Chain rule: dy/dx = −sin(x²+1) · 2x = −2x sin(x²+1)
- Write y = 3(sin x)². Outer: (□)² → 2(□). Inner: sin x → cos x.
- Chain rule (constant 3 stays): dy/dx = 3 · 2 sin x · cos x = 6 sin x cos x
- Apply double angle identity 2 sin x cos x = sin(2x): dy/dx = 3 sin(2x)
- Method 1, Double angle first: sin(3x)cos(3x) = (1/2)sin(6x). dy/dx = (1/2) · cos(6x) · 6 = 3 cos(6x)
- Method 2, Product rule (to verify): u = sin(3x), u′ = 3cos(3x); v = cos(3x), v′ = −3sin(3x): dy/dx = 3cos(3x)·cos(3x) + sin(3x)·(−3sin(3x)) = 3cos²(3x) − 3sin²(3x) = 3(cos²(3x)−sin²(3x)) = 3cos(6x)
- Both methods agree: dy/dx = 3 cos(6x)
Group B — tan, sec, cosec and cot (Exercises 5–8)
- Outer: tan(□) → sec²(□). Inner: 2x → 2.
- Chain rule: dy/dx = sec²(2x) · 2 = 2 sec²(2x)
- Outer: sec(□) → sec(□)tan(□). Both the sec and the tan keep the same inner argument untouched. Inner: x² → 2x.
- Chain rule: dy/dx = sec(x²) tan(x²) · 2x = 2x sec(x²) tan(x²)
- Outer: cot(□) → −cosec²(□). Inner: 3x+1 → 3.
- Chain rule: dy/dx = −cosec²(3x+1) · 3 = −3 cosec²(3x+1)
- Outer: cosec(□) → −cosec(□)cot(□). Inner: eˣ → eˣ.
- Chain rule: dy/dx = −cosec(eˣ) cot(eˣ) · eˣ = −eˣ cosec(eˣ) cot(eˣ)
Group C — Combined Rules (Exercises 9–12)
- Product rule: u = x (u′ = 1), v = tan x (v′ = sec²x).
- dy/dx = u′v + uv′: = 1 · tan x + x · sec²x dy/dx = tan x + x sec²x
- Quotient rule: u = sin x, v = 1+cos x, u′ = cos x, v′ = −sin x.
- dy/dx = (u′v − uv′) / v²: = [cos x(1+cos x) − sin x(−sin x)] / (1+cos x)² = [cos x + cos²x + sin²x] / (1+cos x)²
- Use sin²x + cos²x = 1 in the numerator: = [cos x + 1] / (1+cos x)² = (1+cos x) / (1+cos x)²
- Cancel (1+cos x): dy/dx = 1 / (1 + cos x)
- Product rule: u = eˣ (u′ = eˣ), v = sin²x.
- Find v′ using chain rule on sin²x = (sin x)²: v′ = 2 sin x · cos x = sin(2x)
- Apply product rule: dy/dx = eˣ · sin²x + eˣ · sin(2x)
- Factorise eˣ: dy/dx = eˣ [sin²x + sin(2x)]
- Write y = (tan(3x))². Outer: (□)² → 2(□). Leave tan(3x) untouched: 2 tan(3x).
- Now differentiate tan(3x) via chain rule. Outer tan(□) → sec²(□). Inner 3x → 3: d/dx [tan(3x)] = sec²(3x) · 3 = 3 sec²(3x)
- Multiply everything together: dy/dx = 2 tan(3x) · 3 sec²(3x) dy/dx = 6 tan(3x) sec²(3x)
§ 07Common Mistakes
These errors appear most frequently when trig derivatives are examined. They are all easy to avoid once you know what to watch for.
Wrong: d/dx[cos x] = sin x
Correct: d/dx[cos x] = −sin x. The three "co-" functions (cosine, cosecant, cotangent) all have a minus sign. Sine, tangent, and secant do not.
Wrong: d/dx[sin(3x)] = cos(3x)
Correct: d/dx[sin(3x)] = 3 cos(3x). Whenever the argument is anything other than a bare x, multiply by the inner derivative. Missing this factor is the single most common trig differentiation error.
sec²x is the derivative of tan x only. The derivatives of sin x and cos x stay in the sin/cos family, cos x and −sin x respectively. sec² has nothing to do with sin or cos directly.
Both appear frequently and look similar. The memory trick: tan comes before sec in the alphabet, and tan → sec². sec comes after, and sec → sec·tan (it needs its neighbour).
For expressions like sin x cos x or sin²x, it is almost always faster to simplify using the double-angle identities before differentiating, rather than applying the product rule or chain rule to the unmodified expression.
sin x cos x = (1/2) sin(2x) → differentiates immediately to cos(2x).
sin²x = (1/2)(1 − cos(2x)) → differentiates to sin(2x).
§ 0810-Question Quiz
Select one answer per question then press Submit.