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

ExaminerPrep › IB Maths AA › Notes

IB Maths AA · Topic 5 · 5.6 · SL and HL

Differentiation rules

This note gives the derivatives of \(\sin x\), \(\cos x\), \(e^x\) and \(\ln x\), and the three rules that combine them: the chain rule, the product rule and the quotient rule. With these you can differentiate almost any function you will meet at this level. Choosing the correct rule is the main skill.

Key ideas

Standard derivatives

These are the basic results to learn. For the trigonometric functions, \(x\) is in radians.

  • \(\dfrac{d}{dx}(\sin x)=\cos x\)
  • \(\dfrac{d}{dx}(\cos x)=-\sin x\)
  • \(\dfrac{d}{dx}(e^x)=e^x\)
  • \(\dfrac{d}{dx}(\ln x)=\dfrac1x\)

The chain rule

A composite function is a function of a function, such as \((3x^2-1)^4\) or \(\sin(2x+1)\). Write it as \(y=f(u)\) where \(u=g(x)\). Then

\[ \frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}. \]

In words: differentiate the outer function, leaving the inside alone, then multiply by the derivative of the inside. Useful consequences are

\[ \frac{d}{dx}\bigl(\sin(ax+b)\bigr)=a\cos(ax+b),\qquad \frac{d}{dx}\bigl(e^{g(x)}\bigr)=g'(x)e^{g(x)},\qquad \frac{d}{dx}\bigl(\ln g(x)\bigr)=\frac{g'(x)}{g(x)}. \]

The product rule

When two functions of \(x\) are multiplied, \(y=uv\), then

\[ \frac{dy}{dx}=u\frac{dv}{dx}+v\frac{du}{dx}. \]

Differentiate one factor at a time, leaving the other unchanged, and add the results.

The quotient rule

When one function is divided by another, \(y=\dfrac{u}{v}\), then

\[ \frac{dy}{dx}=\frac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{v^2}. \]

The order in the numerator matters: it is \(v\,u'-u\,v'\), and the denominator is \(v^2\).

Choosing a rule

  • Brackets raised to a power, or a function of a function (such as \(\sin(x^2)\)): chain rule.
  • Two separate functions multiplied (such as \(x^2e^{3x}\)): product rule, and the chain rule for \(e^{3x}\).
  • One function over another (such as \(\dfrac{\ln x}{x}\)): quotient rule. If the denominator is a single power of \(x\), you could instead split it or write it as a product.
  • A constant multiple is not a product. \(5\sin x\) differentiates to \(5\cos x\).

Many questions then ask for a gradient, a stationary point or a tangent. After applying a rule, factorise the derivative where possible. A factorised derivative makes it much easier to solve \(\dfrac{dy}{dx}=0\).

Combining the rules

Some functions need more than one rule. In \(x^2e^{3x}\), the product rule is the main rule, but finding the derivative of \(e^{3x}\) needs the chain rule. A quotient may have a composite function on top, such as \(\dfrac{\sin 2x}{x}\). Work from the outside in. Identify the overall structure first (product, quotient or composite), then deal with each part separately and carefully.

Checking your result

You can check a derivative at a single value. Pick a point such as \(x=1\), find the gradient from your formula, and compare it with the gradient found by drawing the tangent on your GDC, or with the numerical derivative feature on it. A quick comparison is a good way to detect a missing factor.

When rewriting is easier

Sometimes there is a simpler route. The quotient \(\dfrac{x^2+1}{x}\) is just \(x+x^{-1}\), which needs only the power rule. The function \(\ln(x^3)\) can be written as \(3\ln x\), with derivative \(\dfrac3x\). The same answer comes from the chain rule, giving \(\dfrac{3x^2}{x^3}=\dfrac3x\). Look for a simplification before reaching for a heavier rule, but do not spend long searching for one.

Domains and values

Remember where each function exists. The derivative of \(\ln x\) is only meaningful for \(x\gt 0\), and \(\dfrac{1}{x^2}\) is undefined at \(x=0\). When you solve \(\dfrac{dy}{dx}=0\), reject any answer outside the domain. Also note that \(e^{g(x)}\) is never zero, so in an equation such as \(x e^{3x}(3x+2)=0\), you only need to set the other factors equal to zero. Once the derivative is found, everything in notes 5.2 to 5.4 applies: you can find increasing intervals, tangents and normals for these functions in the same way as for polynomials.

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\)Note the minus sign.
\(\dfrac{d}{dx}(e^x)=e^x\)The exponential function is its own derivative.
\(\dfrac{d}{dx}(\ln x)=\dfrac1x\)Valid for \(x\gt 0\).
\(\dfrac{dy}{dx}=\dfrac{dy}{du}\dfrac{du}{dx}\)Chain rule for composite functions.
\((uv)'=uv'+vu'\)Product rule.
\(\left(\dfrac uv\right)'=\dfrac{vu'-uv'}{v^2}\)Quotient rule.

Worked examples

Example 1 Differentiate \(y=(3x^2-1)^4\) and find the gradient when \(x=1\).

Let \(u=3x^2-1\), so \(y=u^4\).

\(\dfrac{dy}{du}=4u^3\) and \(\dfrac{du}{dx}=6x\).

\(\dfrac{dy}{dx}=4u^3\times 6x=24x(3x^2-1)^3\).

At \(x=1\): \(24(1)(3-1)^3=24\times 8=192\).

Answer: \(\dfrac{dy}{dx}=24x(3x^2-1)^3\); the gradient at \(x=1\) is 192.

Example 2 Differentiate \(y=x^2e^{3x}\) and find the \(x\)-coordinates of the stationary points.

Let \(u=x^2\) and \(v=e^{3x}\). Then \(u'=2x\) and, by the chain rule, \(v'=3e^{3x}\).

\(\dfrac{dy}{dx}=uv'+vu'=x^2\cdot 3e^{3x}+e^{3x}\cdot 2x\).

Factorise: \(\dfrac{dy}{dx}=xe^{3x}(3x+2)\).

Set this equal to 0. Since \(e^{3x}\gt 0\) for all \(x\), we need \(x=0\) or \(3x+2=0\).

Answer: \(\dfrac{dy}{dx}=xe^{3x}(3x+2)\); stationary points at \(x=0\) and \(x=-\dfrac23\).

Example 3 The efficiency of a process is modelled by \(y=\dfrac{\ln x}{x}\) for \(x\gt 0\). Find \(\dfrac{dy}{dx}\), the value of \(x\) where \(y\) is stationary, and the value of \(y\) there.

Let \(u=\ln x\) and \(v=x\). Then \(u'=\dfrac1x\) and \(v'=1\).

\(\dfrac{dy}{dx}=\dfrac{v u'-u v'}{v^2}=\dfrac{x\cdot\frac1x-\ln x\cdot 1}{x^2}=\dfrac{1-\ln x}{x^2}\).

Set \(\dfrac{dy}{dx}=0\): \(1-\ln x=0\), so \(\ln x=1\) and \(x=e\).

Then \(y=\dfrac{\ln e}{e}=\dfrac1e\approx 0.368\).

Answer: \(\dfrac{dy}{dx}=\dfrac{1-\ln x}{x^2}\); stationary at \(x=e\) where \(y=\dfrac1e\approx 0.368\).

Common errors

  • Common error: forgetting the inner derivative in the chain rule. The derivative of \(\sin(3x)\) is \(3\cos(3x)\), not \(\cos(3x)\).
  • Common error: differentiating a product by differentiating each factor and multiplying. The derivative of \(x^2e^{3x}\) is not \(2x\times 3e^{3x}\).
  • Common error: reversing the numerator in the quotient rule, giving \(uv'-vu'\), which changes the sign of the answer.
  • Common error: the sign of \(\cos x\): its derivative is \(-\sin x\), and the derivative of \(\sin x\) is \(+\cos x\).
  • Common error: thinking that \(\dfrac{d}{dx}(e^{3x})=3x\,e^{3x-1}\). The power rule does not apply when the variable is in the exponent. The correct result is \(3e^{3x}\).

Exam tip: write \(u\), \(v\), \(u'\) and \(v'\) in a small list before substituting into the product or quotient rule. This avoids sign slips and mismatched terms.

Check yourself

  1. Differentiate \(y=5e^{2x}-3\cos x\).
    Answer\(\dfrac{dy}{dx}=10e^{2x}+3\sin x\).
  2. Differentiate \(y=\sin(3x^2)\).
    AnswerChain rule: the inner function \(3x^2\) has derivative \(6x\). So \(\dfrac{dy}{dx}=6x\cos(3x^2)\).
  3. Find the gradient of \(y=x\ln x\) at \(x=e\).
    AnswerProduct rule: \(\dfrac{dy}{dx}=x\cdot\dfrac1x+\ln x\cdot 1=1+\ln x\). At \(x=e\): \(1+1=2\).
  4. Differentiate \(y=\dfrac{2x+1}{x-3}\) and simplify.
    Answer\(\dfrac{dy}{dx}=\dfrac{(x-3)(2)-(2x+1)(1)}{(x-3)^2}=\dfrac{2x-6-2x-1}{(x-3)^2}=-\dfrac{7}{(x-3)^2}\).