Grade by Grade
A. Rate of Change · Derivatives of Exponential and Sinusoidal Functions

The Derivative of tan x and Other Trigonometric Combinations

A3.5About 70 minutes
Learning goals
  • I can derive d/dx tan x = sec² x using the quotient rule and the Pythagorean identity.
  • I can differentiate products such as x sin x and eˣ cos x and quotients such as (sin x)/x.
  • I can combine the product, quotient and chain rules with sinusoidal and exponential functions.
  • I can use these derivatives to find slopes, tangent lines and horizontal tangents.

Words to know

tan x
sin x ÷ cos x, defined where cos x ≠ 0. Its graph has vertical asymptotes at x = π/2 + nπ.
sec x
The reciprocal 1 ÷ cos x (secant). sec² x means (sec x)².
csc x and cot x
Cosecant 1 ÷ sin x and cotangent cos x ÷ sin x.
Pythagorean identity
sin² x + cos² x = 1 for every x.
damped oscillation
An oscillation whose amplitude shrinks over time, modelled by a product such as e^(−t) sin t.

Building new derivatives from old ones

You now know two trigonometric derivatives: sin x → cos x and cos x → −sin x. Every other trigonometric function is built from these two by dividing, so the quotient rule from Derivatives and Differentiation Rules gives you all the rest. And when trig functions are multiplied by polynomials or exponentials (a key part of expectation A3.5, which covers combinations such as x sin x), the product rule takes over.

Worked example

Example 1: The derivative of tan x

Use tan x = sin x/cos x to find d/dx tan x.

  1. Quotient rule with f = sin x (f′ = cos x) and g = cos x (g′ = −sin x):
  2. d/dx tan x = [cos x × cos x − sin x × (−sin x)] ÷ cos² x = (cos² x + sin² x) ÷ cos² x.
  3. Pythagorean identity: cos² x + sin² x = 1. So the derivative is 1 ÷ cos² x.
  4. 1/cos x = sec x, so 1 ÷ cos² x = sec² x.

d/dx tan x = sec² x = 1/cos² x

−π/4π/4−4−2246xy(π/4, 1)(π/4, 2)solid: y = tan xdashed: y = sec² xsec² x ≥ 1 everywhere,so tan x always risesbetween its asymptotes.At x = π/4: tan x = 1,slope sec²(π/4) = 2.
tan x (solid) and its derivative sec² x (dashed). The derivative is never less than 1, so the tangent function rises everywhere between its asymptotes. At x = π/4 the height is 1 and the slope is 2.

The other three (for reference)

With the same method you can show:

  • d/dx sec x = sec x tan x
  • d/dx csc x = −csc x cot x
  • d/dx cot x = −csc² x

The curriculum focuses on sine, cosine and their combinations; tan x is the one you should know well. If you need the others, rewrite them with sin and cos and use the quotient (or chain) rule: you never need to memorize them.

Worked example

Example 2: x sin x

Differentiate y = x sin x and find the slope at x = π.

  1. Product rule: y′ = 1 × sin x + x × cos x = sin x + x cos x.
  2. At x = π: sin π + π cos π = 0 + π(−1) = −π ≈ −3.14.

y′ = sin x + x cos x; slope −π at x = π.

π/2π3π/22π−4−22xy(2.03, 1.82)slope −πy = x sin xy′ = sin x + x cos xDotted: y = x andy = −x, the lines thewave grows between.Peak wheretan x = −x, x ≈ 2.03
y = x sin x oscillates between the lines y = x and y = −x. Its first peak, where y′ = sin x + x cos x = 0, is near (2.03, 1.82). At x = π it crosses the axis with slope −π.
Worked example

Example 3: A damped oscillation

Differentiate y = eˣ cos x and y = e^(−0.5x) sin x. Find where y = eˣ cos x has horizontal tangents in [0, 2π].

  1. Product rule: d/dx eˣ cos x = eˣ cos x + eˣ(−sin x) = eˣ(cos x − sin x).
  2. Product and chain rules: d/dx e^(−0.5x) sin x = −0.5e^(−0.5x) sin x + e^(−0.5x) cos x = e^(−0.5x)(cos x − 0.5 sin x).
  3. Horizontal tangents of eˣ cos x: eˣ ≠ 0, so cos x − sin x = 0, tan x = 1: x = π/4 or 5π/4.

eˣ(cos x − sin x) and e^(−0.5x)(cos x − 0.5 sin x); horizontal tangents of eˣ cos x at x = π/4 and 5π/4.

Worked example

Example 4: A quotient

Differentiate y = (sin x)/x (x ≠ 0) and evaluate at x = π.

  1. Quotient rule: y′ = [cos x × x − sin x × 1] ÷ x² = (x cos x − sin x)/x².
  2. At x = π: (π(−1) − 0)/π² = −1/π ≈ −0.318.

y′ = (x cos x − sin x)/x²; −1/π at x = π.

Worked example

Example 5: Rules inside rules

Differentiate y = tan(3x) and y = x² cos(2x).

  1. Chain rule: d/dx tan(3x) = sec²(3x) × 3 = 3 sec²(3x).
  2. Product rule with a chain inside: d/dx x² cos(2x) = 2x cos(2x) + x² × (−2 sin(2x)) = 2x cos(2x) − 2x² sin(2x).

3 sec²(3x) and 2x cos 2x − 2x² sin 2x. (A3.5 stresses applying the rules correctly, not heavy simplification.)

Hands-on activity

Shadow rates: a metre stick in the sun

You need: a metre stick (or any straight stick you measure), a tape measure, a sunny day (spring, summer or a clear winter day all work), a watch, and paper and pencil. Safety: never look directly at the Sun; look only at the shadow. On a summer day wear a hat and sunscreen and take breaks in the shade between readings.

  1. Stand the metre stick straight up on flat ground (a friend can hold it, or prop it with books). Measure its height h (1 m for a metre stick).
  2. Measure the shadow length L. Repeat every 30 minutes for two or three hours in the morning or afternoon.
  3. For each reading, the Sun's elevation angle θ satisfies tan θ = h/L. Compute θ = tan⁻¹(h/L) in degrees.
  4. The model is L = h cot θ = h cos θ/sin θ. Use the quotient rule to show dL/dθ = −h/sin² θ (θ in radians).
  5. For one of your angles, convert to the rate per degree by multiplying by π/180. Compare with how much your shadow actually changed between readings.

What to look for: with h = 1 m and θ = 40°, L ≈ 1.19 m and dL/dθ ≈ −1/sin² 40° ≈ −2.42 m per radian, or about −0.042 m (4.2 cm) shorter for each degree the Sun rises. Shadows change length fastest when the Sun is low (sin θ small), which is why evening shadows grow so quickly.

Just for fun

tan x is the most optimistic function in trigonometry: its derivative sec² x is never less than 1, so between its asymptotes it never once goes downhill.

Your turn

1

Differentiate y = 4 tan x.

2

Differentiate y = x cos x.

3

Differentiate y = sin x cos x using the product rule.

4

Differentiate y = e^(2x) sin x.

5

Differentiate y = (cos x)/x.

6

Find the slope of y = tan x at x = π/3.

More practice: warm-up

1

d/dx tan x = ?

2

What is the slope of y = tan x at x = 0?

3

Differentiate y = x + tan x.

4

Which rule do you need for y = x² sin x?

5

Which rule do you need for y = sin x/(1 + x²)?

More practice: on your own

1

Find the equation of the tangent to y = tan x at x = π/4.

2

Find all x in [0, 2π] where y = x + 2 cos x has a horizontal tangent.

3

Differentiate y = tan²x and show it equals 2 tan x sec² x.

4

Differentiate y = e^(−t) cos(2t), a damped vibration.

5

Use the quotient rule to show d/dx sec x = sec x tan x.

Challenge

1

Find the second derivative of y = x sin x, and show that y″ + y = 2 cos x.

2

Show that y = tan x has no horizontal tangents.

3

For y = eˣ sin x, show that y″ − 2y′ + 2y = 0.

Check your understanding

Quiz

1.

d/dx tan x =

2.

d/dx (x sin x) =

3.

The slope of y = tan x at x = π/4 is:

4.

d/dx (eˣ cos x) =

5.

d/dx (sin x)/x =

6.

d/dx tan(5x) =

For parents and teachers

Big idea (A3.5): combining the product, quotient and chain rules with the derivatives of sin x and cos x lets students differentiate any combination: tan x, x sin x, damped oscillations like e^(−t) cos 2t, and more. The derivative of tan x is sec² x.

How to help: before your teen differentiates, ask "Is this a product, a quotient, or one function inside another?" Naming the structure first prevents most errors.

Common difficulties:

  • Differentiating a product factor by factor: (x sin x)′ is not cos x.
  • The order of terms in the quotient rule numerator.
  • Writing d/dx tan x = sec x² or confusing sec² x with sec(x²).
  • Forgetting that tan x is undefined at x = π/2 + nπ (so are its derivatives there).