Skip to content

Differentiation: Composite, Implicit, and Inverse Functions

AP Calculus BC · Topic 3

Video lesson for this topic Open the video page
7:58

The Chain Rule

Think of two gears joined together. Turn the first one, and it drives the second. If the second turns three times as fast as the first, and the first turns…

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

A mountain path: composite functions nest rates of change (chain rule)
A mountain path: composite functions nest rates of change (chain rule)
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$” and the inner function 内函数 is $2x^2+1$:

$$h'(x)=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$ $3$ $4$ $2$ $-3$
$2$ $-1$ $5$ $0$ $1$
$3$ $2$ $-2$ $-1$ $6$

(a) $p(x)=f(x^2-x)$. Find the slope of the tangent line at $x=-1$. The inside is $x^2-x=(-1)^2-(-1)=2$, and its derivative is $2x-1=-3$. So $p'(-1)=f'(2)\cdot(-3)=5(-3)=-15$.

(b) $k(x)=g\big(f(x)\big)$. Find $k'(3)$. The inside value is $f(3)=2$, so $k'(3)=g'\big(f(3)\big)\,f'(3)=g'(2)\cdot(-2)=1(-2)=-2$.

(c) $m(x)=\big(g(x)\big)^3$. Find $m'(-1)$. The outer function is "cube": $m'(x)=3\big(g(x)\big)^2g'(x)$, so $m'(-1)=3(2)^2(-3)=-36$.

Each answer reads two rows of the table: the row of the input $x$, and the row of the inside value. Students who use only one row get the wrong number.

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 to $x^2+y^2=25$ at $(3,4)$. Here $\dfrac{dy}{dx}=-\dfrac{3}{4}$, so the tangent line 切线 is $y-4=-\tfrac{3}{4}(x-3)$ – perpendicular 垂直 to the radius 半径, as geometry predicts.

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). On the same curve $x^2+xy+y^2=7$, where is the tangent horizontal, and where is it vertical?

  • Horizontal: the numerator is zero, $2x+y=0$, so $y=-2x$. Substitute into the original equation: $x^2-2x^2+4x^2=7$, so $3x^2=7$ and $x=\pm\sqrt{7/3}$. The points are $\left(\sqrt{7/3},\,-2\sqrt{7/3}\right)$ and $\left(-\sqrt{7/3},\,2\sqrt{7/3}\right)$.
  • Vertical: the denominator is zero, $x+2y=0$, so $x=-2y$. Substitute: $4y^2-2y^2+y^2=7$, so $y=\pm\sqrt{7/3}$, at $\left(-2\sqrt{7/3},\,\sqrt{7/3}\right)$ and $\left(2\sqrt{7/3},\,-\sqrt{7/3}\right)$.

At each point check that the other part of the fraction is not also zero; $\tfrac00$ needs more work.

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)}$.

Worked example. If $f(2)=5$ and $f'(2)=3$, and $g$ is the inverse of $f$, then $(5,2)$ lies on $g$ and $g'(5)=\dfrac{1}{f'(2)}=\dfrac{1}{3}$.

Worked example (no formula for the inverse). $f(x)=x^5+2x+1$ and $g=f^{-1}$. Find $g'(4)$.

You cannot solve $y=x^5+2x+1$ for $x$, and you do not need to. First find the matching point: $f(a)=4$ means $a^5+2a+1=4$, and $a=1$ works. So $g(4)=1$, and

$$g'(4)=\frac{1}{f'(1)}=\frac{1}{5(1)^4+2}=\frac17.$$

Why the formula is true. Differentiate $f\big(g(x)\big)=x$ with the chain rule: $f'\big(g(x)\big)\,g'(x)=1$. Divide by $f'\big(g(x)\big)$.

Common mistake. Writing $g'(4)=\dfrac{1}{f'(4)}$. The derivative of $f$ must be taken at the matching $x$-value $g(4)=1$, not at $4$.

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
Explore

An exponential and its inverse the log

y = a·e^(bx) + c

Inverse functions mirror across $y=x$ and their slopes are reciprocals. 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}$.

Where the formulas come from. Let $y=\arctan x$, so $\tan y=x$ with $-\tfrac{\pi}{2}<y<\tfrac{\pi}{2}$. Differentiate implicitly: $\sec^2y\,\dfrac{dy}{dx}=1$, so

$$\frac{dy}{dx}=\frac{1}{\sec^2y}=\frac{1}{1+\tan^2y}=\frac{1}{1+x^2}.$$

The same steps with $\sin y=x$ give $\dfrac{1}{\cos y}=\dfrac{1}{\sqrt{1-x^2}}$. The co-functions are the negatives: $\dfrac{d}{dx}\arccos x=-\dfrac{1}{\sqrt{1-x^2}}$.

Worked example. $\dfrac{d}{dx}\Big(x\arcsin x\Big)=\arcsin x+\dfrac{x}{\sqrt{1-x^2}}$ (product rule). And $\dfrac{d}{dx}\arctan\left(e^{x}\right)=\dfrac{e^{x}}{1+e^{2x}}$ (chain rule: the inside is $e^x$).

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.

Worked example. Differentiate $y=\dfrac{\ln(x^2+1)}{x}$. Outermost: a quotient. Inside the numerator: a chain ($\ln$ of $x^2+1$).

$$y'=\frac{\dfrac{2x}{x^2+1}\cdot x-\ln(x^2+1)\cdot1}{x^2}=\frac{2}{x^2+1}-\frac{\ln(x^2+1)}{x^2}.$$

Sometimes a rewrite saves a rule: $\dfrac{5}{x^3}=5x^{-3}$ needs only the power rule, $-15x^{-4}$, not the quotient rule.

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 (implicit, in terms of $x$ and $y$). For $x^2+xy+y^2=7$ we found $\dfrac{dy}{dx}=-\dfrac{2x+y}{x+2y}$. The quotient rule gives

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

Substitute $\dfrac{dy}{dx}$: $y-x\dfrac{dy}{dx}=\dfrac{y(x+2y)+x(2x+y)}{x+2y}=\dfrac{2(x^2+xy+y^2)}{x+2y}=\dfrac{14}{x+2y}$, using the curve. So

$$\frac{d^2y}{dx^2}=-\frac{42}{(x+2y)^3},\qquad\text{and at }(1,2):\ -\frac{42}{125}.$$

Reading $f''$ from the graph of $f'$. $f''$ is the slope of the graph of $f'$. Where that graph has a corner, the left and right slopes differ, so $f''$ does not exist there.

The graph of f prime is three line segments meeting at corners at x = -2 and x = 0; the slopes of the segments, -1, 1 and -1, are the values of f double prime
$f''$ is the slope of the graph of $f'$: $f''(-4)=-1$, $f''(-1)=1$, $f''(3)=-1$; at the corners $x=-2$ and $x=0$, $f''$ does not exist.

A pattern of derivatives. For $f(x)=\ln(1+x)$:

$$f'=(1+x)^{-1},\quad f''=-(1+x)^{-2},\quad f'''=2(1+x)^{-3},\quad f^{(4)}=-6(1+x)^{-4}.$$

Each step brings down the power as a factor and the sign alternates, so $f^{(n)}(x)=(-1)^{n+1}\dfrac{(n-1)!}{(1+x)^n}$. Patterns like this build Taylor polynomials in Unit 10: $f^{(4)}(0)=-6$.

Explore

The second derivative is the slope of the slope

y = ax³ + bx² + cx + d

Differentiating again gives $f''$, the rate the slope changes. Where the slope is increasing the curve bends upward.

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.
  • For an inverse, find the matching point first: $g'(b)=\dfrac{1}{f'(a)}$ where $f(a)=b$.

Practice.

  1. Differentiate $y=\sin^3(4x)$.
  2. Use the table in the chain-rule section: find $\dfrac{d}{dx}f\big(g(x)\big)$ at $x=3$.
  3. For $y^2-x^3=xy+1$, find $\dfrac{dy}{dx}$ at $(0,1)$.
  4. $f(x)=x^3+4x-2$ and $g=f^{-1}$. Find $g'(3)$.
  5. Find $\dfrac{d}{dx}\arcsin(3x)$ and $\dfrac{d}{dx}\arctan\!\left(\dfrac1x\right)$.
  6. For $f(x)=e^{-2x}$, find $f^{(4)}(x)$ and a formula for $f^{(n)}(x)$.

Answers.

  1. $3\sin^2(4x)\cdot\cos(4x)\cdot4=12\sin^2(4x)\cos(4x)$.
  2. $f'\big(g(3)\big)\,g'(3)=f'(-1)\cdot6=4\cdot6=24$.
  3. $2y\dfrac{dy}{dx}-3x^2=y+x\dfrac{dy}{dx}$, so $\dfrac{dy}{dx}=\dfrac{3x^2+y}{2y-x}=\dfrac{0+1}{2-0}=\dfrac12$.
  4. $f(1)=3$, so $g(3)=1$ and $g'(3)=\dfrac{1}{f'(1)}=\dfrac{1}{3+4}=\dfrac17$.
  5. $\dfrac{3}{\sqrt{1-9x^2}}$; $\dfrac{1}{1+x^{-2}}\cdot\left(-\dfrac{1}{x^2}\right)=-\dfrac{1}{x^2+1}$.
  6. $f^{(4)}(x)=16e^{-2x}$; $f^{(n)}(x)=(-2)^ne^{-2x}$.

Interactive lessons on this topic

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

Past Papers

More topics in AP Calculus BC

Log in or create account

IGCSE, A-Level & AP