Advanced Placement
Skip to the notes

AP Calculus BC

Topic 6.9: Integrating Using Substitution

Watch now25 min

Updated · For the May 2027 AP exam

The chain rule run backward: u, du, and changing the limits

Topic 6.9 key terms

integration by substitution (u-substitution)
Undoing the chain rule: if an integrand has the form f′(g(x))·g′(x), let u = g(x) and du = g′(x) dx, so the integral becomes ∫ f′(u) du = f(u) + C = f(g(x)) + C.
the differential du = g′(x) dx
The differential of u. It tells you which piece of the integral (the inside's derivative times dx) becomes du. A constant mismatch is fixed with a constant multiplier; a factor that depends on x can never be pulled outside the integral as if it were constant: rewrite any remaining x in terms of u.
changing the limits
In a definite integral, after substituting u = g(x), the limits must be u-values: x = a and x = b become u = g(a) and u = g(b). Or return to x before evaluating with the x-limits.
checking an antiderivative
Differentiate your answer; the chain rule should give back the integrand exactly.
Tsiolkovsky's rocket equation
Δv = vₑ ln(m₀/m_f): the speed a rocket gains depends only on its exhaust speed and the ratio of its full to empty mass (ignoring gravity and drag). It comes from ∫ k·vₑ/(m₀ − kt) dt with u = m₀ − kt, the rocket's total mass.

Transcript

2,966 words · 8 parts

Why rockets throw themselves away

A couple of hundred kilometers above the Earth, just before sunrise, this rocket is about to throw away the biggest part of itself, on purpose. It’s dropping a whole rocket’s worth of tanks and engines and letting it fall back to Earth. Then the smaller rocket on top lights its own engine. This engine burns fuel at a perfectly steady rate and its push never changes, but keep your eye on the speed, because it creeps up at first and then climbs faster and faster.

In the first minute of this burn it gains about five hundred meters per second, and in the last minute it gains more than five times that, about twenty-seven fifty, with exactly the same engine. That’s because every second the same push is shoving a lighter rocket, and it raises a question that bugs every rocket engineer. How fast can a rocket go on the fuel it carries, and why can’t one rocket just carry more and fly to orbit in one piece?

In 1903 a schoolteacher in Russia named Konstantin Tsiolkovsky published the answer, and for a rocket like this one, it’s hiding inside this integral. By the end of this lesson, you’ll crack this integral yourself, and you’ll know exactly why rockets throw away their empty stages on the way to orbit. The trick we need is the chain rule, running backward, so let’s go back to the machine where we first met it.

The chain rule, backward

This is the drawing machine from the chain rule lesson. You turn the crank, a gear spins three times as fast, and a pen rides up and down on that fast gear while the paper rolls underneath. When the crank has turned x radians, the fast gear has turned three x, and the pen sits at a height of sine of that, so the paper draws y equals sine of three x.

The chain rule told us how fast the pen moves for each bit of crank. You take the pen’s own rate on its gear, cosine of u, and multiply by the gear’s factor of three, which gives three cosine three x. Today, let’s flip the question around. Suppose I give you only this violet curve, the pen’s rate, three cosine three x, and ask you where the pen goes.

You’d need a function whose derivative is three cosine three x. You just watched the machine build one, so you already know it’s sine of three x, plus a constant. The chain rule puts that three out front all by itself. That three is the fingerprint the gear leaves behind. Integrating undoes a derivative, so your job is to spot fingerprints like that one and work out which function the chain rule started from.

Let’s watch the fingerprint appear on an ordinary function. The derivative of x squared plus one, cubed, is three times the inside squared, times the derivative of the inside, which is two x. Now I’ll cover up the left side, and imagine somebody hands you just the right side and asks what function it came from.

You’d notice an inside, x squared plus one, with its derivative, two x, sitting right next to it. That pair tells you this came straight out of the chain rule, so the antiderivative is x squared plus one, cubed, plus C. In general, whenever you see a function of an inside, with the inside’s derivative already there as a factor, you can integrate the outside and leave the inside exactly as it is.

Integration by substitution is just this idea with some careful bookkeeping, and before we add the bookkeeping, I want you to try spotting one. What’s the integral of two x times cosine of x squared?

Let u do the bookkeeping

Spotting the answer works when the integral is friendly, but for messier ones we need a way to keep track, and the trick is to give the inside its own letter, u. Let’s do the integral of two x times x squared plus one, cubed, dx. I’ll call the inside u, so u equals x squared plus one, and its derivative, du over dx, is two x.

If I multiply both sides by dx, I get du equals two x dx. That little line is the heart of the method, because it tells me exactly which piece of the integral turns into du.

Look at the integral now. The x squared plus one becomes u, and the two x and the dx together become du, so the whole thing turns into the integral of u cubed, du, with no x anywhere. That’s the power rule, u to the fourth over four, plus C, and then I put x back in for u, so the answer is x squared plus one, to the fourth, over four, plus C.

I always check by differentiating. The four comes down and cancels the four, the chain rule brings out a two x, and we’re right back at the integrand we started with. Now what if the two is missing, like in the integral of x times x squared plus one, cubed? We keep the same u, so du is still two x dx, but this integral only has x dx, which is half of du.

That makes x dx one half du, and the half slides out in front of the integral. Half of u to the fourth over four is u to the fourth over eight, so the answer is x squared plus one, to the fourth, over eight, plus C. A missing number is always easy to fix.

The machine’s gear works exactly this way. For cosine of three x, u is three x, so du is three dx. That makes dx a third of du, and the answer is a third of sine three x. Going backward through a gear divides by its ratio. In the same way, e to the five x integrates to a fifth of e to the five x.

A missing x is a completely different story, though. In the integral of x squared plus one, cubed, with nothing out front, du would need a two x that simply isn’t there. You can’t sneak an x in, so here you’d expand the cube and integrate term by term instead. The other trap is dividing by the missing piece. People write sine of x squared over two x, but you can’t move something with an x in it outside the integral.

Differentiate that answer and the quotient rule gives you cosine of x squared minus an extra piece that shouldn’t be there. Setting u equal to x squared doesn’t rescue this one either, because there’s no two x for du to absorb. You do the bookkeeping on this one. Find the integral of x squared times x cubed plus five, to the fourth.

Picking u

How do you choose u? Look for a piece whose derivative also shows up in the integral, up to a constant. It’s usually the inside of something, like the base of a power, the exponent on e, the input of a sine or cosine, or a whole denominator.

A denominator is the sneaky one. In two x over x squared plus one, the top is exactly the derivative of the bottom. Let u be the bottom, and you’re left with du over u, which integrates to the natural log of the absolute value of u. Since x squared plus one is always positive, the log doesn’t need the absolute value bars. Keep this one in mind, because the rocket’s integral has a denominator too.

Sometimes you have to rewrite first. Tangent on its own gives you nothing to grab, but tangent is sine over cosine. Let u be cosine x. Its derivative is negative sine, so the sine x dx on top is negative du. That makes the answer negative the natural log of the absolute value of cosine x.

Try one like that yourself. What’s the integral of cosine x over sine x? One more move, for when an x is left over. In x times the square root of x plus one, u equals x plus one takes care of the root, and du is just dx, but there’s still an x hanging around.

Since u is x plus one, x is u minus one, so the leftover x becomes u minus one, and now every piece is in u. Multiplying out gives u to the three halves minus u to the one half. The power rule turns those into two fifths u to the five halves minus two thirds u to the three halves, and then I put x plus one back in for u.

Move the finish line

Definite integrals add one more twist, and the machine shows it better than any formula, so let’s go back to it. If I turn the crank from zero up to some angle, the pen’s rise is the integral of its rate, three cosine three x, from zero up to that angle.

Grab the crank and turn it until the pen reaches the very top of its stroke, and keep an eye on the gear’s number line while you do it. The pen’s rise is the integral of three cosine three x from zero to pi over six. If we switch to u, we have to count on the gear’s line instead, from zero to pi over two, and either way the answer is one.

Now pick your own gear. Swap in the times-two gear, guess where the crank will be when the pen reaches the top, and then turn it there. That’s the rule for definite integrals. When you change the variable, you change the limits too, because the limits have to be read off the new variable’s number line.

Let’s do one on paper, the integral from zero to one of two x times x squared plus one, squared, dx. We use the same u and the same du, and now the limits change, because when x is zero, u is one, and when x is one, u is two. That turns it into the integral from one to two of u squared, du, which is u cubed over three from one to two, eight thirds minus one third, seven thirds.

These two areas look nothing alike, so why should they be equal? Every strip in the top graph has a twin in the bottom graph, sitting at u equals x squared plus one.

Look at the glowing pair. The bottom strip is two x times as wide as its twin, which is exactly what du equals two x dx says. The top strip is about two x times as tall, because its height has that extra two x in it. So each pair ends up with almost the same area, and as the strips get thinner, both totals head to seven thirds.

A mistake you’ll see all the time, and one the exam’s graders keep reporting, is keeping the old limits and writing the integral from zero to one of u squared, which gives one third. That’s the area of a completely different region. If a question asks you to explain the error, this is the sentence that earns the point. Zero and one are x-values, not u-values.

With u equal to x squared plus one, u runs from one to two as x runs from zero to one, which makes the integral equal to the integral from one to two of u squared, seven thirds. You can also switch back to x first and then use the old limits, and you’ll get seven thirds again. Just never mix them, with u inside the integral and x’s numbers on the limits.

Try a definite one on your own. Find the integral from zero to three of x times the square root of x squared plus sixteen, to three decimal places.

Tsiolkovsky’s integral

We’re finally ready to go back to the rocket. The thing inside our integral is the stage’s acceleration, in meters per second per second. As the burn runs, the area under it fills in, and that area is the speed gained.

That formula is the engine’s push divided by the rocket’s mass. The push comes from a quarter of a tonne of fuel thrown out every second at three kilometers a second, the exhaust speed, and that works out to seven hundred fifty. The mass in tonnes is a hundred minus a quarter t, because a quarter of a tonne goes out every second. For now we’re ignoring gravity, and we’ll pay for it at the end.

Which part gets the letter u? Take a guess before I say it. It’s the denominator, a hundred minus a quarter t, and look at what it actually is. It’s the rocket’s mass, fuel and all, so the u in this problem is something you can watch. Its derivative is negative a quarter, so du is negative a quarter dt, which means dt is negative four du.

Before I write it out, you put it together. At t equals zero, u is a hundred tonnes, and at three hundred sixty seconds the tanks run dry. Which integral in u gives the speed gained? So the mass limits run from a hundred tonnes down to ten tonnes, full to empty. Empty doesn’t mean zero, because the tanks, the engine and the payload are still there.

Let’s write it out. The speed gained is the integral from zero to three sixty of seven fifty over a hundred minus a quarter t, dt. In u, that becomes the integral from a hundred down to ten of seven fifty over u, times negative four du. The top limit is smaller than the bottom one now. That’s fine, because the mass runs downhill, so leave them in that order.

Seven fifty times negative four is negative three thousand, and the integral of du over u is the natural log of u, with no absolute value needed, because a mass is always positive. That’s negative three thousand times a difference, the natural log of ten minus the natural log of a hundred. The log of a hundred is twice the log of ten, so that difference is negative the log of ten.

The two minus signs cancel, and we get three thousand times the log of ten, about six thousand nine hundred meters per second. That’s exactly what the stage’s speed readout showed at the end of the burn, and it’s positive, which it has to be, because the stage only ever speeds up.

Before we see why, test it yourself. The top graph counts the speed gained over time, and the bottom graph counts it against the rocket’s mass. Guess first whether burning the fuel twice as fast gains more speed, less, or the same, then double the burn rate and fire the burn.

Let’s run the same steps with letters, so we can see where the burn rate goes. k is the burn rate, v sub e is the exhaust speed, and m zero and m f are the full and empty masses, the same numbers we just used. u is m zero minus k t, so du is negative k dt, and the k on top cancels the k that comes out of du.

Evaluating gives negative v sub e times the log of m f minus the log of m zero. Flip that difference to get rid of the minus sign, and the log rule turns it into the log of m zero over m f. The burn rate is gone. The speed you gain depends only on how fast the exhaust shoots out and how much of the rocket is fuel, and that’s Tsiolkovsky’s rocket equation, the ideal rocket equation engineers still use to budget every burn.

On the exam

An AP question can give you the value of an integral without ever giving you a formula for the function, and then ask about another integral that’s secretly the same one. If the integral from one to five of f of u, du, is twelve, what’s the integral from zero to two of x times f of x squared plus one, dx?

Every substitution comes down to three moves. You pick an inside that makes the integral simpler, you rewrite every piece in u, the dx and any leftover x included, and for a definite integral you translate the limits too, or switch back to x before you plug in.

Why every rocket stages

Let’s finally answer the question from the beginning. Suppose our stage had to get to orbit all by itself. It’s ninety percent fuel and gains about six point nine kilometers per second, but staying in orbit takes about seven point eight.

This time you get to be the rocket engineer. Drag the fuel slider until this one stage gains orbital speed, and fire the burn to check it.

That’s before gravity and air take their share, about another one point six kilometers per second, which brings the total to about nine point four and pushes the fuel to almost ninety-six percent. That leaves four point four percent for the tanks, the engine, the computers and whatever you’re trying to launch, and nobody has ever flown a single rocket like that from Earth into orbit.

So let’s answer the question from the very beginning, with one stack, the same fuel and the same engines. Launch it once keeping the empty booster attached, and once letting it go.

That’s why rockets throw away their empty stages. Every tonne you don’t have to push makes the next logarithm bigger, and that’s the moment you watched at the very beginning. You started this lesson with an integral you couldn’t do, and you just cracked the equation behind every rocket that’s ever flown, with one letter, u, standing for the rocket’s own mass.

Unit 6: Integration and Accumulation of Change

  1. 6.1Exploring Accumulations of Change
  2. 6.2Approximating Areas with Riemann Sums
  3. 6.3Riemann Sums, Summation Notation, and Definite Integral Notation
  4. 6.4The Fundamental Theorem of Calculus and Accumulation Functions
  5. 6.5Interpreting the Behavior of Accumulation Functions Involving Area
  6. 6.6Applying Properties of Definite Integrals
  7. 6.7The Fundamental Theorem of Calculus and Definite Integrals
  8. 6.8Finding Antiderivatives and Indefinite Integrals: Basic Rules and Notation
  9. 6.9Integrating Using Substitution
  10. 6.10Integrating Functions Using Long Division and Completing the Square
  11. 6.11Integrating Using Integration by Parts
  12. 6.12Integrating Using Linear Partial Fractions
  13. 6.13Evaluating Improper Integrals
  14. 6.14Selecting Techniques for Antidifferentiation