Skip to main content
ExamExplained
NSW · Maths Advanced
Maths Advanced study scene
§-Syllabus dot point
NSWMaths AdvancedSyllabus dot point

How do we differentiate functions built from products, quotients and compositions of standard functions?

Apply the product, quotient and chain rules, and differentiate exponential, logarithmic and trigonometric functions

A focused answer to the HSC Maths Advanced dot point on differentiation rules. The power, chain, product and quotient rules, plus derivatives of exponential, logarithmic and trigonometric functions, with worked examples and exam traps.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

What this dot point is asking

NESA wants you to differentiate any function built from the standard library (polynomials, exe^x, lnx\ln x, sinx\sin x, cosx\cos x, tanx\tan x) using the power, chain, product and quotient rules. Almost every Maths Advanced calculus question begins with a differentiation step, so fluency here is non-negotiable.

The answer

The power rule

For any real nn,

ddx(xn)=nxn1.\frac{d}{dx}(x^n) = n x^{n - 1}.

This extends to negative and fractional powers. For example, ddx(x2)=2x3\frac{d}{dx}(x^{-2}) = -2 x^{-3} and ddx(x)=12x1/2\frac{d}{dx}(\sqrt{x}) = \frac{1}{2}x^{-1/2}.

The chain rule

If y=f(g(x))y = f(g(x)), let u=g(x)u = g(x) so y=f(u)y = f(u). Then

dydx=dydududx.\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}.

In practice, "differentiate the outside, leave the inside alone, then multiply by the derivative of the inside".

The product rule

If y=u(x)v(x)y = u(x) v(x), then

dydx=uv+uv.\frac{dy}{dx} = u' v + u v'.

The quotient rule

If y=u(x)v(x)y = \frac{u(x)}{v(x)}, then

dydx=uvuvv2.\frac{dy}{dx} = \frac{u' v - u v'}{v^2}.

Standard derivatives

Memorise these. They appear in nearly every paper.

ddx(ex)=ex,ddx(ef(x))=f(x)ef(x).\frac{d}{dx}(e^x) = e^x, \qquad \frac{d}{dx}(e^{f(x)}) = f'(x) e^{f(x)}.

ddx(lnx)=1x,ddx(lnf(x))=f(x)f(x).\frac{d}{dx}(\ln x) = \frac{1}{x}, \qquad \frac{d}{dx}(\ln f(x)) = \frac{f'(x)}{f(x)}.

ddx(sinx)=cosx,ddx(cosx)=sinx,ddx(tanx)=sec2x.\frac{d}{dx}(\sin x) = \cos x, \qquad \frac{d}{dx}(\cos x) = -\sin x, \qquad \frac{d}{dx}(\tan x) = \sec^2 x.

For composed trig, the chain rule gives ddx(sin(f(x)))=f(x)cos(f(x))\frac{d}{dx}(\sin(f(x))) = f'(x) \cos(f(x)), and similarly for cos\cos and tan\tan.

What the derivative means

Every differentiation rule is a tool for finding f(x)f'(x), the instantaneous rate of change of ff, which is also the gradient of the tangent to y=f(x)y = f(x) at each point. The first-principles definition behind every rule is

f(x)=limh0f(x+h)f(x)h.f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}.

NESA can ask you to differentiate from first principles for a simple polynomial, so you should be able to set up this limit, expand f(x+h)f(x + h), cancel the hh in the numerator, and take the limit. For all other functions you quote the standard rules above, which are themselves derived from this limit.

Seeing the derivative: from secant to tangent

The derivative is the gradient of the tangent, and the tangent is the limiting position of a secant. Watching that limit form is the single best way to understand what f(x)f'(x) measures. Fix a point PP on the curve y=f(x)y = f(x) and let a second point QQ slide towards it; the gradient of the line PQPQ is the average rate of change f(a+h)f(a)h\frac{f(a+h) - f(a)}{h}, and as h0h \to 0 it tends to the instantaneous rate of change at PP.

Stage 1, a wide secant. Place a fixed point PP at x=ax = a and a second point QQ a large horizontal distance hh to the right. The straight line through PP and QQ is a secant, and its gradient is the average rate of change between the two points, the rise divided by the run.

Stage 1: a wide secant line through two points on the curve The curve y equals f of x with a fixed point P. A second point Q sits a large horizontal distance h to the right. The straight secant line through P and Q has gradient equal to the average rate of change, the rise over the run, between the two points. x y P Q secant gradient = rise / run 1

Stage 2, slide QQ closer. Move QQ towards PP so the gap hh shrinks. The secant now hugs the curve more closely near PP, and its gradient is a better estimate of the gradient at PP itself.

Stage 2: Q slides towards P, shrinking h The same curve. Point Q has moved closer to P, so the horizontal gap h is smaller. The secant line now lies closer to the curve near P and its gradient is closer to the true gradient at P. x y P Q smaller h, secant nearer the curve 2

Stage 3, let h0h \to 0. As QQ slides almost on top of PP, the gap hh becomes tiny and the secant is barely distinguishable from a line that just grazes the curve at PP. The average rate of change is converging on a single number.

Stage 3: h shrinks towards zero The same curve with Q very close to P. The horizontal gap h is now tiny and the secant line is almost touching the curve at P, so its gradient is almost exactly the gradient at P. x y P Q h to 0: Q approaches P 3

Stage 4, the tangent is the limit. In the limit h0h \to 0, QQ merges with PP and the secant becomes the tangent at PP. Its gradient is the derivative f(a)f'(a), the instantaneous rate of change. Every rule on this page is a shortcut for computing exactly this limiting gradient.

Stage 4: the tangent at P is the limit The same curve. In the limit as h tends to zero, Q merges with P and the secant becomes the tangent line at P, drawn solid in the accent colour. Its gradient is the derivative f prime of a, the instantaneous rate of change at P. x y P tangent: m = f '(a) 4

Deciding which rule to use

The single most common student error is reaching for the wrong rule. Read the structure of the expression first.

  • A sum or difference of terms: differentiate each term separately.
  • A function raised to a power, or a function inside another function (a composition): chain rule.
  • Two functions multiplied together: product rule.
  • One function divided by another: quotient rule.

Many HSC expressions combine rules. For y=x2sin(2x)y = x^2 \sin(2x) you use the product rule on the outer multiplication and the chain rule on sin(2x)\sin(2x). Work from the outside in, naming each piece as you go.

Tangents and normals

Once you have f(x)f'(x), the gradient of the tangent at x=ax = a is m=f(a)m = f'(a). The tangent line is

yf(a)=f(a)(xa).y - f(a) = f'(a)(x - a).

The normal is perpendicular to the tangent, so its gradient is 1f(a)-\frac{1}{f'(a)} (provided f(a)0f'(a) \neq 0). These appear constantly in HSC questions: differentiate, evaluate the derivative at the point, then write the line equation.

Higher derivatives

Differentiating f(x)f'(x) again gives the second derivative f(x)f''(x), the rate of change of the gradient. For f(x)=x3f(x) = x^3, f(x)=3x2f'(x) = 3x^2 and f(x)=6xf''(x) = 6x. Higher derivatives drive concavity and motion problems, so the rules here feed directly into later calculus topics.

How exam questions ask about differentiation

The wording varies, but each version is a cue for a particular rule or follow-up:

  • "Differentiate" or "find dydx\frac{dy}{dx}". A direct rule application. Identify the structure (sum, composition, product, quotient) first, then apply the matching rule and simplify.
  • "Differentiate from first principles". Set up f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}, expand f(x+h)f(x+h), cancel the hh, and take the limit. NESA reserves this for simple polynomials, but you must show the limit, not quote the power rule.
  • "Find the gradient of the curve at x=ax = a". Differentiate, then substitute x=ax = a into f(x)f'(x). The number you get is the gradient of the tangent there.
  • "Find the equation of the tangent / normal at the point ...". Differentiate, evaluate f(a)f'(a) for the gradient, then use yf(a)=f(a)(xa)y - f(a) = f'(a)(x - a) for the tangent; for the normal use gradient 1f(a)-\frac{1}{f'(a)}.
  • "Show that dydx=\frac{dy}{dx} = \ldots". A "show that" answer must reach the printed result by valid steps; do not just assert it. Pick up the marks by displaying the rule used and every simplification.
  • A derivative buried in a larger question. Most calculus questions open with a differentiation step that feeds a later part (stationary points, rates, areas). Get it right and factored, because every later mark depends on it.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2022 HSC Q113 marksDifferentiate y=(3x2+1)5y = (3x^2 + 1)^5 with respect to xx.
Show worked answer →

This is a composition, so use the chain rule. Let u=3x2+1u = 3x^2 + 1, so y=u5y = u^5.

dydu=5u4\frac{dy}{du} = 5u^4 and dudx=6x\frac{du}{dx} = 6x.

dydx=dydududx=5(3x2+1)46x=30x(3x2+1)4\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 5(3x^2 + 1)^4 \cdot 6x = 30x(3x^2 + 1)^4.

Markers reward identifying the inner and outer functions, applying the chain rule cleanly, and presenting the final answer in factored form.

2020 HSC Q123 marksFind the derivative of f(x)=x2lnxf(x) = x^2 \ln x.
Show worked answer →

Use the product rule with u=x2u = x^2 and v=lnxv = \ln x.

u=2xu' = 2x and v=1xv' = \frac{1}{x}.

f(x)=uv+uv=2xlnx+x21x=2xlnx+xf'(x) = u' v + u v' = 2x \ln x + x^2 \cdot \frac{1}{x} = 2x \ln x + x.

Factor: f(x)=x(2lnx+1)f'(x) = x(2 \ln x + 1).

Markers expect explicit labelling of uu, vv and their derivatives, correct application of the rule, and a tidy final answer.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation2 marksDifferentiate y=(2x+5)7y = (2x + 5)^7 with respect to xx.
Show worked solution →

Recognise a composition, so use the chain rule. Let u=2x+5u = 2x + 5, giving y=u7y = u^7.

dydu=7u6,dudx=2.\frac{dy}{du} = 7u^6, \qquad \frac{du}{dx} = 2.

Multiply the two rates.

dydx=dydududx=7(2x+5)62=14(2x+5)6.\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 7(2x + 5)^6 \cdot 2 = 14(2x + 5)^6.

Marker's note: one mark for the chain-rule setup (identifying u=2x+5u = 2x + 5 and differentiating the outer power), one for the correct final answer 14(2x+5)614(2x + 5)^6. Forgetting the inner factor of 22 and writing 7(2x+5)67(2x + 5)^6 is the standard slip that loses the second mark.

foundation2 marksDifferentiate f(x)=x3exf(x) = x^3 e^x using the product rule.
Show worked solution →

Name the two factors. Let u=x3u = x^3 and v=exv = e^x, so

u=3x2,v=ex.u' = 3x^2, \qquad v' = e^x.

Apply f=uv+uvf' = u'v + uv'.

f(x)=3x2ex+x3ex=x2ex(3+x).f'(x) = 3x^2 e^x + x^3 e^x = x^2 e^x(3 + x).

Marker's note: one mark for the correct product-rule expansion 3x2ex+x3ex3x^2 e^x + x^3 e^x, one for a tidy factored answer x2ex(3+x)x^2 e^x(3 + x). Markers award the method mark for correct u,v,u,vu, v, u', v' even if the factoring slips.

foundation3 marksDifferentiate y=2x1x2+3y = \dfrac{2x - 1}{x^2 + 3} using the quotient rule.
Show worked solution →

Set up the quotient rule. Let u=2x1u = 2x - 1 and v=x2+3v = x^2 + 3, so

u=2,v=2x.u' = 2, \qquad v' = 2x.

Apply uvuvv2\dfrac{u'v - uv'}{v^2}, keeping the order in the numerator.

dydx=2(x2+3)(2x1)(2x)(x2+3)2.\frac{dy}{dx} = \frac{2(x^2 + 3) - (2x - 1)(2x)}{(x^2 + 3)^2}.

Expand and simplify the numerator.

2x2+6(4x22x)=2x2+2x+6,2x^2 + 6 - (4x^2 - 2x) = -2x^2 + 2x + 6,

so

dydx=2x2+2x+6(x2+3)2.\frac{dy}{dx} = \frac{-2x^2 + 2x + 6}{(x^2 + 3)^2}.

Marker's note: one mark for the correct quotient-rule structure with uvu'v before uvuv', one for expanding the numerator correctly, one for the simplified final answer. Reversing the numerator to uvuvuv' - u'v flips every sign and loses the last two marks.

core3 marksFind the equation of the tangent to y=xlnxy = x \ln x at the point where x=1x = 1.
Show worked solution →

Find the point of contact. At x=1x = 1, y=1ln1=10=0y = 1 \cdot \ln 1 = 1 \cdot 0 = 0, so the tangent touches at (1,0)(1, 0).

Differentiate with the product rule. Let u=xu = x and v=lnxv = \ln x, so u=1u' = 1 and v=1xv' = \dfrac{1}{x}:

dydx=1lnx+x1x=lnx+1.\frac{dy}{dx} = 1 \cdot \ln x + x \cdot \frac{1}{x} = \ln x + 1.

Evaluate the gradient at x=1x = 1.

dydxx=1=ln1+1=0+1=1.\left.\frac{dy}{dx}\right|_{x=1} = \ln 1 + 1 = 0 + 1 = 1.

Write the line through (1,0)(1, 0) with gradient 11.

y0=1(x1)y=x1.y - 0 = 1(x - 1) \quad\Rightarrow\quad y = x - 1.

Marker's note: one mark for the product-rule derivative lnx+1\ln x + 1, one for evaluating the gradient as 11 at x=1x = 1, one for the correct tangent equation y=x1y = x - 1. Using ln1=1\ln 1 = 1 instead of 00 is the usual error.

core3 marksDifferentiate y=cosxx2y = \dfrac{\cos x}{x^2} and hence find the gradient of the curve at x=πx = \pi. Leave your answer in exact form.
Show worked solution →

Apply the quotient rule. Let u=cosxu = \cos x and v=x2v = x^2, so u=sinxu' = -\sin x and v=2xv' = 2x:

dydx=(sinx)(x2)(cosx)(2x)(x2)2=x2sinx2xcosxx4.\frac{dy}{dx} = \frac{(-\sin x)(x^2) - (\cos x)(2x)}{(x^2)^2} = \frac{-x^2 \sin x - 2x \cos x}{x^4}.

Cancel a factor of xx.

dydx=xsinx2cosxx3.\frac{dy}{dx} = \frac{-x \sin x - 2\cos x}{x^3}.

Substitute x=πx = \pi (radians). Here sinπ=0\sin \pi = 0 and cosπ=1\cos \pi = -1:

dydxx=π=π(0)2(1)π3=2π3.\left.\frac{dy}{dx}\right|_{x=\pi} = \frac{-\pi(0) - 2(-1)}{\pi^3} = \frac{2}{\pi^3}.

Marker's note: one mark for the quotient-rule setup, one for the simplified derivative, one for the exact value 2π3\dfrac{2}{\pi^3} using sinπ=0\sin \pi = 0 and cosπ=1\cos \pi = -1. Working in degrees, or slipping the sign of cosπ\cos \pi, breaks the final mark.

core3 marksThe displacement of a particle is x=t2etx = t^2 e^{-t} metres at time tt seconds, for t0t \ge 0. The velocity-time graph rises from the origin to a single peak and then falls back towards the time axis, never going below it. Using calculus, find the two times at which the velocity is zero and state what is happening to the particle at each.
Show worked solution →

Velocity is the derivative of displacement. Differentiate x=t2etx = t^2 e^{-t} with the product rule, letting u=t2u = t^2 and v=etv = e^{-t}, so u=2tu' = 2t and v=etv' = -e^{-t}:

v=dxdt=2tet+t2(et)=et(2tt2)=tet(2t).v = \frac{dx}{dt} = 2t\, e^{-t} + t^2(-e^{-t}) = e^{-t}(2t - t^2) = t\, e^{-t}(2 - t).

Solve v=0v = 0. Since et>0e^{-t} > 0 for all tt, the velocity is zero only when

t(2t)=0t=0 or t=2.t(2 - t) = 0 \quad\Rightarrow\quad t = 0 \text{ or } t = 2.

Interpret each time using the described graph. At t=0t = 0 the particle starts from rest at the origin (the velocity graph begins at the origin). At t=2t = 2 the velocity graph is at its single peak turning point, so the particle is momentarily at rest at the far end of its outward motion before slowing displacement growth; this is where displacement stops increasing as fast and the velocity has returned to zero.

Marker's note: one mark for the product-rule velocity v=tet(2t)v = t\,e^{-t}(2 - t), one for solving v=0v = 0 to t=0t = 0 and t=2t = 2 (using et0e^{-t} \neq 0), one for reading the graph to say the particle is at rest at both times. Cancelling or ignoring the ete^{-t} factor as if it could be zero is the trap.

exam5 marksA curve is defined by y=e2xxy = \dfrac{e^{2x}}{x} for x>0x > 0. (a) Show that dydx=e2x(2x1)x2\dfrac{dy}{dx} = \dfrac{e^{2x}(2x - 1)}{x^2}. (b) Hence find the coordinates of the stationary point and, using the sign of the derivative, justify that it is a minimum. (c) Show that at the stationary point y=2ey = 2e.
Show worked solution →

Part (a): differentiate with the quotient rule. Let u=e2xu = e^{2x} and v=xv = x. By the chain rule u=2e2xu' = 2e^{2x}, and v=1v' = 1:

dydx=uvuvv2=2e2xxe2x1x2.\frac{dy}{dx} = \frac{u'v - uv'}{v^2} = \frac{2e^{2x} \cdot x - e^{2x} \cdot 1}{x^2}.

Factor e2xe^{2x} out of the numerator:

dydx=e2x(2x1)x2,\frac{dy}{dx} = \frac{e^{2x}(2x - 1)}{x^2},

as required.

Part (b): locate the stationary point. Set dydx=0\dfrac{dy}{dx} = 0. Since e2x>0e^{2x} > 0 and x2>0x^2 > 0 for x>0x > 0, the only zero comes from

2x1=0x=12.2x - 1 = 0 \quad\Rightarrow\quad x = \tfrac{1}{2}.

The yy-coordinate is

y=e21/21/2=e11/2=2e,y = \frac{e^{2 \cdot 1/2}}{1/2} = \frac{e^{1}}{1/2} = 2e,

so the stationary point is (12,2e)\left(\tfrac{1}{2}, 2e\right).

Justify the minimum with a sign test. The factors e2xe^{2x} and x2x^2 are always positive for x>0x > 0, so the sign of dydx\dfrac{dy}{dx} follows the sign of (2x1)(2x - 1). For x<12x < \tfrac{1}{2}, (2x1)<0(2x - 1) < 0 so dydx<0\dfrac{dy}{dx} < 0 (falling); for x>12x > \tfrac{1}{2}, (2x1)>0(2x - 1) > 0 so dydx>0\dfrac{dy}{dx} > 0 (rising). The gradient changes from negative to positive, so (12,2e)\left(\tfrac{1}{2}, 2e\right) is a minimum.

Part (c): confirm the value. From part (b), y=e11/2=2ey = \dfrac{e^{1}}{1/2} = 2e, which is the required result.

Marker's note: one mark for the quotient-and-chain-rule derivative reaching the shown form in (a); one for solving dydx=0\dfrac{dy}{dx} = 0 to x=12x = \tfrac{1}{2}; one for the sign test either side confirming a minimum; one for the coordinates (12,2e)\left(\tfrac{1}{2}, 2e\right); one for showing y=2ey = 2e cleanly in (c). Forgetting the chain-rule factor of 22 on e2xe^{2x} derails part (a) and every mark after it.

exam4 marksA function is defined by f(x)=excosxf(x) = e^{-x}\cos x for 0x2π0 \le x \le 2\pi. (a) Show that f(x)=2exsinxf'(x) = 2e^{-x}\sin x. (b) Hence state the xx-values in 0x2π0 \le x \le 2\pi at which the graph of f(x)f(x) has possible points of inflection.
Show worked solution →

Part (a): differentiate twice. First derivative by the product rule with u=exu = e^{-x}, v=cosxv = \cos x, so u=exu' = -e^{-x}, v=sinxv' = -\sin x:

f(x)=excosx+ex(sinx)=ex(cosx+sinx).f'(x) = -e^{-x}\cos x + e^{-x}(-\sin x) = -e^{-x}(\cos x + \sin x).

Differentiate again, using the product rule on ex(cosx+sinx)-e^{-x}(\cos x + \sin x) with u=exu = -e^{-x} (so u=exu' = e^{-x}) and v=cosx+sinxv = \cos x + \sin x (so v=sinx+cosxv' = -\sin x + \cos x):

f(x)=ex(cosx+sinx)+(ex)(sinx+cosx).f''(x) = e^{-x}(\cos x + \sin x) + (-e^{-x})(-\sin x + \cos x).

Expand inside:

f(x)=ex[(cosx+sinx)(cosxsinx)]=ex(2sinx)=2exsinx,f''(x) = e^{-x}\big[(\cos x + \sin x) - (\cos x - \sin x)\big] = e^{-x}(2\sin x) = 2e^{-x}\sin x,

as required.

Part (b): possible inflections where f(x)=0f''(x) = 0. Since ex>0e^{-x} > 0 for all xx, we need sinx=0\sin x = 0. On 0x2π0 \le x \le 2\pi (radians),

sinx=0x=0,  π,  2π.\sin x = 0 \quad\Rightarrow\quad x = 0, \; \pi, \; 2\pi.

These are the xx-values where the concavity may change, so the possible points of inflection are at x=0x = 0, x=πx = \pi and x=2πx = 2\pi.

Marker's note: one mark for the first derivative ex(cosx+sinx)-e^{-x}(\cos x + \sin x), one for reaching f(x)=2exsinxf''(x) = 2e^{-x}\sin x, one for setting sinx=0\sin x = 0 using ex0e^{-x} \neq 0, one for all three solutions in the given domain. Working in degrees or dropping a solution at an endpoint costs the final mark.

ExamExplained