This note covers function notation, composite and inverse functions, and differentiation of powers of \(x\), including gradients, tangents and stationary points. Functions describe how one quantity depends on another, and differentiation measures how fast it changes, which is used to find maximum and minimum values. This content is for the Extended course only.
Key ideas
Function notation. A function is a rule that gives exactly one output for each input. We write \(f(x)=3x-4\) and read \(f(2)\) as "\(f\) of 2", which means replace \(x\) by 2 to get \(f(2)=2\). The set of allowed inputs is the domain and the set of outputs is the range. For example, \(f(x)=x^2+1\) accepts any real number, but its outputs are always at least 1, so its range is \(f(x)\ge1\). Some inputs are not allowed: \(\dfrac{1}{x-2}\) is undefined at \(x=2\).
Composite functions. \(fg(x)\) means "do \(g\) first, then \(f\)", written \(f(g(x))\). The order matters: \(fg(x)\) and \(gf(x)\) are usually different.
Inverse functions. The inverse \(f^{-1}\) reverses \(f\). To find it, write \(y=f(x)\), make \(x\) the subject, then swap the letters so that the answer is in terms of \(x\). Note that \(f^{-1}(x)\) does not mean \(\dfrac{1}{f(x)}\).
Differentiation. The derivative \(\dfrac{dy}{dx}\) (also written \(f'(x)\)) gives the gradient of the curve at any point. It is also the gradient of the tangent to the curve at that point. The rules are:
- If \(y=ax^n\), then \(\dfrac{dy}{dx}=anx^{n-1}\): multiply by the power, then reduce the power by 1. This works for negative powers too, and a fraction such as \(\dfrac{6}{x^2}\) must first be written as \(6x^{-2}\).
- A constant differentiates to 0, and \(x\) differentiates to 1.
- For sums and differences, differentiate term by term.
Tangents. To find the equation of a tangent at \(x=x_1\), find \(y_1\) from the curve, find the gradient \(m\) by substituting \(x_1\) into \(\dfrac{dy}{dx}\), then use \(y-y_1=m(x-x_1)\).
Stationary points. These are points where the gradient is zero, so \(\dfrac{dy}{dx}=0\). Solve this equation to find the \(x\)-values, then substitute into \(y\). To decide the type, find the second derivative \(\dfrac{d^2y}{dx^2}\) (differentiate \(\dfrac{dy}{dx}\) again) and evaluate it at each point. If it is negative, the point is a maximum. If it is positive, the point is a minimum. Alternatively, check the sign of the gradient just before and just after the point.
Using the ideas together. Differentiation is useful whenever you want the largest or smallest value of something. For a curve that models, say, the height of a ball or the profit from a product, the maximum or minimum occurs at a stationary point. Find where \(\dfrac{dy}{dx}=0\), then use the second derivative to confirm the type. A positive gradient means the curve is rising at that point, a negative gradient means it is falling, and a zero gradient means it is momentarily flat. For a quadratic function the single stationary point is the turning point of its parabola, and for a cubic there can be up to two.
To solve an equation involving a function, such as \(f(x)=7\) with \(f(x)=3x-4\), substitute the rule into the equation and solve: \(3x-4=7\), so \(x=\dfrac{11}{3}\). To evaluate an inverse at a number, you can either find \(f^{-1}(x)\) first or solve \(f(x)=\) that number directly.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \(f(a)\) | The output when the input is \(a\). |
| \(fg(x)=f(g(x))\) | Composite function: apply \(g\), then \(f\). |
| \(f^{-1}(x)\) | Inverse function: undoes \(f\), so \(f^{-1}(f(x))=x\). |
| \(\dfrac{d}{dx}(ax^n)=anx^{n-1}\) | Rule for differentiating powers of \(x\). |
| \(\dfrac{dy}{dx}=0\) | Condition for a stationary point. |
| \(\dfrac{d^2y}{dx^2}\lt0\) | Maximum point. Positive means a minimum. |
| \(y-y_1=m(x-x_1)\) | Line through \((x_1,y_1)\) with gradient \(m\); used for tangents. |
Worked examples
Example 1 The functions are \(f(x)=3x-4\) and \(g(x)=x^2+1\). Find (a) \(fg(x)\), (b) \(gf(x)\), (c) \(f^{-1}(x)\), (d) the values of \(x\) for which \(fg(x)=47\).
(a) \(fg(x)=f(g(x))=f(x^2+1)=3(x^2+1)-4=3x^2-1\).
(b) \(gf(x)=g(3x-4)=(3x-4)^2+1\). Expanding gives \(9x^2-24x+17\).
(c) Write \(y=3x-4\). Add 4: \(y+4=3x\). Divide by 3: \(x=\dfrac{y+4}{3}\). Swap the letters: \(f^{-1}(x)=\dfrac{x+4}{3}\).
(d) Solve \(3x^2-1=47\): \(3x^2=48\), so \(x^2=16\) and \(x=4\) or \(x=-4\).
Check with \(x=-4\): \(g(-4)=17\), then \(f(17)=51-4=47\). Correct.
Answer: (a) \(3x^2-1\); (b) \((3x-4)^2+1\); (c) \(\dfrac{x+4}{3}\); (d) \(x=\pm4\)
Example 2 A curve has equation \(y=4x^3-6x^2+5x-7\). (a) Find \(\dfrac{dy}{dx}\) and the gradient at \(x=2\). (b) Find the equation of the tangent at \(x=2\). (c) Differentiate \(y=\dfrac{6}{x^2}\).
(a) Differentiate term by term: \(4x^3\to12x^2\), \(-6x^2\to-12x\), \(5x\to5\), and \(-7\to0\).
So \(\dfrac{dy}{dx}=12x^2-12x+5\). At \(x=2\): \(12(4)-12(2)+5=48-24+5=29\).
(b) The \(y\)-coordinate at \(x=2\): \(4(8)-6(4)+5(2)-7=32-24+10-7=11\). The point is \((2,11)\) and the gradient is 29.
Use \(y-11=29(x-2)\). Then \(y=29x-58+11=29x-47\).
(c) Write \(y=6x^{-2}\). Then \(\dfrac{dy}{dx}=6\times(-2)x^{-3}=-12x^{-3}=-\dfrac{12}{x^3}\).
Answer: (a) \(12x^2-12x+5\), gradient 29; (b) \(y=29x-47\); (c) \(-\dfrac{12}{x^3}\)
Example 3 Find the stationary points of \(y=x^3-6x^2+9x+2\) and decide whether each is a maximum or a minimum.
Differentiate: \(\dfrac{dy}{dx}=3x^2-12x+9\).
Set this equal to zero: \(3x^2-12x+9=0\). Divide by 3: \(x^2-4x+3=0\), so \((x-1)(x-3)=0\), giving \(x=1\) or \(x=3\).
Find \(y\): at \(x=1\), \(y=1-6+9+2=6\). At \(x=3\), \(y=27-54+27+2=2\).
The second derivative is \(\dfrac{d^2y}{dx^2}=6x-12\).
At \(x=1\): \(6-12=-6\lt0\), so a maximum. At \(x=3\): \(18-12=6\gt0\), so a minimum.
Answer: maximum at \((1,6)\); minimum at \((3,2)\)
Common errors
- Reversing the order in a composite function. \(fg(x)\) means \(g\) acts first, so substitute \(g(x)\) into \(f\).
- Treating \(f^{-1}(x)\) as \(\dfrac{1}{f(x)}\). It is the inverse function, not the reciprocal.
- Forgetting to reduce the power by 1 after multiplying, or differentiating a constant term as if it were still there.
- Differentiating \(\dfrac{6}{x^2}\) as \(\dfrac{6}{2x}\). Rewrite it as \(6x^{-2}\) first.
- Stopping at the \(x\)-values of the stationary points. The question usually asks for coordinates, so find \(y\) as well.
Exam tip: Substitute each stationary \(x\)-value into the original equation to get the \(y\)-coordinate, and into the second derivative to get the type. Do not substitute them into the first derivative, because it is zero at these points.
Check yourself
- If \(f(x)=2x+5\), find \(f^{-1}(x)\) and \(f^{-1}(11)\).
Answer
\(y=2x+5\), so \(x=\dfrac{y-5}{2}\). Therefore \(f^{-1}(x)=\dfrac{x-5}{2}\) and \(f^{-1}(11)=\dfrac{6}{2}=3\). - Find the gradient of \(y=x^4-8x\) at \(x=2\).
Answer
\(\dfrac{dy}{dx}=4x^3-8\). At \(x=2\): \(32-8=24\). - Find the stationary point of \(y=x^2-4x+7\) and state its type.
Answer
\(\dfrac{dy}{dx}=2x-4=0\), so \(x=2\). Then \(y=4-8+7=3\). The second derivative is 2, which is positive, so \((2,3)\) is a minimum. - If \(f(x)=x+2\) and \(g(x)=x^2\), find the value of \(x\) for which \(gf(x)=fg(x)\).
Answer
\(gf(x)=(x+2)^2=x^2+4x+4\) and \(fg(x)=x^2+2\). Setting them equal: \(4x+4=2\), so \(x=-\dfrac12\).