← Back to all lessons
Class 12Calculus14:15Published 1 Aug 2024

Derivatives of a Function of a Function

Learn how to differentiate a function of a function using the chain rule, worked through many algebraic, exponential, logarithmic, and trigonometric examples.

This Class XII lesson is a practice run through the chain rule, differentiating one composite function after another. It starts with powers and roots like raising a linear expression to a power and the square root of a quadratic, moves through logarithms, an exponential times a logarithm using the product rule, and finishes with a set of trigonometric composites. Each example shows the outer derivative times the inner derivative, then simplifies the result.

What you'll learn

  • How to apply the chain rule to differentiate a function inside another function
  • Differentiating powers, square roots, logarithms, and exponentials of composite expressions
  • Combining the product rule with the chain rule in a single problem
  • Working through chained trigonometric derivatives and simplifying the answer

Lesson chapters

0:00What a function of a function means
0:13A linear expression raised to a power
0:56Square root and modulus examples
2:50A quadratic squared
3:41Log of a log, and exponential times log
7:13Trigonometric functions of a function
10:36Differentiating two root cot, then simplifying

Lesson notes

Lesson notes

This lesson is a tour of the chain rule, also called differentiating a function of a function. For a composite f(g(x))f(g(x)) the rule is ddxf(g(x))=f(g(x))g(x)\tfrac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x): differentiate the outer function, keep the inner one unchanged, then multiply by the derivative of the inner function. Below we work through algebraic, logarithmic, exponential, and trigonometric examples in the order the teacher presents them.

A linear expression raised to a power

Differentiate (ax+b)4(ax+b)^4. Treat ax+bax+b as the inner function. Differentiating the power gives 4(ax+b)34(ax+b)^3, and the inner derivative is ddx(ax+b)=a\tfrac{d}{dx}(ax+b) = a.

ddx(ax+b)4=4(ax+b)3a=4a(ax+b)3\frac{d}{dx}(ax+b)^4 = 4(ax+b)^3 \cdot a = 4a\,(ax+b)^3

Modulus of a quadratic

Differentiate x25\lvert x^2 - 5\rvert. Using ddxx=xx\tfrac{d}{dx}\lvert x\rvert = \tfrac{x}{\lvert x\rvert} with inner function x25x^2-5:

ddxx25=x25x25ddx(x25)=2x(x25)x25\frac{d}{dx}\lvert x^2-5\rvert = \frac{x^2-5}{\lvert x^2-5\rvert}\cdot \frac{d}{dx}(x^2-5) = \frac{2x\,(x^2-5)}{\lvert x^2-5\rvert}

Square root of a quadratic

Differentiate 4x2\sqrt{4-x^2}. The outer derivative of u\sqrt{u} is 12u\tfrac{1}{2\sqrt{u}}, and the inner derivative is ddx(4x2)=2x\tfrac{d}{dx}(4-x^2) = -2x.

ddx4x2=124x2(2x)=x4x2\frac{d}{dx}\sqrt{4-x^2} = \frac{1}{2\sqrt{4-x^2}}\cdot(-2x) = \frac{-x}{\sqrt{4-x^2}}

A quadratic squared

Differentiate (3x2+6x+8)2(3x^2+6x+8)^2. The outer derivative gives 2(3x2+6x+8)2(3x^2+6x+8), and the inner derivative is 6x+6=6(x+1)6x+6 = 6(x+1).

ddx(3x2+6x+8)2=2(3x2+6x+8)6(x+1)=12(x+1)(3x2+6x+8)\frac{d}{dx}(3x^2+6x+8)^2 = 2(3x^2+6x+8)\cdot 6(x+1) = 12(x+1)(3x^2+6x+8)

Log of a log

Differentiate log(logx)\log(\log x). With ddxlogx=1x\tfrac{d}{dx}\log x = \tfrac{1}{x} and inner function logx\log x:

ddxlog(logx)=1logx1x=1xlogx\frac{d}{dx}\log(\log x) = \frac{1}{\log x}\cdot \frac{1}{x} = \frac{1}{x\log x}

Exponential times a logarithm (product rule)

Differentiate e2xlogxe^{2x}\log x. This needs the product rule ddx(uv)=udvdx+vdudx\tfrac{d}{dx}(uv) = u\,\tfrac{dv}{dx} + v\,\tfrac{du}{dx}, and the chain rule for e2xe^{2x} whose derivative is 2e2x2e^{2x}.

ddx(e2xlogx)=e2x1x+logx2e2x=e2x(1x+2logx)\frac{d}{dx}\big(e^{2x}\log x\big) = e^{2x}\cdot\frac{1}{x} + \log x\cdot 2e^{2x} = e^{2x}\left(\frac{1}{x} + 2\log x\right)

Logarithm of a multiple

Differentiate log(3x)\log(3x). With inner function 3x3x:

ddxlog(3x)=13x3=1x\frac{d}{dx}\log(3x) = \frac{1}{3x}\cdot 3 = \frac{1}{x}

A quadratic to the power three over two

Differentiate (ax2+bx+c)3/2(ax^2+bx+c)^{3/2}. The outer derivative gives 32(ax2+bx+c)1/2\tfrac{3}{2}(ax^2+bx+c)^{1/2}, and the inner derivative is 2ax+b2ax+b.

ddx(ax2+bx+c)3/2=32(ax2+bx+c)1/2(2ax+b)\frac{d}{dx}(ax^2+bx+c)^{3/2} = \frac{3}{2}\,(ax^2+bx+c)^{1/2}\,(2ax+b)

Trigonometric functions of a function

Sine of a multiple

Using ddx(sinx)n=n(sinx)n1cosx\tfrac{d}{dx}(\sin x)^n = n(\sin x)^{n-1}\cos x, take sin3x\sin 3x:

ddxsin3x=cos3x3=3cos3x\frac{d}{dx}\sin 3x = \cos 3x \cdot 3 = 3\cos 3x

Sine of cosine of a square

Differentiate sin(cosx2)\sin(\cos x^2). Peel one layer at a time: the derivative of sin\sin, then of cos\cos, then of x2x^2.

ddxsin(cosx2)=cos(cosx2)(sinx2)2x=2xsinx2cos(cosx2)\frac{d}{dx}\sin(\cos x^2) = \cos(\cos x^2)\cdot(-\sin x^2)\cdot 2x = -2x\,\sin x^2\,\cos(\cos x^2)

Two times root cot of a square

Differentiate 2cotx22\sqrt{\cot x^2}. The constant 22 stays outside; the square root gives 12cotx2\tfrac{1}{2\sqrt{\cot x^2}}, the derivative of cot\cot is csc2-\csc^2, and the inner derivative of x2x^2 is 2x2x.

ddx2cotx2=1cotx2(csc2x2)2x=2xcsc2x2cotx2\frac{d}{dx}\,2\sqrt{\cot x^2} = \frac{1}{\sqrt{\cot x^2}}\cdot(-\csc^2 x^2)\cdot 2x = \frac{-2x\,\csc^2 x^2}{\sqrt{\cot x^2}}

Writing csc2x2=1sin2x2\csc^2 x^2 = \tfrac{1}{\sin^2 x^2} and cotx2=cosx2sinx2\sqrt{\cot x^2} = \tfrac{\sqrt{\cos x^2}}{\sqrt{\sin x^2}}, this simplifies to

2xsin2x2sinx2cosx2=2xsinx2sin2x2cosx2\frac{-2x}{\sin^2 x^2}\cdot\frac{\sqrt{\sin x^2}}{\sqrt{\cos x^2}} = \frac{-2x}{\sqrt{\sin x^2}\,\sqrt{\sin^2 x^2\,\cos x^2}}

Using 2sinθcosθ=sin2θ2\sin\theta\cos\theta = \sin 2\theta and multiplying top and bottom by 2\sqrt{2} gives the tidy form

22xsinx2sin2x2\frac{-2\sqrt{2}\,x}{\sin x^2\,\sqrt{\sin 2x^2}}

Key takeaways

  • The chain rule differentiates a composite as outer derivative times inner derivative: ddxf(g(x))=f(g(x))g(x)\tfrac{d}{dx}f(g(x)) = f'(g(x))\,g'(x).
  • It applies to powers, roots, modulus, logarithms, exponentials, and trigonometric functions alike, and you peel one layer at a time for deeply nested expressions.
  • The chain rule combines naturally with the product rule, and trigonometric identities such as 2sinθcosθ=sin2θ2\sin\theta\cos\theta = \sin 2\theta help simplify the final answer.