Using an Integral to Calculate absolute Distance: A Complete Guide
At a Glance
Velocity can be positive or negative depending on direction. If you integrate it directly, forward and backward motion partially cancel out, and you get displacement — net change in position. If you take the absolute value first, nothing cancels, and you get total distance — everything the object actually covered, in either direction.
Here's a question that trips up almost every calculus student at least once: if you know exactly how fast something was moving at every instant, can you figure out how far it actually traveled? The answer is yes — and it's one of the cleanest, most useful applications of integral calculus.
This is the same math running quietly in the background of a self-driving car's odometer, a video game's physics engine, or a fitness tracker estimating how far you ran. Anywhere something's speed changes over time, an integral can turn that speed data into an actual distance. If you want to check your own work as you go, you can plug any velocity function into Mathsway's integral calculator and see the step-by-step antiderivative.
The catch — and it's the part that catches almost everyone on their first attempt — is that "distance" and "displacement" are not the same thing, and mixing them up is the single most common mistake on this topic. This guide untangles that distinction, walks through the by-hand method step by step, shows a calculator shortcut, and extends the idea to curved 2D paths.
Quick summary: Velocity can be positive or negative depending on direction. If you integrate it directly, forward and backward motion partially cancel out, and you get displacement — net change in position. If you take the absolute value first, nothing cancels, and you get total distance — everything the object actually covered, in either direction.
The Formula, Up Front
If you just need the answer: to find the total distance an object travels over a time interval , integrate the absolute value of its velocity function:
That absolute value isn't optional — it's the whole point. Velocity is signed: positive in one direction, negative in the other. Integrate it as-is and any backward motion cancels out forward motion, which gives you displacement, not distance.
For background on why this convention exists, Wolfram MathWorld's entry on the definite integral is a good technical reference, and Paul's Online Math Notes at Lamar University has a more approachable walkthrough of what a definite integral represents geometrically.
An Easy Way to Remember It
Think about your car's dashboard:
- Displacement is like your GPS — it just tells you how far you are from where you started. Drive 10 miles to the store and 10 miles back, and your displacement is 0.
- Total distance is like your odometer — it doesn't care which way you were going, it just adds up every mile driven. That same trip reads 20 miles.
Displacement vs. Total Distance
Direction is everything here. Pick a positive direction (say, east or up) and everything moving the opposite way counts as negative.
- Velocity, , is a vector — it has both size and direction. Positive means forward, negative means backward.
- Speed, , is a scalar — just the size, always zero or positive.
| Concept | Net Displacement | Total Distance |
|---|---|---|
| Formula | ||
| Type | Vector (can be signed) | Scalar (always nonnegative) |
| Meaning | Net change in position | Actual length of the path traveled |
| Direction | Backward motion cancels forward motion | Every bit of motion adds up |
| Equal when | The object never reverses direction | Same condition |
Calculating Distance by Hand
On a no-calculator exam you can't just drop absolute value bars into an integral and evaluate — you have to find where the object turns around, split the interval there, and take absolute values of each piece. (Once you've worked a problem out by hand, it's worth double-checking your antiderivative against Mathsway's integral calculator before moving on.)
The process:
- Find the turnaround points — set and solve.
- Split the interval at any turnaround points that fall inside .
- Integrate each piece separately using the plain (unsigned) velocity.
- Add up the absolute values of each piece's result.
Example 1 — Constant Velocity (A Walk on the Beach)
Someone walks along a shoreline, starting at position 0:
- 0 to 1.5 hrs: walking east at 3 mph
- 1.5 to 2.0 hrs: walking west at 4 mph
- 2.0 to 3.0 hrs: walking east at 3 mph again
Displacement:
Total distance:
She ends up only 5.5 miles from where she started, but her legs covered 9.5 miles because of that half-hour backtrack.
Example 2 — A Polynomial Velocity Function
A particle moves with velocity m/s. Find displacement and total distance on .
Displacement — integrate directly:
Net displacement is zero — the particle moved left for the first half and right for the second half, ending up back where it started.
Total distance — first find the turnaround point:
Split at and integrate each half:
Sanity check: notice the displacement (0 m) is smaller than the total distance (18 m) — that's always true whenever the object changes direction at least once. If your displacement ever comes out larger than your total distance, go back and check your arithmetic; that's not possible.
Example 3 — A Trigonometric Velocity Function
Ashton drives off, realizes he forgot his wallet, turns around, goes home, grabs it, and heads out again. His velocity (mph) is . Find his displacement and total distance over the first 3 hours.
Displacement, using -substitution:
Total distance — turnaround points occur where , giving and inside our interval. Splitting into three pieces:
Ashton drove about 95.5 miles round-trip but only ended up about 31.8 miles from home.
The Graphing Calculator Shortcut (TI-84)
If your exam allows a calculator, you can skip the manual splitting entirely by putting the absolute value directly inside the integral:
- Press MATH, choose 9: fnInt(
- Enter your lower and upper limits
- For the integrand, press MATH → NUM → 1: abs(
- Type your velocity function inside those parentheses — e.g.
abs(2X - 6) - Close it out with
dXand hit ENTER
A common mistake to avoid: don't write abs(fnInt(Y1, X, a, b)). That takes the absolute value after integrating, which just gives you the absolute value of the displacement — not the total distance. The absolute value has to be inside the integral, wrapped around the velocity function.
Going 2D: Parametric Arc Length (BC Calculus)
Once a particle moves along a curve instead of a straight line, "speed" becomes the magnitude of the velocity vector — this is the same idea covered in Mathsway's derivative calculator if you need to find and first:
And total distance traveled — which is really just the arc length of the path — is:
It's the same idea as the 1D case, just integrating speed instead of .
Tips for AP Exam Free-Response Questions
Particle motion shows up constantly on both AB and BC free-response sections — see the College Board's official AP Calculus course page for the current exam format and scoring guidelines. If you want a deeper, university-level treatment of the same material, MIT OpenCourseWare's Single Variable Calculus is free and covers this topic in more depth. A few things graders look for:
- Show the setup. Writing just the final number won't earn full credit — you need the integral expression itself (absolute value bars or the square root included) to get the "setup" point.
- Include units. If velocity is in feet per second and time is in seconds, your answer is in feet. Always check the problem and label your answer.
- Round properly. The College Board wants three decimal places unless told otherwise — keep full precision in your calculator until the final step to avoid rounding errors.
Five Mistakes That Cost the Most Points
- Integrating directly when the question asks for total distance. This is the single most common error on this topic — it silently gives you displacement instead.
- Forgetting to check for turnaround points inside the interval. If never changes sign, displacement and distance happen to match — but you still need to check, not assume.
- Taking the absolute value of the final answer instead of the integrand. As covered above, and are not the same expression and generally don't give the same number.
- Dropping units or mixing them. A velocity in mph integrated over hours gives miles — but a mismatched setup (say, minutes and mph) will quietly produce a wrong number that still "looks" reasonable.
- Rounding too early. Rounding an intermediate step and carrying that rounded number forward can shift your final answer enough to lose credit on an exam that expects three decimal places.
Frequently Asked Questions
Q: Can total distance ever come out negative? > A: No. Since speed is always nonnegative, its integral can't be negative either. A negative result means you calculated displacement by mistake, or made an arithmetic error somewhere.
Q: When are displacement and total distance the same? > A: Only when the object never changes direction over the interval — meaning stays entirely positive or entirely negative the whole time.
Q: What if I only have a table of velocity values, not a formula? > A: Then you can't find an exact antiderivative — you'll need to estimate with a Riemann sum (left, right, midpoint, or trapezoidal). Just make sure to take the absolute value of each velocity reading before multiplying by the time interval.
The One Thing to Remember
If you forget every formula in this guide, keep this one idea: direction matters for displacement, but not for distance. Every problem here is really just that single fact, applied with slightly different velocity functions. Once that distinction is automatic, the turnaround-point-and-split method becomes mechanical — the same four steps, every time.
Want to check your own homework problems? Try Mathsway's free integral calculator for step-by-step antiderivatives, or the limit calculator if a problem asks you to justify a turnaround point using a limit.