Hersi Maths WhatsApp me

Understand · explore · practise

Differentiating tan, sec, cosec and cot

Derive and use the derivatives of tan, sec, cosec and cot. Explore one branch at a time, combine rules for composite expressions and practise exact tangents and stationary points.

Before you startReciprocal trigonometric functions; radians; chain, product and quotient rules

01 / Compare four derivatives

The formula’s sign and the function’s value are different things.

d/dx(tan x) = sec²x
d/dx(sec x) = sec x tan x
d/dx(cosec x) = −cosec x cot x
d/dx(cot x) = −cosec²x

All angles are in radians and each formula applies only where the original function exists.

The derivatives of tan and cot have fixed signs on each valid branch: tan increases and cot decreases. The derivatives of sec and cosec can change sign because they contain unsquared factors. Explore their values and slopes separately.

Function height and derivative heightExplore
One continuous branch and its derivativeAt angle zero, tangent has value zero and gradient one.−4π/1204π/12Blue f · green f′ · gold tangent

d/dx(tan x) = sec²x.

x = 0π/12; f(x) = 0; f′(x) = 1.

The graph is increasing at the selected point because its derivative is positive.

Angles are in radians. Each window lies inside one valid branch; it does not reach a pole or join across one. The green height is the gold tangent’s gradient, not the original function’s height.

02 / Derive the tangent derivative

Write tan x as sin x divided by cos x.

Use the quotient ruleWorked example

d/dx(tan x) = [cos²x + sin²x]/cos²x

Differentiating cosine creates a second minus sign.

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

Use the Pythagorean identity.

Exclude x = π/2 + kπ, k an integer

These are the poles of the original tangent function.

01 · A scaled angle

Differentiate 4tan(3x − 1).

Hint

Include the outside coefficient 4 and the inner derivative 3.

Worked solution

The derivative is 12sec²(3x − 1), where cos(3x − 1) ≠ 0.

03 / Check the secant sign

Differentiating 1/cos x produces a positive formula.

Use a negative powerWorked example

sec x = (cos x)⁻¹

The original denominator must be non-zero.

d/dx(sec x) = −(cos x)⁻²(−sin x)

The outside and inside derivatives both contribute a minus sign.

d/dx(sec x) = sin x/cos²x = sec x tan x

There is no leading minus sign in the final formula.

This does not mean sec x is increasing everywhere. For −π/2 < x < 0, sec x is positive while tan x is negative, so its derivative is negative.

Watch secant’s slope change across a branch

Pause, replay or seek freely. The notes explain the same idea and stay in view.

02 · Secant with a linear angle

Differentiate 5sec(2x + 1).

Hint

Keep the positive sec·tan formula and multiply by 2.

Worked solution

The derivative is 10sec(2x + 1)tan(2x + 1), where cos(2x + 1) ≠ 0.

03 · Height versus slope

For y = sec x at x = −π/4, find the value and gradient.

Hint

sec(−π/4) = √2 and tan(−π/4) = −1.

Worked solution

The value is √2 and the gradient is −√2. A positive height can have a negative slope.

04 / Differentiate cosecant

The sine derivative leaves one minus sign.

cosec x = (sin x)⁻¹Worked example

d/dx(cosec x) = −cos x/sin²x

Use the chain rule.

d/dx(cosec x) = −cosec x cot x

Separate the reciprocal sine and cotangent factors.

Exclude x = kπ, k an integer

Sine is zero at these angles.

04 · A negative angle factor

Differentiate cosec(1 − 4x).

Hint

The formula contributes −1 and the inner derivative contributes −4.

Worked solution

The derivative is 4cosec(1 − 4x)cot(1 − 4x), where sin(1 − 4x) ≠ 0.

05 / Differentiate cotangent

Its derivative is always negative on its domain.

cot x = cos x/sin xWorked example

d/dx(cot x) = [−sin²x − cos²x]/sin²x

Use the quotient rule in this order.

d/dx(cot x) = −1/sin²x = −cosec²x

The squared cosecant is positive.

Exclude x = kπ

Cotangent decreases on each interval between adjacent poles.

05 · Cotangent derivative

Differentiate 2cot(5x).

Hint

Use both the inner factor 5 and the negative cotangent rule.

Worked solution

The derivative is −10cosec²(5x), where sin(5x) ≠ 0.

06 · Local direction

Is cot x increasing or decreasing at x = 2π/3? Find the exact gradient.

Hint

sin²(2π/3) = 3/4.

Worked solution

The gradient is −4/3, so cot x is decreasing there.

06 / Differentiate nonlinear angles and powers

A square outside a trig function adds another layer.

d/dx[tan g] = sec²(g)g′
d/dx[sec g] = sec(g)tan(g)g′
d/dx[cosec g] = −cosec(g)cot(g)g′
d/dx[cot g] = −cosec²(g)g′

Differentiate sec²(3x)Worked example

y = [sec(3x)]²

The square is outside the secant function.

y′ = 2sec(3x) × sec(3x)tan(3x) × 3

Differentiate all three layers.

y′ = 6sec²(3x)tan(3x)

Keep cos(3x) ≠ 0.

07 · A nonlinear angle

Differentiate tan(x² + 1).

Hint

The inside derivative is 2x.

Worked solution

The derivative is 2x sec²(x² + 1), where cos(x² + 1) ≠ 0.

08 · A power of cosecant

Differentiate cosec³(2x).

Hint

Differentiate the cube, then cosecant, then 2x.

Worked solution

The derivative is −6cosec³(2x)cot(2x), where sin(2x) ≠ 0.

07 / Use product rule when factors multiply

Choose the outside operation first.

Differentiate x sec(2x)Worked example

u′ = 1; v′ = 2sec(2x)tan(2x)

The second factor needs the chain rule.

y′ = sec(2x) + 2x sec(2x)tan(2x)

Use both product terms.

y′ = sec(2x)[1 + 2x tan(2x)]

The original domain requires cos(2x) ≠ 0.

09 · A cotangent product

Differentiate x²cot x.

Hint

The cotangent derivative is negative.

Worked solution

y′ = 2x cot x − x²cosec²x, where sin x ≠ 0.

10 · Two trig factors

Differentiate sec x tan x and simplify the answer.

Hint

Use product rule, then factor sec x.

Worked solution

y′ = sec x tan²x + sec³x = sec x(tan²x + sec²x), where cos x ≠ 0. This is also the second derivative of sec x.

08 / Simplify while retaining the original domain

Equivalent expressions can have different natural domains.

Differentiate tan x/sec xWorked example

tan x/sec x = sin x where cos x ≠ 0

Both original functions must exist before simplification.

y′ = cos x on the original domain

The simplified expression is easy to differentiate.

The original quotient remains undefined at π/2 + kπ

The fact that sine is defined there does not fill those holes.

11 · A quotient with holes

Differentiate cot x/cosec x on its original domain.

Hint

The quotient simplifies to cos x only where sin x ≠ 0.

Worked solution

The derivative is −sin x for x ≠ kπ. The original quotient remains undefined at integer multiples of π.

12 · An identity shortcut

Differentiate sec²x − tan²x and state the restriction.

Hint

This expression is identically 1 wherever both terms exist.

Worked solution

The derivative is 0 where cos x ≠ 0. Direct differentiation gives 2sec²x tan x − 2tan x sec²x = 0.

09 / Find exact tangents and normals

Check the angle is in the original domain.

Tangent to y = sec x at x = π/3Worked example

The point is (π/3, 2)

Use cos(π/3) = 1/2.

y′ = sec x tan x, so m = 2√3

Evaluate both factors.

y − 2 = 2√3(x − π/3)

Keep the exact angle and gradient.

13 · A cosecant normal

Find the normal to y = cosec x at x = π/6.

Hint

The point is (π/6, 2), and the tangent gradient is −2√3.

Worked solution

The normal has gradient 1/(2√3). Its equation is y − 2 = (x − π/6)/(2√3).

14 · A cotangent tangent

Find the tangent to y = cot(2x) at x = π/8.

Hint

The angle inside cotangent is π/4.

Worked solution

The point is (π/8, 1) and the gradient is −2cosec²(π/4) = −4. The tangent is y − 1 = −4(x − π/8).

10 / Find all stationary points in the interval

Exclude poles before solving a derivative equation.

Stationary points of y = sec x for 0 ≤ x ≤ 2πWorked example

y′ = sec x tan x; sec x is never zero

Stationary inputs require tan x = 0.

x = 0, π, 2π

The poles π/2 and 3π/2 are excluded from the domain.

Points: (0, 1), (π, −1), (2π, 1)

The underlying secant function has minima at 0 and 2π and a maximum at π.

If asked for interior stationary points of the restricted interval, give only x = π

Always follow the wording about endpoints.

Classify locally on the continuous branch. Never draw a derivative sign interval straight through a pole as though the function were continuous there.

15 · A cosecant stationary point

Find and classify all stationary points of y = cosec x for 0 < x < π.

Hint

cosec x is never zero, so the derivative is zero only when cot x = 0.

Worked solution

The only point is (π/2, 1). Its derivative is negative before π/2 and positive after it, so this is a minimum.

16 · No stationary points

Does y = tan(2x) have any stationary points on its real domain?

Hint

Its derivative is 2sec²(2x).

Worked solution

No. The derivative is strictly positive at every valid input. Points where cos(2x) = 0 are excluded poles, not stationary points.

11 / Check formula, angle and domain

The derivative of sec is positive sec·tan; the product itself may be negative.

  • Use radians for the standard formulas.
  • For tan and sec, exclude zeros of cosine; for cosec and cot, exclude zeros of sine.
  • Multiply by the derivative of any inside angle.
  • Apply product or quotient rule to combinations of factors.
  • Keep original exclusions after identities or cancellation.
  • Use derivative signs within a continuous branch.

Review the quotient rule →

Section 1 of 11 · Compare four derivatives