James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AA HL › Topic 5: Calculus › Differentiation rules

Differentiation rules

Derivatives of sinx, cosx, ex and lnx, and the chain, product and quotient rules.

SL 5.6SL + HL extensionPaper 1Paper 2≈ 60 min to work through
Before you start: the power rule. See Introduction to differentiation.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Differentiate sinx, cosx, ex and lnxSL 5.6
  • Use the chain rule for composite functionsSL 5.6
  • Use the product ruleSL 5.6
  • Use the quotient ruleSL 5.6
  • Decide which rule (or combination) a function needsSL 5.6

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

The power rule only works for powers of x. With four more standard derivatives and three rules for combining functions, you can differentiate almost any function you will meet: break it into pieces you know, then put the pieces back together.

2.1 Standard derivatives

Four new functions need their own derivatives. Each one makes sense if you look at its graph and ask how steep it is.

ex is its own derivative. At every point on y=ex, the gradient equals the height. When the curve is low it is nearly flat; as it rises, it gets steeper in exact step. This property is what makes e≈2.718 special.

lnx has derivative 1x. The graph of y=lnx is very steep just to the right of 0 and keeps getting flatter as x increases, but it never becomes completely flat. That matches 1x: large for small x, small for large x, and always positive.

sinx has derivative cosx. At x=0, the sine curve is rising at its steepest, and cos0=1. At x=π2, the sine curve is at its peak and flat, and cosπ2=0. After that, sine is falling and cosine is negative. cosx has derivative −sinx: the cosine curve starts at a peak and then falls, so its gradient starts at 0 and becomes negative.

Standard derivatives In formula booklet
ddx(sinx)=cosxddx(cosx)=−sinxddx(ex)=exddx(lnx)=1x
Why radians?

The trig results only hold when x is in radians. In degrees, the sine curve is stretched out horizontally (one cycle takes 360 instead of 2π≈6.28), so it is much less steep and an awkward factor of π180 appears. This is one of the main reasons mathematicians use radians. Always set your calculator to radians in calculus.

Use the Explore it section to see each function with its derivative drawn underneath.

2.2 The chain rule

A composite function is one function inside another. In (2x+1)5, the inside is 2x+1 and the outside is "something to the power 5". In sin(3x2), the inside is 3x2 and the outside is sine. A quick test: is there an expression sitting where you would normally see just x? If so, you need the chain rule.

Chain rule In formula booklet
y=g(u), u=f(x) ⇒ dydx=dydu×dudx

In practice: differentiate the outside, leaving the inside alone, then multiply by the derivative of the inside.

Why does this work?

Derivatives are rates of change, and rates of change multiply. Suppose u changes 2 times as fast as x, and y changes 5 times as fast as u. Then y changes 5×2=10 times as fast as x. The notation helps you remember: dydu×dudx looks as if the du cancels to leave dydx.

Some patterns come up so often that they are worth knowing on sight:

FunctionDerivative
(ax+b)nan(ax+b)n−1
ef(x)f′(x)ef(x)
lnf(x)f′(x)f(x)
sin(kx), cos(kx)kcos(kx), −ksin(kx)
Worked example 1Paper 1
Differentiate (a) (2x+1)5 (b) sin(3x2) (c) ex2.
(a) 5(2x+1)4×2=10(2x+1)4
Outside: power 5. Inside: 2x+1, derivative 2.
(b) cos(3x2)×6x=6xcos(3x2)
Outside: sine. Inside: 3x2, derivative 6x.
(c) ex2×2x=2xex2
Outside: e( ). Inside: x2, derivative 2x.
Worked example 2 (faded)Paper 1
Differentiate ln(5x).
Chain rule: 15x× 5  ← you work this out
= 1/x  ← you work this out

2.3 The product rule

When two functions of x are multiplied, such as x2ex or xsinx, you cannot just multiply their derivatives. A quick check shows why: x×x=x2 has derivative 2x, but multiplying the derivatives gives 1×1=1.

Product rule In formula booklet
y=uv ⇒ dydx=udvdx+vdudx
Why does this work?

Picture a rectangle with sides u and v, so its area is uv. When x increases slightly, u grows by a small amount δu and v by δv. The area gains two thin strips, uδv and vδu, plus a tiny corner δuδv that is so small it disappears in the limit. So the change in uv is made of two parts, one for each function changing: udv+vdu.

Write down u, v, u′ and v′ first, then substitute. This keeps the working clear and earns method marks.

Worked example 3Paper 1
Differentiate y=x2ex.
u=x2, v=ex: u′=2x, v′=ex.
dydx=x2ex+2xex
=xex(x+2)
Factorising makes later questions (such as stationary points) easier.

2.4 The quotient rule

For one function divided by another, use the quotient rule. Because of the minus sign, the order matters. A common way to remember it: "vdu minus udv, over v squared".

Quotient rule In formula booklet
y=uv ⇒ dydx=vdudx−udvdxv2

You could instead write uv as uv−1 and use the product rule with the chain rule. Both methods give the same answer; the quotient rule is usually tidier.

Worked example 4Paper 1
Differentiate y=lnxx.
u=lnx, v=x: u′=1x, v′=1.
dydx=x·1x−lnx·1x2
=1−lnxx2

2.5 Which rule?

Before differentiating, look at how the function is built. Ask these questions in order:

  • Can I simplify first? x2+1x=x+x−1 only needs the power rule. ln(x3)=3lnx. Simplifying is often quicker than using a rule.
  • Is it a sum or difference? Differentiate each term separately.
  • Is it two functions multiplied? Product rule.
  • Is it one function divided by another? Quotient rule.
  • Is one function inside another? Chain rule.

Many functions need more than one rule. In e2xsinx, the product rule is the main structure, and the chain rule is needed for e2x inside it.

Worked example 5Paper 1
Find the equation of the tangent to y=xlnx at x=e.
Point: y=elne=e, so (e,e).
Product rule: dydx=1·lnx+x·1x=lnx+1, so the gradient is lne+1=2.
Two functions multiplied: x and lnx.
y−e=2(x−e)⇒y=2x−e
On your TI-Nspire Calculator tricks →

To check a derivative, graph your answer and the calculator's numerical derivative together: on a Graphs page enter f2(x)=nDeriv(f1(x),x) (from the Calculus menu). If the two graphs match, your derivative is right.

3Explore it

Choose a function. The green curve is its derivative. Move x: the gradient of the tangent (navy curve) is the height of the green curve.

★HL extension

Extra depth for HL: harder worked examples and HL-standard exam questions.

HL differentiation questions combine several rules in one function, ask you to verify that a function satisfies a differential equation, and use logarithms to differentiate functions such as xx. More derivatives (tan, sec, ax, inverse trig) are on Further derivatives.

Verifying a differential equation

Worked example H1Paper 1
Show that y=e2xsin3x satisfies d2ydx2−4dydx+13y=0.
y′=e2x(2sin3x+3cos3x)
y′′=e2x(4sin3x+6cos3x)+e2x(6cos3x−9sin3x)=e2x(−5sin3x+12cos3x)
y′′−4y′+13y=e2x[(−5−8+13)sin3x+(12−12)cos3x]=0
Collect the sin and cos terms separately.

Logarithmic differentiation

For a variable raised to a variable power, take logarithms first, then differentiate implicitly.

Worked example H2Paper 1
Differentiate y=xx, x>0, and find the x-coordinate of its stationary point.
lny=xlnx
1ydydx=lnx+1⇒dydx=xx(lnx+1)
Stationary when lnx=−1⇒x=1e

HL exam-style questions

Question 1Paper 1[6 marks]

Let y=e2xsin3x.

  • (a)Find dydx.[2]
  • (b)Show that d2ydx2−4dydx+13y=0.[4]
(a)
product ruleM1
e2x(2sin3x+3cos3x)A1
(b)
attempt at second derivativeM1
e2x(−5sin3x+12cos3x)A1
substituting all three termsM1
=0AG A1
Question 2Paper 1[5 marks]

Let f(x)=xx, x>0.

  • (a)Use logarithmic differentiation to show that f′(x)=xx(1+lnx).[3]
  • (b)Find the exact coordinates of the stationary point.[2]
(a)
lny=xlnxM1
1yy′=lnx+1A1
y′=xx(1+lnx)AG A1
(b)
x=e−1A1
y=e−1/eA1

4Common mistakes & exam tips

Common mistakes

  • Forgetting to multiply by the derivative of the inside (chain rule).
  • Writing ddx(cosx)=sinx: it is −sinx.
  • Getting the quotient rule numerator the wrong way round: it starts with vu′.
  • Differentiating a product by multiplying the derivatives.
  • Using degree mode for trig derivatives.

Exam tips

  • Write down u, v, u′ and v′ before using the product or quotient rule.
  • Simplify and factorise your derivative: the next part of the question usually needs it.
  • ln(ax) differentiates to 1x: ln(ax)=lna+lnx.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Differentiate xsinx.
sinx+xcosx
FluencyP2
Differentiate 4x+1.
12(4x+1)−12×4=24x+1
FluencyP3
Differentiate 3x−2x+1.
3(x+1)−(3x−2)(x+1)2=5(x+1)2
FluencyP4
Differentiate cos2x.
2cosx(−sinx)=−sin2x
Problem solvingP5
Differentiate e−2xcosx.
−2e−2xcosx−e−2xsinx=−e−2x(2cosx+sinx)
Problem solvingP6
Show that the derivative of x2x+1 is x(x+2)(x+1)2.
2x(x+1)−x2(x+1)2=x2+2x(x+1)2=x(x+2)(x+1)2

6Exam-style questions

Original questions in the style of the IB exam, with full markschemes. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

  • (a)Differentiate y=(3x2−1)4.[2]
  • (b)Differentiate y=x3lnx.[2]
  • (c)Differentiate y=exx.[2]
(a)
4(3x2−1)3×6xM1
24x(3x2−1)3A1
(b)
3x2lnx+x3·1xM1
3x2lnx+x2A1
(c)
xex−exx2M1
ex(x−1)x2A1
Question 2Paper 1[5 marks]

f(x)=e2xsinx.

  • (a)Find f′(x).[3]
  • (b)Find the gradient of the graph of f at x=0.[2]
(a)
Product rule with u=e2x, v=sinxM1
2e2xsinx+e2xcosxA1 A1
(b)
f′(0)=0+1M1
1A1
Question 3Paper 2[4 marks]

Find the equation of the tangent to y=xlnx at the point where x=e.

y=e at x=eA1
dydx=lnx+1=2M1 A1
y=2x−eA1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real IB questions. Your school or teacher will have these papers.

PaperQuestionFocusDifficulty
May 2025 · TZ2 · Paper 2Q3Use a derivative to find where a function decreases and is concave-up★☆☆
May 2025 · TZ3 · Paper 2Q5Find derivative expression and parameter from a tangent's angle★★☆
Nov 2021 · Paper 1Q5Use tangent info and composite function to find tangent of h★★☆
May 2024 · TZ2 · Paper 2Q9Find constants from a local minimum and vertical asymptote of a curve★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake