Differentiating Composites and Implicit Relations (AP Calculus BC Unit 3 Notes)

The Chain Rule

What the chain rule is (and what problem it solves)

When you differentiate, you’re usually trying to measure how fast an output changes when you slightly change an input. Many functions in calculus aren’t “simple” inputs straight into a formula—they’re built by feeding one function into another. A composite function is exactly that: one function inside another.

For example, in h(x)=sin(x2)h(x) = \sin(x^2), the “outside” function is sine, and the “inside” function is x2x^2. If you increase xx a bit, it changes x2x^2 first, and that change then affects sin()\sin(\cdot). The chain rule formalizes this two-step (or multi-step) dependency.

The chain rule tells you how to differentiate a composite function by multiplying the rate of change at each layer.

Why it matters

The chain rule is one of the most used differentiation tools in AP Calculus because:

  • Many realistic models are built from layers (geometry inside trig, exponentials of polynomials, etc.).
  • It connects directly to important topics later, like derivatives of inverse functions and integration by substitution.
  • It’s essential for higher-order derivatives whenever the original function is composite.

A good mental model: if a quantity yy depends on an intermediate variable uu, and uu depends on xx, then changes “flow” from xx to uu to yy.

How it works (core formula)

Suppose y=f(u)y = f(u) and u=g(x)u = g(x), so y=f(g(x))y = f(g(x)). The chain rule says:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}

In function notation, that’s:

ddx[f(g(x))]=f(g(x))g(x)\frac{d}{dx}\left[f(g(x))\right] = f'(g(x))\cdot g'(x)

The key idea is that you differentiate the outer function while leaving the inside alone, and then multiply by the derivative of the inside.

Notation you must recognize (they all mean “derivative”)

AP problems mix notations, so you need to translate fluidly.

MeaningCommon notations
Derivative of yy with respect to xxdydx\frac{dy}{dx}, yy'
Derivative of ff at input xxf(x)f'(x)
Operator formddx[f(x)]\frac{d}{dx}[f(x)]

When chaining, the “Leibniz-style” form dydududx\frac{dy}{du}\cdot\frac{du}{dx} is especially helpful because you can literally see the intermediate variable cancel conceptually.

How to apply it reliably (a step-by-step process)

When you see something like f(g(x))f(g(x)):

  1. Identify layers. Ask: “What’s the outermost operation?”
  2. Differentiate the outer layer as if the inside were a single placeholder.
  3. Multiply by the derivative of the inside.
  4. If there are more layers (like sin((3x2+1)5)\sin((3x^2+1)^5)), repeat: the derivative becomes a product of derivatives from each layer.

A common mistake is trying to “simplify first” in a way that hides structure. Simplifying can help, but only if it doesn’t cause you to lose track of what is inside what.

Worked example 1: A basic composite

Differentiate:

h(x)=(3x25)7h(x) = (3x^2-5)^7

Step 1: Identify outer and inner.

  • Outer: u7u^7
  • Inner: u=3x25u = 3x^2 - 5

Step 2: Differentiate outer, then multiply by inner derivative.

h(x)=7(3x25)6ddx(3x25)h'(x) = 7(3x^2-5)^6 \cdot \frac{d}{dx}(3x^2-5)

ddx(3x25)=6x\frac{d}{dx}(3x^2-5) = 6x

So:

h(x)=7(3x25)66xh'(x) = 7(3x^2-5)^6\cdot 6x

You can rewrite as:

h(x)=42x(3x25)6h'(x) = 42x(3x^2-5)^6

What can go wrong: forgetting the factor 6x6x is the classic chain rule error.

Worked example 2: Multiple layers (chain rule repeated)

Differentiate:

y=sin((2x1)4)y = \sin\left((2x-1)^4\right)

There are three layers:

  • Outer: sin()\sin(\cdot)
  • Middle: w4w^4
  • Inner: 2x12x-1

Differentiate layer by layer:

dydx=cos((2x1)4)ddx((2x1)4)\frac{dy}{dx} = \cos\left((2x-1)^4\right)\cdot\frac{d}{dx}\left((2x-1)^4\right)

Now differentiate the middle layer (still a chain rule):

ddx((2x1)4)=4(2x1)3ddx(2x1)\frac{d}{dx}\left((2x-1)^4\right) = 4(2x-1)^3\cdot\frac{d}{dx}(2x-1)

ddx(2x1)=2\frac{d}{dx}(2x-1) = 2

Combine:

dydx=cos((2x1)4)4(2x1)32\frac{dy}{dx} = \cos\left((2x-1)^4\right)\cdot 4(2x-1)^3\cdot 2

So:

dydx=8(2x1)3cos((2x1)4)\frac{dy}{dx} = 8(2x-1)^3\cos\left((2x-1)^4\right)

What can go wrong: students sometimes stop too early and forget to differentiate the inner linear piece 2x12x-1.

Real-world connection: “rates through a pipeline”

If temperature TT depends on altitude hh, and altitude depends on time tt during a flight, then temperature depends on time indirectly. The chain rule is exactly:

dTdt=dTdhdhdt\frac{dT}{dt} = \frac{dT}{dh}\cdot\frac{dh}{dt}

This interpretation (rate of temperature change per time equals temperature change per altitude times altitude change per time) is the same logic as differentiating composite functions.

Exam Focus
  • Typical question patterns:
    • Differentiate a composite function given as a formula (often with trig, exponential, logarithmic, or power layers).
    • Evaluate a derivative at a point, e.g., find f(2)f'(2) for a composite expression.
    • Combine chain rule with product/quotient rules, e.g., differentiate x2sin(3x)x^2\sin(3x).
  • Common mistakes:
    • Differentiating the outer function but forgetting to multiply by the inner derivative.
    • Treating sin(3x)\sin(3x) as sin(x)\sin(x) (missing the factor from differentiating 3x3x).
    • Losing parentheses: writing cos(2x1)4\cos(2x-1)^4 instead of cos((2x1)4)\cos((2x-1)^4) changes the meaning.

Implicit Differentiation

What “implicit” means

So far, many functions have been written explicitly, meaning yy is isolated on one side, like y=x2+3y = x^2 + 3. But sometimes relationships are given with xx and yy mixed together, like:

x2+y2=25x^2 + y^2 = 25

This equation still defines a relationship between xx and yy (in this case, a circle), but yy isn’t neatly solved as a single formula across the whole graph. In these situations, you use **implicit differentiation**: you differentiate both sides with respect to xx while treating yy as a function of xx.

Why it matters

Implicit differentiation is important because:

  • Many curves (circles, ellipses, and more complicated relations) are naturally written implicitly.
  • It’s a powerful method when solving for yy first would be difficult or messy.
  • It shows up frequently in AP free-response and multiple-choice questions involving slopes of curves and higher-order derivatives.
The key idea: yy depends on xx

When you differentiate something like y2y^2 with respect to xx, you can’t treat yy like a constant. Since y=y(x)y = y(x), y2y^2 is a composite function:

  • Outer: u2u^2
  • Inner: u=y(x)u = y(x)

So by the chain rule:

ddx(y2)=2ydydx\frac{d}{dx}(y^2) = 2y\cdot\frac{dy}{dx}

That extra factor dydx\frac{dy}{dx} is the signature of implicit differentiation. Forgetting it is the most common error.

How to do implicit differentiation (workflow)
  1. Differentiate both sides with respect to xx.
  2. Every time you differentiate a term containing yy, multiply by dydx\frac{dy}{dx} (because of the chain rule).
  3. Collect all terms containing dydx\frac{dy}{dx} on one side.
  4. Factor out dydx\frac{dy}{dx}.
  5. Solve for dydx\frac{dy}{dx}.
Worked example 1: Circle slope

Find dydx\frac{dy}{dx} if:

x2+y2=25x^2 + y^2 = 25

Differentiate both sides:

ddx(x2)+ddx(y2)=ddx(25)\frac{d}{dx}(x^2) + \frac{d}{dx}(y^2) = \frac{d}{dx}(25)

Compute each derivative:

2x+2ydydx=02x + 2y\cdot\frac{dy}{dx} = 0

Solve for dydx\frac{dy}{dx}:

2ydydx=2x2y\cdot\frac{dy}{dx} = -2x

dydx=xy\frac{dy}{dx} = -\frac{x}{y}

Interpretation: the slope depends on where you are on the circle. At points where y=0y=0 (left and right endpoints), the slope is undefined (vertical tangent), which matches the geometry.

Worked example 2: Product + mixed terms

Find dydx\frac{dy}{dx} if:

x2y+sin(y)=3xx^2y + \sin(y) = 3x

Differentiate both sides with respect to xx.

For x2yx^2y you must use the product rule, remembering y=y(x)y=y(x):

ddx(x2y)=2xy+x2dydx\frac{d}{dx}(x^2y) = 2xy + x^2\frac{dy}{dx}

For sin(y)\sin(y), use the chain rule:

ddx(sin(y))=cos(y)dydx\frac{d}{dx}(\sin(y)) = \cos(y)\cdot\frac{dy}{dx}

Right side:

ddx(3x)=3\frac{d}{dx}(3x) = 3

So the differentiated equation is:

2xy+x2dydx+cos(y)dydx=32xy + x^2\frac{dy}{dx} + \cos(y)\frac{dy}{dx} = 3

Group the dydx\frac{dy}{dx} terms:

x2dydx+cos(y)dydx=32xyx^2\frac{dy}{dx} + \cos(y)\frac{dy}{dx} = 3 - 2xy

Factor:

dydx(x2+cos(y))=32xy\frac{dy}{dx}(x^2+\cos(y)) = 3 - 2xy

Solve:

dydx=32xyx2+cos(y)\frac{dy}{dx} = \frac{3-2xy}{x^2+\cos(y)}

What can go wrong:

  • Differentiating x2yx^2y as 2xy2xy only, forgetting x2dydxx^2\frac{dy}{dx}.
  • Differentiating sin(y)\sin(y) as cos(y)\cos(y) instead of cos(y)dydx\cos(y)\frac{dy}{dx}.
Tangent lines from implicit curves

A very common AP task is: “Find the equation of the tangent line to the curve at a given point.” With implicit equations, the process is:

  1. Find dydx\frac{dy}{dx} implicitly.
  2. Plug in the point (x,y)(x,y) to get the slope mm.
  3. Use point-slope form:

yy1=m(xx1)y-y_1 = m(x-x_1)

Second derivatives implicitly (preview, expanded in next section)

Sometimes you’ll be asked for d2ydx2\frac{d^2y}{dx^2} for an implicit curve. The key is: once you have dydx\frac{dy}{dx}, you differentiate that expression with respect to xx again—still treating yy as dependent on xx.

That means chain rule terms involving dydx\frac{dy}{dx} can appear again.

Exam Focus
  • Typical question patterns:
    • Find dydx\frac{dy}{dx} for an implicitly defined curve, then evaluate the slope at a given point.
    • Find the equation of a tangent line (or sometimes a normal line) to an implicit curve at a point.
    • Differentiate an equation that mixes algebraic and transcendental terms in yy (like eye^y, ln(y)\ln(y), sin(y)\sin(y)).
  • Common mistakes:
    • Forgetting dydx\frac{dy}{dx} when differentiating terms like y3y^3, sin(y)\sin(y), eye^y, or ln(y)\ln(y).
    • Solving for dydx\frac{dy}{dx} but leaving it scattered across both sides (not collecting and factoring).
    • Plugging in an xx-value without the corresponding yy-value from the point (you usually need both).

Higher-Order Derivatives

What higher-order derivatives are

The first derivative dydx\frac{dy}{dx} measures instantaneous rate of change (slope). A higher-order derivative is simply the derivative of a derivative:

  • The second derivative measures how the slope itself is changing.
  • The third derivative measures how the second derivative is changing, and so on.

Notation you’ll see:

d2ydx2=ddx(dydx)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)

Also common:

yy''

and for functions:

f(x)f''(x)

Why it matters

In AP Calculus, higher-order derivatives show up because:

  • You may be asked to compute yy'' explicitly (especially after implicit differentiation).
  • They connect to analyzing motion: if s(t)s(t) is position, then s(t)s'(t) is velocity and s(t)s''(t) is acceleration.
  • The second derivative supports concavity and inflection point reasoning (even if a specific question only asks you to compute it).
How to compute higher-order derivatives (explicit functions)

If you have y=f(x)y=f(x) explicitly, then:

  1. Differentiate once to get yy'.
  2. Differentiate again to get yy''.
  3. Repeat as needed.

The main new difficulty is that the expressions often become more complicated and may require product, quotient, and chain rules.

Worked example 1: Second derivative with chain rule and product rule

Let:

y=x2sin(3x)y = x^2\sin(3x)

First derivative (product rule):

y=2xsin(3x)+x2ddx(sin(3x))y' = 2x\sin(3x) + x^2\frac{d}{dx}(\sin(3x))

Chain rule inside the trig:

ddx(sin(3x))=3cos(3x)\frac{d}{dx}(\sin(3x)) = 3\cos(3x)

So:

y=2xsin(3x)+3x2cos(3x)y' = 2x\sin(3x) + 3x^2\cos(3x)

Now differentiate again to get yy''. Differentiate each term; each term is a product.

Differentiate 2xsin(3x)2x\sin(3x):

ddx(2xsin(3x))=2sin(3x)+2x3cos(3x)\frac{d}{dx}(2x\sin(3x)) = 2\sin(3x) + 2x\cdot 3\cos(3x)

So that becomes:

2sin(3x)+6xcos(3x)2\sin(3x) + 6x\cos(3x)

Differentiate 3x2cos(3x)3x^2\cos(3x):

ddx(3x2cos(3x))=6xcos(3x)+3x2ddx(cos(3x))\frac{d}{dx}(3x^2\cos(3x)) = 6x\cos(3x) + 3x^2\frac{d}{dx}(\cos(3x))

Chain rule for cosine:

ddx(cos(3x))=3sin(3x)\frac{d}{dx}(\cos(3x)) = -3\sin(3x)

So the second part is:

6xcos(3x)9x2sin(3x)6x\cos(3x) - 9x^2\sin(3x)

Combine both pieces:

y=2sin(3x)+12xcos(3x)9x2sin(3x)y'' = 2\sin(3x) + 12x\cos(3x) - 9x^2\sin(3x)

What can go wrong: when doing yy'', it’s easy to forget you still need chain rule on sin(3x)\sin(3x) and cos(3x)\cos(3x) every time they appear.

Higher-order derivatives from implicit equations

When an equation defines yy implicitly, you often find dydx\frac{dy}{dx} first, then differentiate again. The important habit is: whenever you differentiate an expression that contains yy, you must remember y=y(x)y=y(x).

Worked example 2: Second derivative implicitly

Start with the circle:

x2+y2=25x^2 + y^2 = 25

We already found:

dydx=xy\frac{dy}{dx} = -\frac{x}{y}

Now differentiate both sides with respect to xx to get d2ydx2\frac{d^2y}{dx^2}.

Write:

d2ydx2=ddx(xy)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(-\frac{x}{y}\right)

Treat xy-\frac{x}{y} as a quotient xy\frac{-x}{y} where both numerator and denominator depend on xx (because yy depends on xx). Use the quotient rule:

If q(x)=u(x)v(x)q(x)=\frac{u(x)}{v(x)}, then:

q(x)=u(x)v(x)u(x)v(x)(v(x))2q'(x)=\frac{u'(x)v(x)-u(x)v'(x)}{(v(x))^2}

Here u(x)=xu(x)=-x so u(x)=1u'(x)=-1. Also v(x)=yv(x)=y so v(x)=dydxv'(x)=\frac{dy}{dx}.

So:

d2ydx2=(1)y(x)dydxy2\frac{d^2y}{dx^2} = \frac{(-1)\cdot y - (-x)\cdot\frac{dy}{dx}}{y^2}

Simplify the numerator:

d2ydx2=y+xdydxy2\frac{d^2y}{dx^2} = \frac{-y + x\frac{dy}{dx}}{y^2}

Now substitute dydx=xy\frac{dy}{dx}=-\frac{x}{y}:

d2ydx2=y+x(xy)y2\frac{d^2y}{dx^2} = \frac{-y + x\left(-\frac{x}{y}\right)}{y^2}

Combine:

d2ydx2=yx2yy2\frac{d^2y}{dx^2} = \frac{-y - \frac{x^2}{y}}{y^2}

Put the numerator over a common denominator yy:

d2ydx2=y2+x2yy2\frac{d^2y}{dx^2} = \frac{-\frac{y^2+x^2}{y}}{y^2}

So:

d2ydx2=x2+y2y3\frac{d^2y}{dx^2} = -\frac{x^2+y^2}{y^3}

And since the original equation gives x2+y2=25x^2+y^2=25 on the circle, you can also write:

d2ydx2=25y3\frac{d^2y}{dx^2} = -\frac{25}{y^3}

That last form is often useful for evaluating yy'' at a specific point on the curve.

What can go wrong:

  • Treating yy as a constant when differentiating xy-\frac{x}{y}.
  • Substituting x2+y2=25x^2+y^2=25 too early and losing the ability to simplify correctly.
A quick note on interpreting second derivatives

You’re often not asked to interpret yy'' deeply in this unit, but it helps to know what it means: if yy' is slope, then yy'' tells you whether slope is increasing or decreasing as xx changes. In graph terms, y>0y''>0 corresponds to concave up and y<0y''<0 corresponds to concave down (when the function is explicitly defined and smooth enough).

Exam Focus
  • Typical question patterns:
    • Find yy' and then yy'' for a given function that requires chain and/or product rules.
    • For an implicit curve, compute dydx\frac{dy}{dx} and d2ydx2\frac{d^2y}{dx^2}, then evaluate at a given point.
    • Use higher-order derivatives in motion-style contexts (if position is given), computing velocity and acceleration via derivatives.
  • Common mistakes:
    • Forgetting that chain rule still applies every time you differentiate trig/exponential/log expressions in yy' while finding yy''.
    • For implicit problems, forgetting that ddx(y)=dydx\frac{d}{dx}(y)=\frac{dy}{dx} when differentiating the second time.
    • Algebra errors after differentiating (sign mistakes and missing parentheses), which can overwhelm otherwise-correct calculus steps.