Derivatives of Trigonometric Functions, eˣ and ln x

By Engr. Henry Akpan

Beyond Polynomials

The power rule handles polynomials, but science and engineering are full of other functions: sines and cosines for waves and oscillations, exponentials for growth and decay, and logarithms for scales such as pH and decibels. This tutorial covers the derivatives of trigonometric functions, exponential functions and logarithmic functions, where the key results come from, and how to combine them with the chain, product and quotient rules. It is written for first-year university students (MTH 101/102) and Further Mathematics candidates, with many worked examples.

The Standard Results

Learn this list well; almost every calculus question uses it.

  • d/dx (sin x) = cos x
  • d/dx (cos x) = −sin x
  • 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
  • d/dx (eˣ) = eˣ
  • d/dx (aˣ) = aˣ ln a
  • d/dx (ln x) = 1/x (for x > 0)
  • d/dx (logₐ x) = 1/(x ln a)

Important: the trigonometric results are only true when x is measured in radians. In degrees, d/dx (sin x°) = (π/180) cos x°, which is why calculus always uses radians.

Where the Derivatives of Trigonometric Functions Come From

From first principles, d/dx (sin x) is the limit as h → 0 of [sin(x + h) − sin x]/h. Using sin(x + h) = sin x cos h + cos x sin h, this becomes

sin x × (cos h − 1)/h + cos x × (sin h)/h.

Two key limits (valid in radians) finish the job: as h → 0, (sin h)/h → 1 and (cos h − 1)/h → 0. So the derivative is sin x × 0 + cos x × 1 = cos x. A similar argument gives d/dx (cos x) = −sin x.

The other four follow from the quotient rule. For tan x = sin x / cos x:

d/dx (tan x) = [cos x × cos x − sin x × (−sin x)] / cos² x = (cos² x + sin² x)/cos² x = 1/cos² x = sec² x.

A quick memory aid: the derivatives of the "co-" functions (cos, cosec, cot) all start with a minus sign.

Why the Exponential Function Is Special

The number e ≈ 2.71828 is defined so that the gradient of y = eˣ at x = 0 is exactly 1. It follows that the gradient of eˣ at every point equals its own value: d/dx (eˣ) = eˣ. This is why eˣ describes natural growth: the rate of growth is proportional to the current amount.

For any other base, write aˣ = e^(x ln a). Then d/dx (aˣ) = e^(x ln a) × ln a = aˣ ln a. For example, d/dx (2ˣ) = 2ˣ ln 2 ≈ 0.693 × 2ˣ.

Since y = ln x is the inverse of eˣ, write x = eʸ. Then dx/dy = eʸ = x, so dy/dx = 1/x.

Using the Chain Rule

The chain rule says: differentiate the outside function, keep the inside, then multiply by the derivative of the inside. This gives a family of very useful results:

  • d/dx [sin(ax + b)] = a cos(ax + b)
  • d/dx [e^(f(x))] = f′(x) e^(f(x))
  • d/dx [ln f(x)] = f′(x)/f(x)

Example 1. Differentiate y = sin(3x).

dy/dx = 3 cos(3x).

Example 2. Differentiate y = cos(x²).

dy/dx = −sin(x²) × 2x = −2x sin(x²).

Example 3. Differentiate y = sin² x.

Write y = (sin x)². The outside is a square: dy/dx = 2 sin x × cos x = sin 2x.

Example 4. Differentiate y = e^(5x − 2).

dy/dx = 5e^(5x − 2).

Example 5. Differentiate y = ln(x² + 1).

dy/dx = 2x/(x² + 1).

Example 6. Differentiate y = ln(cos x).

dy/dx = (−sin x)/cos x = −tan x.

Using Log Laws to Simplify First

Logarithm laws can turn a hard derivative into an easy one.

Example 7. Differentiate y = ln[(x + 1)³ / √(2x − 1)].

Expand first: y = 3 ln(x + 1) − ½ ln(2x − 1). Then

dy/dx = 3/(x + 1) − ½ × 2/(2x − 1) = 3/(x + 1) − 1/(2x − 1).

Example 8. Differentiate y = ln(5x).

y = ln 5 + ln x, and ln 5 is a constant, so dy/dx = 1/x. (The chain rule gives the same: 5/(5x) = 1/x.)

Product and Quotient Rule Examples

Example 9. Differentiate y = x² eˣ.

Product rule: dy/dx = 2x eˣ + x² eˣ = x eˣ(x + 2).

Example 10. Differentiate y = eˣ sin x.

dy/dx = eˣ sin x + eˣ cos x = eˣ(sin x + cos x).

Example 11. Differentiate y = (ln x)/x.

Quotient rule: dy/dx = [x × (1/x) − ln x × 1]/x² = (1 − ln x)/x².

Example 12. Differentiate y = x³ ln x.

dy/dx = 3x² ln x + x³ × (1/x) = 3x² ln x + x² = x²(3 ln x + 1).

Logarithmic Differentiation

For a function like y = xˣ, neither the power rule (which needs a constant power) nor the exponential rule (which needs a constant base) applies. Take logs of both sides first:

ln y = x ln x. Differentiate both sides with respect to x: (1/y) dy/dx = ln x + 1. So dy/dx = y(ln x + 1) = xˣ(ln x + 1).

The same trick simplifies long products and quotients, such as y = (x + 1)²(x − 3)⁴/(x + 2)⁵: take logs, expand, differentiate, then multiply by y.

Applications

Stationary points. Find the minimum of y = x ln x for x > 0. dy/dx = ln x + 1 = 0 gives ln x = −1, so x = 1/e. The second derivative is 1/x > 0, so it is a minimum, with y = −1/e ≈ −0.368.

Rates of change. A capacitor discharges so that its voltage is V = 12e^(−t/2) volts after t seconds. The rate of change is dV/dt = −6e^(−t/2). At t = 2 s, dV/dt = −6e^(−1) ≈ −2.21 V/s; the minus sign shows the voltage is falling.

Simple harmonic motion. If displacement is x = A sin(ωt), the velocity is dx/dt = Aω cos(ωt) and the acceleration is d²x/dt² = −Aω² sin(ωt) = −ω²x. Differentiating twice gives back the defining equation of SHM.

Summary

  • sin → cos, cos → −sin, tan → sec²; these only hold in radians.
  • eˣ is its own derivative; aˣ differentiates to aˣ ln a; ln x differentiates to 1/x.
  • The chain rule gives d/dx e^(f(x)) = f′(x)e^(f(x)) and d/dx ln f(x) = f′(x)/f(x).
  • Use log laws to simplify before differentiating, and logarithmic differentiation for functions like xˣ.

Related Tutorials