Skip to content

Differentiation: Composite, Implicit, and Inverse Functions

AP Calculus AB · Topic 3

Video lesson for this topic Open the video page
6:49

The Chain Rule

Look closely at this function: the sine of x squared. It is really two functions, one inside the other. First, square the input. Then take the sine of the…

English narration · English + 中文 subtitles burned in

3.1

The Chain Rule

Syllabus
Enduring UnderstandingLearning ObjectiveEssential Knowledge

FUN-3
Recognizing opportunities to apply derivative rules can simplify differentiation.

FUN-3.C
Calculate derivatives of compositions of differentiable functions.

  • FUN-3.C.1 The chain rule provides a way to differentiate composite functions.

Source: College Board AP Course and Exam Description

The chain rule

Unit 2 differentiated single functions. Unit 3 differentiates functions built inside other functions. The chain rule 链式法则 differentiates a composite function 复合函数 $f\big(g(x)\big)$:

$$\frac{d}{dx}\,f\big(g(x)\big) = f'\big(g(x)\big)\cdot g'(x).$$
“Derivative of the outer function (leaving the inside alone), times the derivative of the inside.” The inner derivative $g'(x)$ is the piece students forget, so always ask “what is the inside, and what is its derivative?” Example:
$$\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x.$$

In Leibniz notation 莱布尼茨记号, with $y=f(u)$ and $u=g(x)$, the rule reads $\dfrac{dy}{dx}=\dfrac{dy}{du}\cdot\dfrac{du}{dx}$ – the intermediate $du$ appears to “cancel.” Exam questions often give a table for $f$, $g$, $f'$, $g'$ and ask for $h'(a)$ where $h(x)=f\big(g(x)\big)$; evaluate $f'\big(g(a)\big)\cdot g'(a)$ by reading values.

Worked example. Differentiate $h(x)=(2x^2+1)^5$. The outer function 外函数 is “(something)$^5$”, the inner function 内函数 is $2x^2+1$:

$$h'(x)=5(2x^2+1)^4\cdot\frac{d}{dx}(2x^2+1)=5(2x^2+1)^4\cdot 4x=20x(2x^2+1)^4.$$

Worked example (from a table). The table gives values of $f$, $f'$, $g$ and $g'$.

$x$ $f(x)$ $f'(x)$ $g(x)$ $g'(x)$
$1$ $4$ $-2$ $3$ $5$
$2$ $1$ $6$ $-1$ $2$
$3$ $7$ $3$ $2$ $-4$

For $k(x)=f\big(g(x)\big)$, find the tangent line at $x=3$. The point is $k(3)=f\big(g(3)\big)=f(2)=1$. The slope is $k'(3)=f'\big(g(3)\big)\,g'(3)=f'(2)(-4)=6(-4)=-24$. So the tangent is $y-1=-24(x-3)$.

For $p(x)=f(x^2-x)$ at $x=2$: the inside is $x^2-x=2$ and its derivative is $2x-1=3$, so $p'(2)=f'(2)\cdot3=18$. For $h(x)=\ln\big(f(x)\big)$: $h'(x)=\dfrac{f'(x)}{f(x)}$, so $h'(3)=\dfrac{3}{7}$. For a product with a chain inside, $m(x)=f(2x)\,g(x)$, use both rules: $m'(x)=2f'(2x)\,g(x)+f(2x)\,g'(x)$, so $m'(1)=2f'(2)\,g(1)+f(2)\,g'(1)=2(6)(3)+1(5)=41$. The inner derivative $2$ from $f(2x)$ is the factor most often lost.

Matryoshka dolls: the chain rule differentiates nested functions layer by layer — outer first, then the next inside
Matryoshka dolls: the chain rule differentiates nested functions layer by layer — outer first, then the next inside
Explore

A composite curve

y = ax² + bx + c

A composite like $(3x+1)^2$ is steeper than its inner line alone — the chain rule multiplies the inner rate in.

Vocabulary Train
English
chain rule/tʃeɪn ruːl/
composite function/ˈkɒmpəzɪt ˈfʌŋkʃn/
Leibniz notation
outer function
inner function
3.2

Implicit Differentiation

Syllabus
Enduring UnderstandingLearning ObjectiveEssential Knowledge

FUN-3
Recognizing opportunities to apply derivative rules can simplify differentiation.

FUN-3.D
Calculate derivatives of implicitly defined functions.

  • FUN-3.D.1 The chain rule is the basis for implicit differentiation.

Source: College Board AP Course and Exam Description

Some curves are defined implicitly – by an equation in $x$ and $y$ that is not solved for $y$, such as $x^2+y^2=25$. Implicit differentiation 隐函数求导 finds $\dfrac{dy}{dx}$ without solving for $y$ first. It is just the chain rule, treating $y$ as a function of $x$.

The method: differentiate both sides with respect to $x$; every time you differentiate a $y$-term, multiply by $\dfrac{dy}{dx}$ (the chain rule); then solve algebraically for $\dfrac{dy}{dx}$. For $x^2+y^2=25$:

$$2x + 2y\frac{dy}{dx}=0 \;\Longrightarrow\; \frac{dy}{dx} = -\frac{x}{y}.$$

Worked example. Find the tangent line 切线 to the circle $x^2+y^2=25$ at the point $(3,4)$. From above $\dfrac{dy}{dx}=-\dfrac{x}{y}=-\dfrac{3}{4}$ there, so the tangent is

$$y-4=-\tfrac{3}{4}(x-3).$$
Notice the tangent is perpendicular 垂直 to the radius 半径, as geometry promises – a good sanity check.

Implicit differentiation gives the tangent to a circle, perpendicular to the radius
Implicit differentiation gives the tangent to a circle, perpendicular to the radius

Exam skill – “Show that $\dfrac{dy}{dx}=\ldots$”. This exact prompt appears most years (e.g. “Show that $\dfrac{dy}{dx}=\dfrac{2y}{y^2-2x}$”). Because the target is given, you must show every algebra step cleanly: differentiate both sides, use the product/chain rules on mixed $xy$ terms, collect all $\dfrac{dy}{dx}$ terms on one side, factor, and divide. A correct final line that skips the algebra earns little. Follow-up parts then ask for a tangent line, or where the tangent is horizontal ($\tfrac{dy}{dx}=0$, so the numerator is $0$) or vertical (the denominator is $0$).

Worked example. The curve $x^2+xy+y^2=7$ passes through $(1,2)$. Show that $\dfrac{dy}{dx}=-\dfrac{2x+y}{x+2y}$, and find the slope at $(1,2)$.

The middle term $xy$ is a product, so it needs the product rule: $\dfrac{d}{dx}(xy)=1\cdot y+x\dfrac{dy}{dx}$. Differentiate every term:

$$2x + \left(y + x\frac{dy}{dx}\right) + 2y\frac{dy}{dx} = 0.$$

Collect the $\dfrac{dy}{dx}$ terms on one side and factor:

$$(x+2y)\frac{dy}{dx} = -(2x+y) \quad\Longrightarrow\quad \frac{dy}{dx} = -\frac{2x+y}{x+2y}.$$

At $(1,2)$ (check: $1+2+4=7$), the slope is $-\dfrac{2(1)+2}{1+2(2)}=-\dfrac{4}{5}$.

Common mistakes. Writing $\dfrac{d}{dx}(xy)=\dfrac{dy}{dx}$ (the product rule is missing), and writing $\dfrac{d}{dx}(y^2)=2y$ (the factor $\dfrac{dy}{dx}$ is missing).

Worked example (horizontal and vertical tangents). For the curve $y^3-xy=2$:

$$3y^2\frac{dy}{dx}-\left(y+x\frac{dy}{dx}\right)=0\;\Longrightarrow\;\frac{dy}{dx}=\frac{y}{3y^2-x}.$$
At $(-1,1)$ the slope is $\dfrac{1}{3+1}=\dfrac14$, so the tangent is $y-1=\tfrac14(x+1)$.

  • Horizontal tangent: numerator $y=0$. But $y=0$ gives $0-0=2$, which is false, so no point on the curve has a horizontal tangent.
  • Vertical tangent: denominator $3y^2-x=0$, so $x=3y^2$. Substitute into the curve: $y^3-3y^3=2$, so $y^3=-1$, $y=-1$ and $x=3$. The tangent is vertical at $(3,-1)$; check the numerator there is not also $0$ ($y=-1\ne0$).
The curve y cubed minus xy = 2 in two branches. The upper branch passes through (-1, 1) with an orange tangent line of slope one quarter. The lower branch turns back at (3, -1), where a green vertical line touches it: the vertical tangent
Where the denominator of $\frac{dy}{dx}$ is zero (and the numerator is not), the tangent is vertical

Always substitute back into the original equation: a point that makes the derivative zero or undefined is useless unless it is on the curve.

Explore

A tangent slope on a curve

y = √(25 − x²) (upper semicircle)

Even a curve you can't solve for $y$ has a tangent at each point — implicit differentiation finds that slope.

Vocabulary Train
English
implicit differentiation/ɪmˈplɪsɪt ˌdɪfəˌrenʃɪˈeɪʃn/
tangent line/ˈtændʒənt laɪn/
perpendicular/ˌpɜːpənˈdɪkjʊlə/
radius/ˈreɪdɪəs/
3.3

Differentiating Inverse Functions

Syllabus
Enduring UnderstandingLearning ObjectiveEssential Knowledge

FUN-3
Recognizing opportunities to apply derivative rules can simplify differentiation.

FUN-3.E
Calculate derivatives of inverse and inverse trigonometric functions.

  • FUN-3.E.1 The chain rule and definition of an inverse function can be used to find the derivative of an inverse function, provided the derivative exists.

Source: College Board AP Course and Exam Description

If $g$ is the inverse function 反函数 of $f$ (so $f(g(x))=x$), the chain rule links their derivatives:

$$g'(x) = \frac{1}{f'\big(g(x)\big)},\qquad\text{provided } f'\big(g(x)\big)\neq 0.$$
In words: the derivative of the inverse at a point is the reciprocal 倒数 of the derivative of the original function at the matching point. A common exam setup gives a table and a point $(a,b)$ on $f$ (so $(b,a)$ is on $g$), then asks for $g'(b)=\dfrac{1}{f'(a)}$.

You do not need a formula for the inverse. For $f(x)=x^3+x$, let $g=f^{-1}$; to find $g'(2)$, first solve $f(a)=2$: $a^3+a=2$ gives $a=1$. Then $g'(2)=\dfrac{1}{f'(1)}=\dfrac{1}{3(1)^2+1}=\dfrac14$.

The inverse function is the mirror image of the function in the line y = x
The inverse function is the mirror image of the function in the line y = x

Worked example. Suppose $f(2)=5$ and $f'(2)=3$, and $g$ is the inverse of $f$. Because $(2,5)$ lies on $f$, the point $(5,2)$ lies on $g$, and

$$g'(5)=\frac{1}{f'(2)}=\frac{1}{3}.$$
The graphs of $f$ and $g$ are mirror images across $y=x$, so their slopes at matching points are reciprocals.

Explore

An exponential and its inverse the logarithm

y = a·e^(bx) + c

Inverse functions are mirror images across $y=x$, and their slopes are reciprocals: $\frac{d}{dx}[f^{-1}(x)] = \dfrac{1}{f'(f^{-1}(x))}$. Where one is steep, its inverse is shallow.

Vocabulary Train
English
inverse function/ɪnˈvɜːs ˈfʌŋkʃn/
reciprocal/rɪˈsɪprəkl/
3.4

Differentiating Inverse Trigonometric Functions

Syllabus
Enduring UnderstandingLearning ObjectiveEssential Knowledge

FUN-3
Recognizing opportunities to apply derivative rules can simplify differentiation.

FUN-3.E
Calculate derivatives of inverse and inverse trigonometric functions.

  • FUN-3.E.2 The chain rule applied with the definition of an inverse function, or the formula for the derivative of an inverse function, can be used to find the derivatives of inverse trigonometric functions.

Source: College Board AP Course and Exam Description

The same idea gives the derivatives of the inverse trigonometric functions 反三角函数. The three you should know:

$$\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1-x^2}}, \quad \frac{d}{dx}\arctan x = \frac{1}{1+x^2}, \quad \frac{d}{dx}\text{arcsec}\,x = \frac{1}{|x|\sqrt{x^2-1}}.$$
Combine these with the chain rule when the input is itself a function, e.g. $\dfrac{d}{dx}\arctan(3x)=\dfrac{3}{1+9x^2}$. The co-functions are the negatives: $\dfrac{d}{dx}\arccos x=-\dfrac{1}{\sqrt{1-x^2}}$, and similarly for $\text{arccot}$ and $\text{arccsc}$.

Worked example. $\dfrac{d}{dx}\arcsin(x^2)=\dfrac{1}{\sqrt{1-(x^2)^2}}\cdot2x=\dfrac{2x}{\sqrt{1-x^4}}$. Where these formulas come from: if $y=\arcsin x$, then $\sin y=x$; differentiating implicitly, $\cos y\,\dfrac{dy}{dx}=1$, so $\dfrac{dy}{dx}=\dfrac{1}{\cos y}=\dfrac{1}{\sqrt{1-x^2}}$ (using $\cos y=\sqrt{1-\sin^2y}$, positive for $-\tfrac{\pi}{2}<y<\tfrac{\pi}{2}$).

Explore

The arctangent's gentle slope

y = a·tanh(bx) (arctan-like shape)

$\arctan x$ rises fastest at $0$ (slope $1$) and flattens out — its derivative $\tfrac{1}{1+x^2}$ shrinks toward $0$.

Vocabulary Train
English
inverse trigonometric function
3.5

Selecting Procedures for Calculating Derivatives

Syllabus

This topic is intended to focus on the skill of selecting an appropriate procedure for calculating derivatives. Students should be given opportunities to practice when and how to apply all learning objectives relating to calculating derivatives.

Source: College Board AP Course and Exam Description

A skill topic: real derivatives mix several rules, so read the structure of the expression first, from the outside in.

  • Is it a sum? Differentiate term by term.
  • A product or quotient? Apply the product rule 乘积法则 or the quotient rule 商法则, and expect to use the chain rule inside.
  • A composite (something inside something)? Chain rule.
  • Given implicitly? Implicit differentiation.

Name the outermost operation, apply its rule, and recurse inward. Neatness prevents the sign and bookkeeping errors that cost marks.

Explore

Read the structure, pick the rule

y = a / (x − b)

Whether a curve comes from a product, quotient, or composition changes which rule differentiates it — read the top level first.

Vocabulary Train
English
product rule/ˈprɒdʌkt ruːl/
quotient rule/ˈkwəʊʃənt ruːl/
3.6

Calculating Higher-Order Derivatives

Syllabus
Enduring UnderstandingLearning ObjectiveEssential Knowledge

FUN-3
Recognizing opportunities to apply derivative rules can simplify differentiation.

FUN-3.F
Determine higher order derivatives of a function.

  • FUN-3.F.1 Differentiating $f'$ produces the second derivative $f''$, provided the derivative of $f'$ exists; repeating this process produces higher-order derivatives of $f$.
  • FUN-3.F.2 Higher-order derivatives are represented with a variety of notations. For $y = f(x)$, notations for the second derivative include $\dfrac{d^2 y}{dx^2}$, $f''(x)$, and $y''$. Higher-order derivatives can be denoted $\dfrac{d^n y}{dx^n}$ or $f^{(n)}(x)$.

Source: College Board AP Course and Exam Description

Differentiating $f'$ produces the second derivative 二阶导数 $f''$; repeating gives higher-order derivatives 高阶导数. The notations:

$$f''(x)=\frac{d^2y}{dx^2}=y'', \qquad\text{and in general}\qquad f^{(n)}(x)=\frac{d^n y}{dx^n}.$$
The second derivative measures how the slope is changing; it drives concavity 凹凸性 and acceleration 加速度 in later units. To find $f''$ implicitly, differentiate the expression for $\dfrac{dy}{dx}$ again (with the quotient and chain rules), then substitute $\dfrac{dy}{dx}$ back in.

Worked example. For the circle $x^2+y^2=25$, find $\dfrac{d^2y}{dx^2}$ in terms of $y$.

Start from $\dfrac{dy}{dx}=-\dfrac{x}{y}$ and use the quotient rule, remembering that $y$ depends on $x$:

$$\frac{d^2y}{dx^2} = -\frac{1\cdot y - x\dfrac{dy}{dx}}{y^2} = -\frac{y - x\left(-\dfrac{x}{y}\right)}{y^2} = -\frac{y^2+x^2}{y^3} = -\frac{25}{y^3}.$$

The last step uses the curve itself: $x^2+y^2=25$. On the top half ($y>0$) the second derivative is negative, so the curve is concave down there, as a circle's top should be.

Worked example (second derivative at a point). For $y^3-xy=2$ at $(-1,1)$ we found $\dfrac{dy}{dx}=\dfrac14$. Differentiate $\dfrac{dy}{dx}=\dfrac{y}{3y^2-x}$ with the quotient rule:

$$\frac{d^2y}{dx^2}=\frac{\dfrac{dy}{dx}(3y^2-x)-y\left(6y\dfrac{dy}{dx}-1\right)}{(3y^2-x)^2}.$$
Substitute numbers before simplifying: $\dfrac{\tfrac14(4)-1\left(6\cdot\tfrac14-1\right)}{4^2}=\dfrac{1-\tfrac12}{16}=\dfrac{1}{32}$.

From a differential equation. If $\dfrac{dy}{dx}=2x-y$, then $\dfrac{d^2y}{dx^2}=2-\dfrac{dy}{dx}=2-(2x-y)=2-2x+y$. In Quadrant II ($x<0$, $y>0$), $2-2x+y>0$, so every solution curve is concave up there.

Practice.

  1. Differentiate $y=\cos^3(2x)$.
  2. Use the table above: find $\dfrac{d}{dx}\,g\big(f(x)\big)$ at $x=2$.
  3. For $x^2y+y^3=10$, find $\dfrac{dy}{dx}$ at $(3,1)$.
  4. $f(x)=e^x+2x$ and $g=f^{-1}$. Find $g'(1)$.
  5. Find $\dfrac{d}{dx}\arctan\left(\sqrt x\right)$.
  6. Find $\dfrac{d^2y}{dx^2}$ for $y=x\ln x$.

Answers.

  1. $3\cos^2(2x)\cdot(-\sin 2x)\cdot2=-6\cos^2(2x)\sin(2x)$.
  2. $g'\big(f(2)\big)\,f'(2)=g'(1)\cdot6=5\cdot6=30$.
  3. $2xy+x^2\dfrac{dy}{dx}+3y^2\dfrac{dy}{dx}=0$, so $\dfrac{dy}{dx}=-\dfrac{2xy}{x^2+3y^2}=-\dfrac{6}{12}=-\dfrac12$.
  4. $f(0)=1$, so $g(1)=0$ and $g'(1)=\dfrac{1}{f'(0)}=\dfrac{1}{e^0+2}=\dfrac13$.
  5. $\dfrac{1}{1+x}\cdot\dfrac{1}{2\sqrt x}=\dfrac{1}{2\sqrt x\,(1+x)}$.
  6. $y'=\ln x+1$, so $y''=\dfrac1x$.
Explore

Slope of the slope: the second derivative

y = ax³ + bx² + cx + d

Differentiating again gives the second derivative — the rate at which the slope changes. Where the tangent's slope is itself increasing, the curve bends upward (concave up).

Vocabulary Train
English
second derivative/ˈsekənd dɪˈrɪvətɪv/
higher-order derivative
concavity/kənˈkævɪti/
acceleration/əkˌseləˈreɪʃn/
3.6

Exam tips

  • Use the chain rule for composite functions — differentiate the outside, then multiply by the derivative of the inside (the most-forgotten factor).
  • For implicit differentiation, differentiate both sides with respect to $x$ and attach $\tfrac{dy}{dx}$ each time $y$ is differentiated, then solve.
  • Get the second derivative by differentiating twice (velocity → acceleration).
  • Combine rules carefully in layered expressions (chain inside product, etc.).
  • The inverse function's graph is the reflection in $y=x$; its slope is the reciprocal of the original's at the matching point.
  • Horizontal tangent: numerator of $\tfrac{dy}{dx}$ is $0$; vertical tangent: denominator is $0$. Then check the point is on the curve.
  • For an implicit second derivative at a point, substitute the numbers (including $\tfrac{dy}{dx}$) before simplifying.

Interactive lessons on this topic

Work through it step by step, with instant-check exercises.

Past Papers

More topics in AP Calculus AB

Log in or create account

IGCSE, A-Level & AP