24.2 The Derivative and Basic Rules

SL 5.3

In this section you will learn
  • how the gradient of a curve at a point is the limit of the gradients of chords
  • the notation \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\), \(f'(x)\) and \(\dfrac{\mathrm{d}}{\mathrm{d}x}\big[f(x)\big]\) for the derivative
  • the power rule: the derivative of \(x^n\) is \(nx^{n-1}\)
  • the constant multiple rule, the constant rule, and the sum and difference rules
  • how to find the gradient of a curve at a given point

The gradient of a curve

This section uses the idea of a limit from 24.1.

You already know how to find the gradient of a straight line. A curve is different: its steepness changes from point to point. We define the gradient of a curve at a point \(P\) as the gradient of the tangent at \(P\).

To find it, take a second point \(Q\) on the curve and draw the chord \(PQ\). As \(Q\) moves along the curve towards \(P\), the chord turns and gets closer and closer to the tangent at \(P\) (Figure 1).

Figure 1: As \(Q\) moves towards \(P\), the chords \(PQ\) approach the tangent at \(P\).

For example, take \(P(2,\,4)\) on \(y = x^2\) and let \(Q\) have \(x\)-coordinate \(2 + h\).

\(x\)-coordinate of \(Q\) \(2.1\) \(2.01\) \(2.001\)
gradient of \(PQ = \dfrac{(2 + h)^2 - 4}{h}\) \(4.1\) \(4.01\) \(4.001\)

The gradients get closer and closer to \(4\). We say that the limit of the gradient of \(PQ\) is \(4\), so the gradient of the curve at \(P\) is \(4\).

The general point

Now let \(P(x,\,y)\) be any point on \(y = x^2\). Let \(\delta x\) (read “delta \(x\)”; \(\delta\) is the Greek letter delta) be a small change in \(x\) and \(\delta y\) the matching change in \(y\). Then \(Q(x + \delta x,\; y + \delta y)\) is also on the curve, so

\[ y + \delta y = (x + \delta x)^2 = x^2 + 2x\,\delta x + (\delta x)^2 . \]

Subtract \(y = x^2\): \(\;\delta y = 2x\,\delta x + (\delta x)^2\). So the gradient of \(PQ\) is

\[ \frac{\delta y}{\delta x} = \frac{2x\,\delta x + (\delta x)^2}{\delta x} = 2x + \delta x . \]

As \(Q \to P\), \(\delta x \to 0\), and the gradient of \(PQ\) tends to \(2x\):

\[ \lim_{\delta x \to 0} \frac{\delta y}{\delta x} = \lim_{\delta x \to 0} (2x + \delta x) = 2x . \]

So the gradient of \(y = x^2\) at any point is \(2x\). At \(x = 2\) this gives \(4\), as in the table.

The derivative

The expression \(2x\) is called the gradient function or the derivative of \(y = x^2\) with respect to \(x\).

The derivative In the HL formula booklet

For a function \(y = f(x)\), the derivative is defined by the limit

\[ y = f(x) \quad\Rightarrow\quad \frac{\mathrm{d}y}{\mathrm{d}x} = f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} \]

(if the limit exists). With \(\delta x\) in place of \(h\), as in the work above: \(\;f'(x) = \displaystyle\lim_{\delta x \to 0} \frac{f(x + \delta x) - f(x)}{\delta x}\).

The derivative is written \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\), \(y'\), \(f'(x)\) or \(\dfrac{\mathrm{d}}{\mathrm{d}x}\big[f(x)\big]\). The gradient of the curve \(y = f(x)\) at the point \((x_0,\,y_0)\) is \(f'(x_0)\).

  • \(h\): a small change in \(x\) (it tends to 0)
  • \(\delta x\): a small change in \(x\) (the same role as \(h\))
  • \((x_0,\,y_0)\): a point on the curve

Finding a derivative directly from this limit is called differentiation from first principles. It is part of the HL course AHL 5.12 and is studied fully in Unit 26. Here is one example to show the idea.

Example 1 AHL 5.12 Use differentiation from first principles to find \(f'(x)\) for \(f(x) = x^3 - 5x\).

\[ \begin{aligned} f(x + h) - f(x) &= (x + h)^3 - 5(x + h) - (x^3 - 5x) \\ &= x^3 + 3x^2h + 3xh^2 + h^3 - 5x - 5h - x^3 + 5x \\ &= 3x^2h + 3xh^2 + h^3 - 5h . \end{aligned} \]

Divide by \(h\) (with \(h \neq 0\)): \(\;\dfrac{f(x + h) - f(x)}{h} = 3x^2 + 3xh + h^2 - 5\).

\[ f'(x) = \lim_{h \to 0} \left(3x^2 + 3xh + h^2 - 5\right) = 3x^2 - 5 . \]

The power rule

Using first principles every time is slow. Instead we use rules for differentiation. Finding a derivative is called differentiation. The first rule is for powers of \(x\).

The power rule In the formula booklet

\[ f(x) = x^n \quad\Rightarrow\quad f'(x) = nx^{n-1} \]

So if \(y = x^n\), then \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = nx^{n-1}\). Bring the power down, then reduce the power by 1. This is true for every rational number \(n\) (integers in SL 5.3, fractions in SL 5.6).

  • \(n\): the power (exponent), any rational number

Before you differentiate, write roots and fractions as powers of \(x\): \(\sqrt{x} = x^{\frac{1}{2}}\), \(\;\sqrt[3]{x^2} = x^{\frac{2}{3}}\), \(\;\dfrac{1}{x^4} = x^{-4}\).

Example 2 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) if

(a) \(y = x^{23}\)

(b) \(y = \dfrac{1}{x^7}\)

(c) \(y = \sqrt[4]{x^3}\)

(a) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 23x^{22}\).

(b) \(y = x^{-7}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = -7x^{-8} = -\dfrac{7}{x^8}\).

(c) \(y = x^{\frac{3}{4}}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{3}{4}x^{-\frac{1}{4}} = \dfrac{3}{4\sqrt[4]{x}}\).

The constant multiple rule

What happens when a function is multiplied by a constant \(k\)? From the definition,

\[ \frac{\mathrm{d}}{\mathrm{d}x}\big[k f(x)\big] = \lim_{\delta x \to 0} \frac{k f(x + \delta x) - k f(x)}{\delta x} = k \lim_{\delta x \to 0} \frac{f(x + \delta x) - f(x)}{\delta x} = k f'(x) . \]

The constant multiple rule Not in the formula booklet

\[ \frac{\mathrm{d}}{\mathrm{d}x}\big[k f(x)\big] = k\,\frac{\mathrm{d}}{\mathrm{d}x}\big[f(x)\big] \qquad\text{so}\qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(ax^n\right) = anx^{n-1} \]

  • \(k\): a constant
  • \(a\): a constant (the coefficient of \(x^n\))
  • \(n\): the power (exponent)

The constant rule

The graph of \(y = k\) (\(k\) a constant) is a horizontal line, so its gradient is \(0\) everywhere. We can also see this from the rules above: \(k = kx^0\), so

\[ \frac{\mathrm{d}}{\mathrm{d}x}(k) = \frac{\mathrm{d}}{\mathrm{d}x}\left(kx^0\right) = k \times 0x^{-1} = 0 . \]

The constant rule Not in the formula booklet

If \(y = k\), where \(k\) is a constant, then \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 0\).

Example 3 (a) Given that \(y = 5x^{-4}\), find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\).

(b) Given that \(y = \dfrac{3}{5}\sqrt[3]{x^5}\), find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\).

(a) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 5 \times (-4)x^{-5} = -20x^{-5} = -\dfrac{20}{x^5}\).

(b) \(y = \dfrac{3}{5}x^{\frac{5}{3}}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{3}{5} \times \dfrac{5}{3}x^{\frac{2}{3}} = x^{\frac{2}{3}} = \sqrt[3]{x^2}\).

The sum and difference rules

To differentiate expressions such as \(4x^3 - 2x + 9\) or \(\sqrt{x} + \dfrac{1}{x}\), we differentiate term by term.

The sum and difference rules Not in the formula booklet

If \(u\) and \(v\) are functions of \(x\), then

\[ \frac{\mathrm{d}}{\mathrm{d}x}(u + v) = \frac{\mathrm{d}u}{\mathrm{d}x} + \frac{\mathrm{d}v}{\mathrm{d}x} \qquad\qquad \frac{\mathrm{d}}{\mathrm{d}x}(u - v) = \frac{\mathrm{d}u}{\mathrm{d}x} - \frac{\mathrm{d}v}{\mathrm{d}x} \]

So a polynomial \(f(x) = ax^n + bx^{n-1} + \cdots\) is differentiated one term at a time.

Example 4 Differentiate each function with respect to \(x\).

(a) \(y = \dfrac{3}{4}x^{\frac{4}{3}} - 6\sqrt{x} + 2x\)

(b) \(y = \dfrac{6}{x^2} - \dfrac{x^4}{8} + 7\)

(a) \(y = \dfrac{3}{4}x^{\frac{4}{3}} - 6x^{\frac{1}{2}} + 2x\), so

\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{3}{4} \times \frac{4}{3}x^{\frac{1}{3}} - 6 \times \frac{1}{2}x^{-\frac{1}{2}} + 2 = x^{\frac{1}{3}} - \frac{3}{\sqrt{x}} + 2 . \]

(b) \(y = 6x^{-2} - \dfrac{1}{8}x^4 + 7\), so

\[ \frac{\mathrm{d}y}{\mathrm{d}x} = -12x^{-3} - \frac{1}{2}x^3 = -\frac{12}{x^3} - \frac{x^3}{2} . \]

Example 5 Figure 2 shows part of the curve \(y = \dfrac{12 - 2x}{x}\), \(x \neq 0\), and the point \(A(4,\,1)\). Find the gradient of the curve

(a) at the point \(A\),

(b) at the point where \(y = -8\),

(c) at the point where the curve meets the \(x\)-axis.

Figure 2: The curve \(y = \dfrac{12 - 2x}{x}\).

First divide each term by \(x\): \(\;y = \dfrac{12}{x} - 2 = 12x^{-1} - 2\). So

\[ \frac{\mathrm{d}y}{\mathrm{d}x} = -12x^{-2} = -\frac{12}{x^2} . \]

(a) At \(A\), \(x = 4\): gradient \(= -\dfrac{12}{16} = -\dfrac{3}{4}\).

(b) \(\dfrac{12}{x} - 2 = -8 \Rightarrow \dfrac{12}{x} = -6 \Rightarrow x = -2\). Gradient \(= -\dfrac{12}{4} = -3\).

(c) On the \(x\)-axis \(y = 0\): \(\;12 - 2x = 0 \Rightarrow x = 6\). Gradient \(= -\dfrac{12}{36} = -\dfrac{1}{3}\).

You cannot differentiate a fraction by differentiating the top and the bottom separately. Split it into separate terms first (as above), or use the quotient rule of 24.3.

On a Calculator page: Menu → Calculus → Numerical Derivative at a Point. A box called Derivative at a Point opens. Enter Variable \(x\), Value (for example \(4\)) and choose Derivative: 1st Derivative; then type the function \(\dfrac{12 - 2x}{x}\) in the template. The result is \(-0.75\).

The Derivative at a Point box. The Derivative list has 1st, 2nd and \(n\)th Derivative.

On a Graphs page you can also draw the curve and use Menu → Analyze Graph → dy/dx, then click a point on the curve.

Common errors

✗ Wrong ✓ Right Why
\(\dfrac{\mathrm{d}}{\mathrm{d}x}\left(x^{-3}\right) = -3x^{-2}\) \(-3x^{-4}\) Reduce the power by 1: \(-3 - 1 = -4\).
\(\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\dfrac{1}{x^2}\right) = \dfrac{1}{2x}\) \(-\dfrac{2}{x^3}\) Write \(x^{-2}\) first, then use the power rule.
\(\dfrac{\mathrm{d}}{\mathrm{d}x}(7) = 7\) or \(1\) \(0\) The graph of a constant is horizontal.
\(\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\dfrac{x^3 + 1}{x}\right) = \dfrac{3x^2}{1}\) \(2x - \dfrac{1}{x^2}\) Split into \(x^2 + x^{-1}\) first.
\(\dfrac{\mathrm{d}}{\mathrm{d}x}(2x + 3)(x - 1) = 2 \times 1\) expand first: \(4x + 1\) The derivative of a product is not the product of derivatives.

Exercises

1 Differentiate with respect to \(x\):

(a) \(x^9\)

(b) \(\dfrac{1}{x^4}\)

(c) \(x^{-\frac{2}{3}}\)

(a) \(9x^8\).

(b) \(x^{-4} \to -4x^{-5} = -\dfrac{4}{x^5}\).

(c) \(-\dfrac{2}{3}x^{-\frac{5}{3}}\).

2 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) if \(y = 4x^3 - 7x^2 + 2x - 9\).

\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 12x^2 - 14x + 2\).

3 Given \(f(x) = \dfrac{2}{x^3} - 5x\), find \(f'(x)\) and \(f'(-1)\).

\(f(x) = 2x^{-3} - 5x\), so \(f'(x) = -6x^{-4} - 5 = -\dfrac{6}{x^4} - 5\).

\(f'(-1) = -6 - 5 = -11\).

4 Differentiate \(y = 6\sqrt{x} + \dfrac{4}{\sqrt{x}}\).

\(y = 6x^{\frac{1}{2}} + 4x^{-\frac{1}{2}}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3x^{-\frac{1}{2}} - 2x^{-\frac{3}{2}} = \dfrac{3}{\sqrt{x}} - \dfrac{2}{x\sqrt{x}}\).

5 Find \(f'(x)\) if \(f(x) = (2x - 3)(x + 4)\).

Expand first: \(f(x) = 2x^2 + 5x - 12\), so \(f'(x) = 4x + 5\).

6 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) if \(y = \dfrac{x^3 - 4x + 6}{x}\).

\(y = x^2 - 4 + 6x^{-1}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2x - 6x^{-2} = 2x - \dfrac{6}{x^2}\).

7 Find the gradient of the curve \(y = x^3 - 6x\) at the point where \(x = -2\).

\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3x^2 - 6\). At \(x = -2\): \(\;3 \times 4 - 6 = 6\).

8 Find the coordinates of the points on the curve \(y = x^3 - 3x^2 - 9x + 2\) where the gradient is \(0\).

\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3x^2 - 6x - 9 = 3(x - 3)(x + 1) = 0\), so \(x = 3\) or \(x = -1\).

\(x = 3\): \(y = 27 - 27 - 27 + 2 = -25\). \(\qquad x = -1\): \(y = -1 - 3 + 9 + 2 = 7\).

The points are \((3,\,-25)\) and \((-1,\,7)\).

9 \(f(x) = ax^2 + bx\), where \(a\) and \(b\) are constants. Given that \(f'(1) = 7\) and \(f'(-2) = -5\), find \(a\) and \(b\).

\(f'(x) = 2ax + b\). So \(2a + b = 7\) and \(-4a + b = -5\).

Subtract: \(6a = 12\), so \(a = 2\) and \(b = 3\).

10 AHL 5.12 Use differentiation from first principles to find \(f'(x)\) for \(f(x) = 3x^2 - x\).

\[ \begin{aligned} f(x + h) - f(x) &= 3(x + h)^2 - (x + h) - 3x^2 + x \\ &= 6xh + 3h^2 - h . \end{aligned} \]

\[ f'(x) = \lim_{h \to 0} \frac{6xh + 3h^2 - h}{h} = \lim_{h \to 0} (6x + 3h - 1) = 6x - 1 . \]