Mathematical Methods topic guides All topics

Unit 3 · Topic 2.2 · Differentiation of trigonometric functions and differentiation rules

Differentiation rules

You have already met the chain, product and quotient rules in the last three guides. In the external they get applied to exponentials, logs and trig all the time, so I have given them their own guide here. Tick off each skill once you can do it without help.

Skills in this topic

Differentiation rules, about 5 hours of class time. Only tick a skill when you could do it in an exam.

Try it yourself

Which rule do I need?

Before you differentiate anything, decide which rule the function needs. Most mistakes I see in this topic come from picking the wrong one. The algebra is rarely the problem. Choose a rule for each function below.

Part 1

The chain rule

Use the chain rule when one function sits inside another, like $\big(f(x)\big)^{n}$. The formal version substitutes $u$ for the inside function. The fast version does the same thing in one line.

The formal version
$$\frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}$$
The fast version
$$\frac{d}{dx}\big(f(x)\big)^{n}=n\times f'(x)\times\big(f(x)\big)^{n-1}$$

The fast way is very efficient, but keep the formal version in your head as well for the really tricky derivatives. If you also take Specialist, you need to understand both.

Watch the fast version

Practise

Exam questions: the chain rule

For the written-answer questions, the solutions show where each mark goes, based on the QCAA marking guides. Many marks allow follow-through: if an earlier step is wrong but you use your wrong answer correctly, you can still get the later marks. That is another reason to show every step.

2023 Paper 2, Question 9

Multiple choice · Technology-active · [1 mark]

If $f(x)=e^{3x}(x+1)^{2}$ and $f'(x)=ae^{3x}(x+1)$, determine the expression for $a$.

It is a product, and each part needs the chain rule. Let $u=e^{3x}$ and $v=(x+1)^{2}$, so $u'=3e^{3x}$ and $v'=2(x+1)$:

$$f'(x)=3e^{3x}(x+1)^{2}+2e^{3x}(x+1)$$

Take out the common factor $e^{3x}(x+1)$. What is left is $3(x+1)+2=3x+5$.

Answer
(A) $a=3x+5$

2023 Paper 2, Question 15

Short response · Technology-active · [4 marks]

Determine the derivative of $f(x)=\ln x^{2}+\ln(x-5)^{3}$. Express the derivative as a single fraction in its simplest and factorised form.

You could use the chain rule on each log, but the log laws make it much quicker. Bring the powers down first:

$$f(x)=2\ln x+3\ln(x-5)$$

Now differentiate each term.

$$f'(x)=\frac{2}{x}+\frac{3}{x-5}$$

1 markThe derivative of the first term, $\frac{2}{x}$.
1 markThe derivative of the second term, $\frac{3}{x-5}$. If you used the chain rule on each log instead of the log laws, that is fine.

Now make it a single fraction:

$$f'(x)=\frac{2(x-5)+3x}{x(x-5)}=\frac{5x-10}{x(x-5)}$$

1 markCombining into one fraction. You can still earn this if a derivative above was wrong, as long as you combine your fractions correctly.

Then factorise the top.

Answer
$f'(x)=\dfrac{5(x-2)}{x(x-5)}$
1 markSimplest, factorised form. Equivalent layouts are accepted.

2021 Paper 1, Question 11(a)

Short response · Technology-free · [2 marks]

Determine the derivative with respect to $x$ of $y=\left(e^{x}+1\right)^{3}$.

This is a function raised to a power, so use the chain rule, with $f(x)=e^{x}+1$ and $n=3$. Bring the power down, multiply by the derivative of the inside, then drop the power by one.

1 markShowing you are using the chain rule. Writing $\frac{dy}{du}\times\frac{du}{dx}$ with $u=e^{x}+1$ also counts.

$$\frac{dy}{dx}=3\times e^{x}\times\left(e^{x}+1\right)^{2}$$

Answer
$\dfrac{dy}{dx}=3e^{x}\left(e^{x}+1\right)^{2}$
1 markThe correct derivative.

2020 Paper 1, Question 11(a)

Short response · Technology-free · [1 mark]

Determine the derivative with respect to $x$ of $y=\dfrac{1}{\sin(x)}$.

It looks like a quotient, but the top is just 1. Rewrite it as a power and the chain rule is faster: $y=(\sin x)^{-1}$.

$$\frac{dy}{dx}=-1\times\cos x\times(\sin x)^{-2}$$

Answer
$\dfrac{dy}{dx}=-\dfrac{\cos x}{\sin^{2}x}$
1 markThe correct derivative. Equivalent forms like $-\cos x\,(\sin x)^{-2}$ are accepted.

Part 2

The product rule

Use the product rule when two functions are multiplied together. Your formula sheet writes it one way, and we have mostly used the other in class. They mean exactly the same thing, but make sure you recognise both before the exam.

On your formula sheet
$$\frac{d}{dx}(uv)=u\frac{dv}{dx}+v\frac{du}{dx}$$
The way we write it in class
$$\frac{d}{dx}(uv)=uv'+vu'$$

For the product rule, it does not matter which function you call $u$ and which you call $v$. The two terms are added, so the order makes no difference.

Watch it first

Where the two terms come from

uv u v vΔu uΔv Δu Δv area = uv a rectangle with sides u and v x grows a little, so u and v grow too extra ≈ vΔu + uΔv the tiny grey corner shrinks to nothing so (uv)′ = vu′ + uv′

Divide the extra area by the small change in $x$ and let it shrink to zero. The two strips become $vu'$ and $uv'$. That is why the product rule has two terms, one for each function changing.

Practise

Exam questions: the product rule

2024 Paper 1, Question 6

Multiple choice · Technology-free · [1 mark]

Differentiate $y=\ln(x)\cos(x)$ with respect to $x$.

Let $u=\ln x$ and $v=\cos x$, so $u'=\frac{1}{x}$ and $v'=-\sin x$. That minus sign is the whole difference between (C) and (D).

$$\frac{dy}{dx}=\ln x\,(-\sin x)+\cos x\cdot\frac{1}{x}$$

Answer
(D) $\dfrac{\cos(x)}{x}-\ln(x)\sin(x)$

2024 Paper 2, Question 6

Multiple choice · Technology-active · [1 mark]

Determine the derivative of $y=2x\cos(3x)$.

Let $u=2x$ and $v=\cos(3x)$, so $u'=2$ and, with the chain rule, $v'=-3\sin(3x)$. (C) differentiates each part and multiplies them, which is not the product rule.

$$\frac{dy}{dx}=2x\left(-3\sin(3x)\right)+\cos(3x)\cdot 2$$

Answer
(A) $2\cos(3x)-6x\sin(3x)$

2022 Paper 1, Question 13(c)

Short response · Technology-free · [5 marks]

Determine the second derivative of $h(x)=x\sin(x)$. Give your answer in simplest form.

You need the product rule twice. First, with $u=x$ and $v=\sin x$:

1 markUsing the product rule for the first derivative.

$$h'(x)=x\cos x+\sin x$$

1 markThe correct first derivative.

Now differentiate again. The first term is another product, and the second is just $\cos x$. You differentiate a sum one term at a time.

1 markUsing the product rule again, and differentiating the sum term by term.

$$h''(x)=\big(x(-\sin x)+\cos x\big)+\cos x$$

1 markThe second derivative, before simplifying.

Collect the two $\cos x$ terms for simplest form.

Answer
$h''(x)=2\cos x-x\sin x$
1 markSimplest form.

2020 Paper 1, Question 5

Multiple choice · Technology-free · [1 mark]

The equation of the tangent to the curve $f(t)=te^{t}$ at $t=1$ is

A tangent needs a point and a gradient. The point is $f(1)=e$. For the gradient, use the product rule with $u=t$ and $v=e^{t}$:

$$f'(t)=te^{t}+e^{t},\qquad f'(1)=2e$$

Then $y-e=2e(t-1)$, which tidies up to $y=2et-e$.

Answer
(B) $y=2et-e$

2020 Paper 1, Question 11(b)

Short response · Technology-free · [2 marks]

Determine the derivative with respect to $x$ of $y=x^{2}\times e^{-x}$. Express your answer in factorised form.

Let $u=x^{2}$ and $v=e^{-x}$, so $u'=2x$ and $v'=-e^{-x}$:

$$\frac{dy}{dx}=x^{2}\left(-e^{-x}\right)+e^{-x}\cdot 2x$$

1 markThe derivative in expanded form.

The question asks for factorised form, so take out $xe^{-x}$. Stopping before this step loses you a mark.

Answer
$\dfrac{dy}{dx}=xe^{-x}(2-x)$
1 markFactorised form. $e^{-x}(2x-x^{2})$ and $xe^{-x}(-x+2)$ are also accepted, and you can still get this mark by factorising a wrong derivative correctly.

Part 3

The quotient rule

Use the quotient rule when one function is divided by another. Again, the formula sheet and our class version look different but mean the same thing.

On your formula sheet
$$\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{v^{2}}$$
The way we write it in class
$$\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{vu'-uv'}{v^{2}}$$

Unlike the product rule, here it matters which function is which, because of the subtraction. $v$ is always the denominator of the original expression. Get that right and the rest follows.

Watch the top get built

Practise

Exam questions: the quotient rule

2022 Paper 1, Question 13(b)

Short response · Technology-free · [3 marks]

Given that $g(x)=\dfrac{\ln(x)}{x}$, determine the simplest value of $g'(e)$.

It is one function divided by another, so use the quotient rule. The denominator is $x$, so $v=x$ and $u=\ln x$. Then $u'=\frac{1}{x}$ and $v'=1$:

1 markUsing the quotient rule. The product rule on $x^{-1}\ln x$ is accepted too.

$$g'(x)=\frac{x\cdot\frac{1}{x}-\ln x\cdot 1}{x^{2}}=\frac{1-\ln x}{x^{2}}$$

1 markThe correct derivative.

Now substitute $x=e$. Since $\ln e=1$, the numerator is $0$.

$$g'(e)=\frac{1-\ln e}{e^{2}}=\frac{0}{e^{2}}=0$$

Answer
$g'(e)=0$
1 markThe value at $x=e$. You can still get this mark by substituting into a wrong derivative correctly.

2021 Paper 1, Question 11(b)

Short response · Technology-free · [3 marks]

Determine the derivative with respect to $x$ of $y=\dfrac{\sin(x)}{x^{2}}$. Give your answer in simplest form.

It is one function divided by another, so use the quotient rule. The denominator is $x^{2}$, so $v=x^{2}$ and $u=\sin x$:

1 markUsing the quotient rule. The product rule is accepted too.

$$\frac{dy}{dx}=\frac{x^{2}\cos x-2x\sin x}{x^{4}}$$

1 markThe correct derivative.

"Simplest form" is worth a mark here. Every term on top has a factor of $x$, so cancel one $x$ from the top and bottom.

Answer
$\dfrac{dy}{dx}=\dfrac{x\cos x-2\sin x}{x^{3}}$
1 markSimplest form. Splitting it as $\frac{\cos x}{x^{2}}-\frac{2\sin x}{x^{3}}$ is accepted, and you can still get this mark by simplifying a wrong derivative correctly.

Game plan

Your game plan for choosing a rule

Ask yourself these, in order, before you start differentiating. Try them on the functions in the sorter at the top.

  1. 1Can I simplify first? Log laws and index laws often turn a hard rule into an easy one.
  2. 2Is one function divided by another? Use the quotient rule, with $v$ as the denominator. If the top is a constant, rewrite it as a power and use the chain rule instead.
  3. 3Are two functions of $x$ multiplied together? Use the product rule.
  4. 4Is there a function inside another, like a bracket to a power or $e$, $\ln$, $\sin$ or $\cos$ of something other than plain $x$? Use the chain rule on that part.
  5. 5Read the end of the question. If it asks for simplest or factorised form, there is a mark for doing that last step.

Practice

Practice questions

Eight questions of my own, covering every skill. Each one is labelled with the skill it practises, so if one goes wrong you know which part of the guide to go back to. For the first six, the rule is in the label. For the last two, deciding which rule goes on the outside is part of the question.

Question 1 of 8

Skill 1: the chain rule · Technology-free · [2 marks]

Determine $f'(x)$ for $f(x)=\sqrt{e^{2x}+1}$, giving your answer in simplest form.

1Rewrite the square root as a power: $f(x)=\left(e^{2x}+1\right)^{\frac{1}{2}}$. The inside is $e^{2x}+1$, and its derivative is $2e^{2x}$.
2Use the fast version: bring the power down, multiply by the derivative of the inside, and drop the power by one.

$$f'(x)=\frac{1}{2}\times 2e^{2x}\times\left(e^{2x}+1\right)^{-\frac{1}{2}}$$

3The $\frac{1}{2}$ and the 2 cancel, and the negative power puts the bracket back under a square root in the denominator.
Answer
$f'(x)=\dfrac{e^{2x}}{\sqrt{e^{2x}+1}}$

Question 2 of 8

Skill 1: the chain rule · Multiple choice · Technology-free · [1 mark]

The derivative of $\ln(\cos x)$ with respect to $x$ is

The inside is $\cos x$, and its derivative is $-\sin x$. The rule for $\ln f(x)$ gives $\dfrac{f'(x)}{f(x)}=\dfrac{-\sin x}{\cos x}=-\tan x$. Option (A) has forgotten the chain rule, and (C) has lost the minus sign from differentiating $\cos x$.

Answer
(B) $-\tan x$

Question 3 of 8

Skill 2: the product rule · Technology-free · [2 marks]

Determine $\dfrac{dy}{dx}$ for $y=x^{3}\ln x$, giving your answer in factorised form.

1Two functions are multiplied, so use the product rule. Let $u=x^{3}$ and $v=\ln x$, so $u'=3x^{2}$ and $v'=\dfrac{1}{x}$.
2Substitute into $uv'+vu'$.

$$\frac{dy}{dx}=x^{3}\times\frac{1}{x}+\ln x\times 3x^{2}=x^{2}+3x^{2}\ln x$$

3Both terms have $x^{2}$ in them, so take it out as a common factor.
Answer
$\dfrac{dy}{dx}=x^{2}\left(1+3\ln x\right)$

Question 4 of 8

Skill 2: the product rule · Technology-free · [3 marks]

Determine the exact gradient of the curve $y=e^{-2x}\cos x$ at $x=\dfrac{\pi}{2}$.

1Let $u=e^{-2x}$ and $v=\cos x$. The chain rule gives $u'=-2e^{-2x}$, and $v'=-\sin x$.
2Substitute into $uv'+vu'$, then factorise.

$$\frac{dy}{dx}=e^{-2x}(-\sin x)+\cos x\left(-2e^{-2x}\right)=-e^{-2x}\left(\sin x+2\cos x\right)$$

3Substitute $x=\dfrac{\pi}{2}$. Here $\sin\dfrac{\pi}{2}=1$ and $\cos\dfrac{\pi}{2}=0$.

$$\frac{dy}{dx}=-e^{-\pi}\left(1+0\right)=-e^{-\pi}$$

Factorising first makes the substitution much tidier. It also means only one exponential to evaluate.

Answer
$-e^{-\pi}$

Question 5 of 8

Skill 3: the quotient rule · Technology-free · [4 marks]

Let $y=\dfrac{\ln x}{x}$ for $x>0$. Show that $\dfrac{dy}{dx}=\dfrac{1-\ln x}{x^{2}}$, then determine the exact coordinates of the point where the tangent to the curve is horizontal.

1Use the quotient rule. $v$ is the denominator, so $v=x$ and $u=\ln x$. That gives $u'=\dfrac{1}{x}$ and $v'=1$.
2Substitute into $\dfrac{vu'-uv'}{v^{2}}$.

$$\frac{dy}{dx}=\frac{x\times\frac{1}{x}-\ln x\times 1}{x^{2}}=\frac{1-\ln x}{x^{2}}$$

That matches the expression in the question. In a "show that", the working is the answer, so write every line.

3A horizontal tangent means the gradient is zero. A fraction is zero when its numerator is zero.

$$1-\ln x=0\quad\Rightarrow\quad \ln x=1\quad\Rightarrow\quad x=e$$

4Substitute $x=e$ into the original function to find $y$, remembering $\ln e=1$.

$$y=\frac{\ln e}{e}=\frac{1}{e}$$

Answer
$\left(e,\ \dfrac{1}{e}\right)$

Question 6 of 8

Skill 3: the quotient rule · Multiple choice · Technology-free · [1 mark]

If $y=\dfrac{e^{x}}{e^{x}+1}$, then $\dfrac{dy}{dx}$ is

Here $u=e^{x}$ and $v=e^{x}+1$, and both derivatives are $e^{x}$. The top is $vu'-uv'=\left(e^{x}+1\right)e^{x}-e^{x}\times e^{x}=e^{x}$, so the answer is $\dfrac{e^{x}}{\left(e^{x}+1\right)^{2}}$. Option (B) has the subtraction the wrong way round, (C) divides the derivatives instead of using the rule, and (D) adds instead of subtracting.

Answer
(A) $\dfrac{e^{x}}{\left(e^{x}+1\right)^{2}}$

Question 7 of 8

Skill 4: combining the rules · Technology-free · [3 marks]

Determine $\dfrac{dy}{dx}$ for $y=xe^{x^{2}}$, giving your answer in factorised form.

1Two functions are multiplied, so the product rule is the outside rule. Let $u=x$ and $v=e^{x^{2}}$.
2$v$ needs the chain rule: $v'=2xe^{x^{2}}$. And $u'=1$.
3Substitute into $uv'+vu'$.

$$\frac{dy}{dx}=x\times 2xe^{x^{2}}+e^{x^{2}}\times 1=2x^{2}e^{x^{2}}+e^{x^{2}}$$

4Take out the common factor $e^{x^{2}}$.
Answer
$\dfrac{dy}{dx}=e^{x^{2}}\left(2x^{2}+1\right)$

Question 8 of 8

Skill 4: combining the rules · Technology-active · [5 marks]

The concentration of a medicine in a patient's blood is modelled by $C(t)=20te^{-0.4t}$, where $C$ is in mg/L and $t$ is the time in hours after the dose.
(a) Determine the rate at which the concentration is changing 3 hours after the dose. [2 marks]
(b) Determine when the concentration is greatest, and the greatest concentration. [3 marks]

1For (a), differentiate with the product rule. Let $u=20t$ and $v=e^{-0.4t}$, so $u'=20$ and, by the chain rule, $v'=-0.4e^{-0.4t}$.

$$C'(t)=20t\left(-0.4e^{-0.4t}\right)+e^{-0.4t}\times 20=e^{-0.4t}\left(20-8t\right)$$

2Substitute $t=3$. You can do this on your calculator.

$$C'(3)=e^{-1.2}\left(20-24\right)\approx -1.20$$

The negative sign matters. It tells you the concentration is falling at this time, so say so.

3For (b), set $C'(t)=0$. Since $e^{-0.4t}$ is never zero, the bracket must be zero: $20-8t=0$, so $t=2.5$.
4Check it is a maximum. $C'(t)$ is positive just before $t=2.5$ and negative just after, so the concentration rises and then falls.
5Substitute $t=2.5$ into the original model. Do not use the derivative.

$$C(2.5)=20\times 2.5\times e^{-1}\approx 18.39$$

Answer
(a) Falling at about 1.20 mg/L per hour
(b) Greatest after 2.5 hours, at about 18.39 mg/L

Keep practising

Ready for something harder?

In 2021 Paper 2, Question 18 you differentiate a logistic model, which is a quotient with a chain rule inside. The walkthrough lets you drag a tangent along the curve to find where the growth peaks.

Past questions and marking-guide steps are from the 2020–2024 QCAA Mathematical Methods external assessments, © State of Queensland (QCAA) 2020–2024, licensed under CC BY 4.0, and have been adapted. Tangent Tuition is not affiliated with the QCAA.