Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AI › Notes

IB Maths AI · Topic 5 · 5.4 · HL only

Derivatives of trigonometric, exponential and logarithmic functions

This note gives the derivatives of \(\sin x\), \(\cos x\), \(e^x\) and \(\ln x\), and shows how to use them with powers of \(x\) to find gradients, tangents, normals and stationary points. These functions model waves, growth and decay, so their rates of change appear in many applied problems.

Key ideas

Four derivatives are worth knowing by heart (the formula booklet lists them, but quick recall saves time):

  • \(\sin x\) differentiates to \(\cos x\).
  • \(\cos x\) differentiates to \(-\sin x\). Watch the minus sign.
  • \(e^x\) differentiates to itself, \(e^x\). It is the only function (apart from multiples of it) with this property.
  • \(\ln x\) differentiates to \(\dfrac1x\), and is defined only for \(x\gt 0\).

The earlier rules still apply. A constant multiple stays in front, and a sum or difference is differentiated term by term. So \(\dfrac{d}{dx}(3\sin x+2e^x-5\ln x)=3\cos x+2e^x-\dfrac5x\).

Radians. These results are true only when \(x\) is measured in radians. Set your GDC to radian mode before you evaluate any trigonometric derivative. If the question gives an angle in degrees, the derivative formulas above do not apply directly.

Gradient, tangent and normal. The value of \(f'(a)\) is the gradient of the curve at \(x=a\). The tangent at that point has the same gradient, so its equation is \(y-f(a)=f'(a)(x-a)\). The normal is perpendicular to the tangent, so its gradient is \(-\dfrac{1}{f'(a)}\), provided \(f'(a)\ne 0\).

Stationary points. Solve \(f'(x)=0\). To decide the type, use the second derivative: \(f''(x)\gt 0\) gives a local minimum and \(f''(x)\lt 0\) gives a local maximum. Alternatively, check the sign of \(f'(x)\) on either side. For \(e^x\) and \(\ln x\), remember that \(e^x\) is always positive, so an equation like \(e^x=3\) is solved by taking natural logarithms: \(x=\ln 3\).

Increasing and decreasing. A function is increasing where \(f'(x)\gt 0\) and decreasing where \(f'(x)\lt 0\). For \(f(x)=\ln x\), the derivative \(\dfrac1x\) is positive for all \(x\gt0\), so the graph always rises, but more and more slowly.

Functions such as \(\sin(2x)\) or \(e^{3x}\), where the inside is more than just \(x\), need the chain rule, which is covered in the next note.

Linking the graphs. The graph of \(\sin x\) has gradient 1 at the origin, and its gradient is zero at each peak and trough. That matches the graph of its derivative \(\cos x\), which is 1 at \(x=0\) and crosses zero at those points. Sketching the two together is a good way to remember the signs.

Stating domains. A question on \(\ln x\) always has \(x\gt 0\). If your solution gives a negative \(x\) there, reject it and say why.

Using the results in context. In a model, \(f'(x)\) is a rate of change. If \(h(t)\) is a height, \(h'(t)\) is the speed at which it changes. A negative value means the quantity is falling. Always give units with the rate, such as metres per second.

Definitions and formulae

Term or formulaMeaning / when to use
\(\dfrac{d}{dx}(\sin x)=\cos x\)Radians only.
\(\dfrac{d}{dx}(\cos x)=-\sin x\)Radians only.
\(\dfrac{d}{dx}(e^x)=e^x\)Gradient equals the height of the curve at every point.
\(\dfrac{d}{dx}(\ln x)=\dfrac1x\)For \(x\gt 0\).
\(\dfrac{d}{dx}(x^n)=nx^{n-1}\)Used alongside the four results above.
\(y-f(a)=f'(a)(x-a)\)Equation of the tangent at \(x=a\).
\(m_{\text{normal}}=-\dfrac{1}{f'(a)}\)Gradient of the normal.
\(f'(x)=0\)Condition for a stationary point.

Worked examples

Example 1 Let \(f(x)=3\sin x+2e^x-5\ln x\). Find \(f'(1)\), with your calculator in radian mode.

Differentiate each term: \(f'(x)=3\cos x+2e^x-\dfrac5x\).

Substitute \(x=1\): \(f'(1)=3\cos 1+2e-5\).

Evaluate: \(3\cos 1=1.6209\) and \(2e=5.4366\), so \(f'(1)=1.6209+5.4366-5=2.0575\).

Answer: \(f'(1)\approx 2.06\)

Example 2 Find the equations of the tangent and the normal to \(y=\ln x+3x\) at the point where \(x=2\).

The \(y\)-coordinate is \(\ln 2+6\approx 6.693\).

The derivative is \(\dfrac{dy}{dx}=\dfrac1x+3\), so at \(x=2\) the gradient is \(0.5+3=3.5\).

Tangent: \(y-(\ln 2+6)=3.5(x-2)\), so \(y=3.5x-7+6+\ln 2=3.5x+\ln 2-1\), which is \(y\approx 3.5x-0.307\).

Normal gradient: \(-\dfrac{1}{3.5}=-\dfrac{2}{7}\).

Normal: \(y-(\ln 2+6)=-\dfrac27(x-2)\), so \(y=-\dfrac27x+\dfrac47+6+\ln 2\), which is \(y\approx -0.286x+7.264\).

Answer: tangent \(y\approx 3.5x-0.307\); normal \(y\approx -0.286x+7.26\)

Example 3 The cost of running a process is modelled by \(C(x)=e^x-3x\) for \(x\ge 0\). Find the value of \(x\) that minimises \(C\), and the minimum cost.

\(C'(x)=e^x-3\). Set this to zero: \(e^x=3\).

Take natural logarithms: \(x=\ln 3\approx 1.0986\).

Second derivative: \(C''(x)=e^x\), which is positive for all \(x\). So the stationary point is a minimum.

Minimum value: \(C(\ln 3)=e^{\ln 3}-3\ln 3=3-3\ln 3\approx 3-3.2958=-0.296\).

Answer: minimum at \(x=\ln 3\approx 1.10\), where \(C\approx -0.296\)

Example 4 For \(y=x+2\cos x\) with \(0\le x\le 2\pi\), find the \(x\)-coordinates of the stationary points and decide their nature.

\(\dfrac{dy}{dx}=1-2\sin x\). Set this to zero: \(\sin x=\dfrac12\).

In the given range, the solutions are \(x=\dfrac\pi6\) and \(x=\dfrac{5\pi}{6}\).

The second derivative is \(\dfrac{d^2y}{dx^2}=-2\cos x\).

At \(x=\dfrac\pi6\): \(-2\cos\dfrac\pi6=-\sqrt3\lt 0\), so this is a local maximum, with \(y=\dfrac\pi6+\sqrt3\approx 2.26\).

At \(x=\dfrac{5\pi}6\): \(-2\cos\dfrac{5\pi}6=+\sqrt3\gt 0\), so this is a local minimum, with \(y=\dfrac{5\pi}6-\sqrt3\approx 0.886\).

Answer: maximum at \(x=\dfrac\pi6\), minimum at \(x=\dfrac{5\pi}6\)

Common errors

  • Writing \(\dfrac{d}{dx}(\cos x)=\sin x\) and losing the minus sign.
  • Using a calculator in degree mode for a trigonometric derivative.
  • Differentiating \(e^x\) as \(xe^{x-1}\), treating it like a power. The variable is in the exponent, so the power rule does not apply.
  • Giving the normal the same gradient as the tangent, or using only \(\dfrac{1}{m}\) without the negative sign.
  • Solving \(e^x=3\) as \(x=\dfrac{3}{e}\). The correct step is \(x=\ln 3\).

Exam tip: When a question asks for exact values, leave answers such as \(\ln 3\) or \(3-3\ln 3\) in that form, and give a decimal only if asked. Test any stationary point with \(f''\) and state the conclusion in words.

Check yourself

  1. Differentiate \(4\sin x-3\ln x+e^x\).
    Answer\(4\cos x-\dfrac3x+e^x\).
  2. Find the gradient of \(y=5\cos x\) at \(x=\dfrac{\pi}{3}\).
    Answer\(\dfrac{dy}{dx}=-5\sin x\). At \(x=\dfrac\pi3\): \(-5\times\dfrac{\sqrt3}{2}\approx -4.33\).
  3. Find the stationary point of \(y=x-2\ln x\) and state its nature.
    Answer\(y'=1-\dfrac2x=0\) gives \(x=2\). \(y''=\dfrac{2}{x^2}=0.5\gt 0\), so it is a minimum, at \((2,\ 2-2\ln 2)\approx(2,\ 0.614)\).
  4. Find the equation of the tangent to \(y=e^x\) at \(x=0\).
    AnswerAt \(x=0\): \(y=1\) and gradient \(e^0=1\). Tangent: \(y-1=1(x-0)\), so \(y=x+1\).