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(x^2), the “outside” function is sine, and the “inside” function is x^2. If you increase x a bit, it changes x^2 first, and that change then affects \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 y depends on an intermediate variable u, and u depends on x, then changes “flow” from x to u to y.
How it works (core formula)
Suppose y = f(u) and u = g(x), so y = f(g(x)). The chain rule says:
\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}
In function notation, that’s:
\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.
| Meaning | Common notations |
|---|---|
| Derivative of y with respect to x | \frac{dy}{dx}, y' |
| Derivative of f at input x | f'(x) |
| Operator form | \frac{d}{dx}[f(x)] |
When chaining, the “Leibniz-style” form \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)):
- Identify layers. Ask: “What’s the outermost operation?”
- Differentiate the outer layer as if the inside were a single placeholder.
- Multiply by the derivative of the inside.
- If there are more layers (like \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) = (3x^2-5)^7
Step 1: Identify outer and inner.
- Outer: u^7
- Inner: u = 3x^2 - 5
Step 2: Differentiate outer, then multiply by inner derivative.
h'(x) = 7(3x^2-5)^6 \cdot \frac{d}{dx}(3x^2-5)
\frac{d}{dx}(3x^2-5) = 6x
So:
h'(x) = 7(3x^2-5)^6\cdot 6x
You can rewrite as:
h'(x) = 42x(3x^2-5)^6
What can go wrong: forgetting the factor 6x is the classic chain rule error.
Worked example 2: Multiple layers (chain rule repeated)
Differentiate:
y = \sin\left((2x-1)^4\right)
There are three layers:
- Outer: \sin(\cdot)
- Middle: w^4
- Inner: 2x-1
Differentiate layer by layer:
\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):
\frac{d}{dx}\left((2x-1)^4\right) = 4(2x-1)^3\cdot\frac{d}{dx}(2x-1)
\frac{d}{dx}(2x-1) = 2
Combine:
\frac{dy}{dx} = \cos\left((2x-1)^4\right)\cdot 4(2x-1)^3\cdot 2
So:
\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 2x-1.
Real-world connection: “rates through a pipeline”
If temperature T depends on altitude h, and altitude depends on time t during a flight, then temperature depends on time indirectly. The chain rule is exactly:
\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) for a composite expression.
- Combine chain rule with product/quotient rules, e.g., differentiate x^2\sin(3x).
- Common mistakes:
- Differentiating the outer function but forgetting to multiply by the inner derivative.
- Treating \sin(3x) as \sin(x) (missing the factor from differentiating 3x).
- Losing parentheses: writing \cos(2x-1)^4 instead of \cos((2x-1)^4) changes the meaning.
Implicit Differentiation
What “implicit” means
So far, many functions have been written explicitly, meaning y is isolated on one side, like y = x^2 + 3. But sometimes relationships are given with x and y mixed together, like:
x^2 + y^2 = 25
This equation still defines a relationship between x and y (in this case, a circle), but y 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 x while treating y as a function of x.
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 y 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: y depends on x
When you differentiate something like y^2 with respect to x, you can’t treat y like a constant. Since y = y(x), y^2 is a composite function:
- Outer: u^2
- Inner: u = y(x)
So by the chain rule:
\frac{d}{dx}(y^2) = 2y\cdot\frac{dy}{dx}
That extra factor \frac{dy}{dx} is the signature of implicit differentiation. Forgetting it is the most common error.
How to do implicit differentiation (workflow)
- Differentiate both sides with respect to x.
- Every time you differentiate a term containing y, multiply by \frac{dy}{dx} (because of the chain rule).
- Collect all terms containing \frac{dy}{dx} on one side.
- Factor out \frac{dy}{dx}.
- Solve for \frac{dy}{dx}.
Worked example 1: Circle slope
Find \frac{dy}{dx} if:
x^2 + y^2 = 25
Differentiate both sides:
\frac{d}{dx}(x^2) + \frac{d}{dx}(y^2) = \frac{d}{dx}(25)
Compute each derivative:
2x + 2y\cdot\frac{dy}{dx} = 0
Solve for \frac{dy}{dx}:
2y\cdot\frac{dy}{dx} = -2x
\frac{dy}{dx} = -\frac{x}{y}
Interpretation: the slope depends on where you are on the circle. At points where y=0 (left and right endpoints), the slope is undefined (vertical tangent), which matches the geometry.
Worked example 2: Product + mixed terms
Find \frac{dy}{dx} if:
x^2y + \sin(y) = 3x
Differentiate both sides with respect to x.
For x^2y you must use the product rule, remembering y=y(x):
\frac{d}{dx}(x^2y) = 2xy + x^2\frac{dy}{dx}
For \sin(y), use the chain rule:
\frac{d}{dx}(\sin(y)) = \cos(y)\cdot\frac{dy}{dx}
Right side:
\frac{d}{dx}(3x) = 3
So the differentiated equation is:
2xy + x^2\frac{dy}{dx} + \cos(y)\frac{dy}{dx} = 3
Group the \frac{dy}{dx} terms:
x^2\frac{dy}{dx} + \cos(y)\frac{dy}{dx} = 3 - 2xy
Factor:
\frac{dy}{dx}(x^2+\cos(y)) = 3 - 2xy
Solve:
\frac{dy}{dx} = \frac{3-2xy}{x^2+\cos(y)}
What can go wrong:
- Differentiating x^2y as 2xy only, forgetting x^2\frac{dy}{dx}.
- Differentiating \sin(y) as \cos(y) instead of \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:
- Find \frac{dy}{dx} implicitly.
- Plug in the point (x,y) to get the slope m.
- Use point-slope form:
y-y_1 = m(x-x_1)
Second derivatives implicitly (preview, expanded in next section)
Sometimes you’ll be asked for \frac{d^2y}{dx^2} for an implicit curve. The key is: once you have \frac{dy}{dx}, you differentiate that expression with respect to x again—still treating y as dependent on x.
That means chain rule terms involving \frac{dy}{dx} can appear again.
Exam Focus
- Typical question patterns:
- Find \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 y (like e^y, \ln(y), \sin(y)).
- Common mistakes:
- Forgetting \frac{dy}{dx} when differentiating terms like y^3, \sin(y), e^y, or \ln(y).
- Solving for \frac{dy}{dx} but leaving it scattered across both sides (not collecting and factoring).
- Plugging in an x-value without the corresponding y-value from the point (you usually need both).
Higher-Order Derivatives
What higher-order derivatives are
The first derivative \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:
\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)
Also common:
y''
and for functions:
f''(x)
Why it matters
In AP Calculus, higher-order derivatives show up because:
- You may be asked to compute y'' explicitly (especially after implicit differentiation).
- They connect to analyzing motion: if s(t) is position, then s'(t) is velocity and 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) explicitly, then:
- Differentiate once to get y'.
- Differentiate again to get y''.
- 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 = x^2\sin(3x)
First derivative (product rule):
y' = 2x\sin(3x) + x^2\frac{d}{dx}(\sin(3x))
Chain rule inside the trig:
\frac{d}{dx}(\sin(3x)) = 3\cos(3x)
So:
y' = 2x\sin(3x) + 3x^2\cos(3x)
Now differentiate again to get y''. Differentiate each term; each term is a product.
Differentiate 2x\sin(3x):
\frac{d}{dx}(2x\sin(3x)) = 2\sin(3x) + 2x\cdot 3\cos(3x)
So that becomes:
2\sin(3x) + 6x\cos(3x)
Differentiate 3x^2\cos(3x):
\frac{d}{dx}(3x^2\cos(3x)) = 6x\cos(3x) + 3x^2\frac{d}{dx}(\cos(3x))
Chain rule for cosine:
\frac{d}{dx}(\cos(3x)) = -3\sin(3x)
So the second part is:
6x\cos(3x) - 9x^2\sin(3x)
Combine both pieces:
y'' = 2\sin(3x) + 12x\cos(3x) - 9x^2\sin(3x)
What can go wrong: when doing y'', it’s easy to forget you still need chain rule on \sin(3x) and \cos(3x) every time they appear.
Higher-order derivatives from implicit equations
When an equation defines y implicitly, you often find \frac{dy}{dx} first, then differentiate again. The important habit is: whenever you differentiate an expression that contains y, you must remember y=y(x).
Worked example 2: Second derivative implicitly
Start with the circle:
x^2 + y^2 = 25
We already found:
\frac{dy}{dx} = -\frac{x}{y}
Now differentiate both sides with respect to x to get \frac{d^2y}{dx^2}.
Write:
\frac{d^2y}{dx^2} = \frac{d}{dx}\left(-\frac{x}{y}\right)
Treat -\frac{x}{y} as a quotient \frac{-x}{y} where both numerator and denominator depend on x (because y depends on x). Use the quotient rule:
If q(x)=\frac{u(x)}{v(x)}, then:
q'(x)=\frac{u'(x)v(x)-u(x)v'(x)}{(v(x))^2}
Here u(x)=-x so u'(x)=-1. Also v(x)=y so v'(x)=\frac{dy}{dx}.
So:
\frac{d^2y}{dx^2} = \frac{(-1)\cdot y - (-x)\cdot\frac{dy}{dx}}{y^2}
Simplify the numerator:
\frac{d^2y}{dx^2} = \frac{-y + x\frac{dy}{dx}}{y^2}
Now substitute \frac{dy}{dx}=-\frac{x}{y}:
\frac{d^2y}{dx^2} = \frac{-y + x\left(-\frac{x}{y}\right)}{y^2}
Combine:
\frac{d^2y}{dx^2} = \frac{-y - \frac{x^2}{y}}{y^2}
Put the numerator over a common denominator y:
\frac{d^2y}{dx^2} = \frac{-\frac{y^2+x^2}{y}}{y^2}
So:
\frac{d^2y}{dx^2} = -\frac{x^2+y^2}{y^3}
And since the original equation gives x^2+y^2=25 on the circle, you can also write:
\frac{d^2y}{dx^2} = -\frac{25}{y^3}
That last form is often useful for evaluating y'' at a specific point on the curve.
What can go wrong:
- Treating y as a constant when differentiating -\frac{x}{y}.
- Substituting x^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 y'' deeply in this unit, but it helps to know what it means: if y' is slope, then y'' tells you whether slope is increasing or decreasing as x changes. In graph terms, y''>0 corresponds to concave up and y''