Subject: Class 12 Mathematics Chapter: Chain Rule Topic: 6.6 Chain Rule – Differentiate composite functions
Not every function is a sum, product or quotient of simple functions. Many functions are built by nesting one function inside another, like y = (2x + 1) cubed, y = sin(3x), y = e to the power x squared, or y = ln(cos x). These are called composite functions, and they are written as y = f(g(x)), where the inner function g(x) is applied first and the outer function f is applied to the result. Differentiating a composite function requires a special rule called the chain rule, which tells us how to combine the rates of change of the inner and outer functions.
The chain rule says that if y = f(u) and u = g(x), then dy/dx = dy/du times du/dx. In words: the derivative of a composite function is the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. A helpful slogan is to differentiate the outside, keep the inside the same, and then multiply by the derivative of the inside. This single idea is the most frequently used rule in all of differential calculus, because almost every realistic function is a composition of simpler functions.
The chain rule appears in every chapter that follows: it is needed for the derivative of implicit functions, for second order derivatives, and for problems involving parametric equations and related rates. It also underlies the method of substitution in integration, which you will meet in later study. Because the chain rule is used so widely, examiners give it special importance, and a clear understanding of how to identify the inner and outer functions is the key to applying it correctly. This chapter develops the rule, works through many solved examples, and builds the confidence needed to differentiate even elaborate nested functions.
Let y be a composite function written as y = f(g(x)). Introduce the inner function u = g(x), so that y = f(u). Then the chain rule states:
Chain Rule: dy/dx = dy/du times du/dx.
Equivalently, in prime notation, d/dx [f(g(x))] = f'(g(x)) times g'(x). The derivative is taken in stages: first differentiate the outer function f with respect to its input u, keeping the inner function untouched, and then multiply by the derivative of the inner function g with respect to x.
Worked Example 1: Differentiate y = (3x + 2) cubed.
Let u = 3x + 2, so y = u cubed. Then dy/du = 3u squared and du/dx = 3. By the chain rule, dy/dx = 3u squared times 3 = 9u squared = 9(3x + 2) squared.
Worked Example 2: Differentiate y = sin(2x).
Let u = 2x, so y = sin u. Then dy/du = cos u and du/dx = 2. Hence dy/dx = cos(2x) times 2 = 2 cos(2x).
Worked Example 3: Differentiate y = e to the power (5x).
Let u = 5x, so y = e to the power u. Then dy/du = e to the power u and du/dx = 5. Therefore dy/dx = 5 e to the power (5x).
For a power of a function, such as [g(x)] to the power n, the chain rule gives n [g(x)] to the power n minus 1 times g'(x). This is sometimes called the generalised power rule. For trigonometric functions, the pattern is the same: the derivative of sin(g(x)) is cos(g(x)) times g'(x), and the derivative of cos(g(x)) is minus sin(g(x)) times g'(x).
Worked Example 4: Differentiate y = (x squared + 1) to the power 5.
Let u = x squared + 1, so y = u to the power 5. Then dy/du = 5u to the power 4 and du/dx = 2x. dy/dx = 5(x squared + 1) to the power 4 times 2x = 10x(x squared + 1) to the power 4.
Worked Example 5: Differentiate y = cos(3x squared).
Let u = 3x squared, so y = cos u. Then dy/du = minus sin u and du/dx = 6x. dy/dx = minus sin(3x squared) times 6x = minus 6x sin(3x squared).
Worked Example 6: Differentiate y = tan(2x plus 1).
Let u = 2x + 1, so y = tan u. Then dy/du = sec squared u and du/dx = 2. dy/dx = 2 sec squared (2x + 1).
When the outer function is an exponential or a logarithm, the same procedure applies: differentiate the outside, keep the inside, multiply by the derivative of the inside.
Worked Example 7: Differentiate y = e to the power (x cubed).
Let u = x cubed, so y = e to the power u. Then du/dx = 3x squared. dy/dx = e to the power (x cubed) times 3x squared = 3x squared e to the power (x cubed).
Worked Example 8: Differentiate y = ln(sin x).
Let u = sin x, so y = ln u. Then dy/du = 1/u and du/dx = cos x. dy/dx = (1/sin x) cos x = cot x.
Worked Example 9: Differentiate y = sin cubed x, written as (sin x) cubed.
Let u = sin x, so y = u cubed. Then du/dx = cos x. dy/dx = 3 sin squared x cos x.
For a doubly nested function, apply the chain rule twice. If y = f(g(h(x))), then dy/dx = f'(g(h(x))) times g'(h(x)) times h'(x).
Worked Example 10: Differentiate y = sin squared(cos x), written as [sin(cos x)] squared.
Let v = cos x, u = sin v, so y = u squared. Then du/dv = cos v and dv/dx = minus sin x, and dy/du = 2u. dy/dx = 2 sin(cos x) times cos(cos x) times (minus sin x) = minus 2 sin x sin(cos x) cos(cos x).
| Composite y | Derivative dy/dx |
|---|---|
| [g(x)] to the power n | n [g(x)] to the power n minus 1 times g'(x) |
| sin(g(x)) | cos(g(x)) times g'(x) |
| cos(g(x)) | minus sin(g(x)) times g'(x) |
| tan(g(x)) | sec squared (g(x)) times g'(x) |
| e to the power g(x) | e to the power g(x) times g'(x) |
| ln(g(x)) | g'(x)/g(x) |
| Function y | Inner u | dy/dx |
|---|---|---|
| (3x + 2) cubed | 3x + 2 | 9(3x + 2) squared |
| sin(2x) | 2x | 2 cos(2x) |
| e to the power (5x) | 5x | 5 e to the power (5x) |
| (x squared + 1) to the power 5 | x squared + 1 | 10x(x squared + 1) to the power 4 |
| ln(sin x) | sin x | cot x |
flowchart TD
A[Chain Rule] --> B[Composite Function]
B --> C[y = f(g(x))]
A --> D[Formula]
D --> E[dy/dx = dy/du times du/dx]
A --> F[Procedure]
F --> G[Identify inner function u]
F --> H[Differentiate outer function]
F --> I[Keep inner unchanged]
F --> J[Multiply by derivative of inner]
A --> K[Generalised Power Rule]
K --> L[n g(x)^(n-1) times g'(x)]
A --> M[Applications]
M --> N[Trigonometric]
M --> O[Exponential]
M --> P[Logarithmic]
M --> Q[Nested compositions]
The chain rule is the essential tool for differentiating composite functions, and its formula dy/dx = dy/du times du/dx combines the rates of change of the inner and outer functions by multiplication. It generalises the power rule to powers of functions, extends the standard derivatives of trigonometric, exponential and logarithmic functions to arbitrary inner functions, and handles nests of any depth by repeated application. Because composite functions are everywhere in mathematics, the chain rule is used in almost every subsequent technique, from implicit differentiation and second derivatives to related rates and integration by substitution. Mastery of the chain rule, built on the habit of identifying inner and outer functions clearly, is one of the most valuable skills you can develop for your examinations.