To Find

How To Find Total Distance Traveled From Position Function

11 min read

Why does the odometer on a car keep going up, even when you back out of the driveway and drive forward again? Worth adding: simple — it doesn't care about direction. It just tracks the actual ground you covered.

That's essentially the difference between displacement and total distance traveled. And if you've got a position function in calculus, figuring out the second one trips up a lot of people. So let's fix that.

What "Total Distance Traveled" Actually Means

In physics and calculus, position tells you where* something is. Distance tells you how much ground it covered* getting there. These sound the same, but they're not.

Imagine you drive 5 miles east, then turn around and drive 3 miles west. Your final position is 2 miles east of where you started — that's your displacement. But the total distance you actually traveled? That's 8 miles. The car doesn't get a discount for going backward.

The same idea applies to any moving object. That's why a particle might wiggle back and forth, but the total distance is the sum of every inch of motion, regardless of direction. And this matters more than you'd think in physics, engineering, biology — anywhere movement is being modeled.

So how do you calculate* it from a position function?

Why This Comes Up So Often in Calculus

Here's the thing: in calculus class, the first thing you learn to do with a position function is take its derivative to get velocity. Then you integrate velocity to get back to position. It's a beautiful little loop.

But somewhere around the second or third week, the professor says, "Now find the total distance traveled." And suddenly the easy loop breaks.

Why? Because if the object changes direction — and the derivative (velocity) goes from positive to negative or vice versa — the regular integral of velocity will give you displacement, not distance. The positive and negative parts of velocity cancel each other out.

You have to handle the direction changes. That's the whole game.

How to Find Total Distance Traveled From a Position Function

Okay, here's the step-by-step. Once you do this a few times, it becomes second nature.

Step 1: Start with your position function

You'll usually be given something like s(t)*, which gives position in meters, feet, or whatever unit at time t. It might be a polynomial, a trig function, or something more complex. Doesn't matter — the process is the same.

Step 2: Find the velocity function

Take the derivative of the position function. That's your velocity, v(t)*.

If s(t) = t³ - 6t² + 9t + 2*, then v(t) = 3t² - 12t + 9*.

Easy so far.

Step 3: Find where velocity equals zero (or doesn't exist)

Basically the step most people either skip or mess up. You need to find every point in your interval where the velocity changes sign. That happens where v(t) = 0* (or where velocity is undefined, but that's rarer in intro problems).

So for v(t) = 3t² - 12t + 9*, you set it to zero:

3t² - 12t + 9 = 0

Divide by 3: t² - 4t + 3 = 0*

Factor: (t - 1)(t - 3) = 0

So t = 1* and t = 3* are the critical points — the moments when the object stops and reverses.

Step 4: Split your interval at those points

If your problem asks for total distance from t = 0* to t = 5*, and your critical points are t = 1* and t = 3*, you split it like this:

  • From t = 0* to t = 1*
  • From t = 1* to t = 3*
  • From t = 3* to t = 5*

Each subinterval is a stretch where the object moves in one consistent direction.

Step 5: Integrate the absolute value of velocity over each piece

Here's the key formula. Total distance is:

Total distance = ∫|v(t)| dt

But you can't just slap absolute value bars on an integral and call it done. You split the integral at the critical points so the integrand stays positive.

For each piece, figure out the sign of v(t). Practically speaking, if it's positive, the absolute value is just v(t). If it's negative, the absolute value flips the sign.

Going back to our example, pick a test point in each interval:

  • t = 0.5*: v(0.5) = 3(0.25) - 12(0.5) + 9 = 0.75 - 6 + 9 = 3.75* (positive)
  • t = 2*: v(2) = 3(4) - 12(2) + 9 = 12 - 24 + 9 = -3* (negative)
  • t = 4*: v(4) = 3(16) - 12(4) + 9 = 48 - 48 + 9 = 9* (positive)

So the object moves forward, then backward, then forward again. The total distance is:

∫₀¹ v(t) dt - ∫₁³ v(t) dt + ∫₃⁵ v(t) dt

Notice the negative sign in the middle. That's the absolute value doing its job — flipping the negative piece to positive.

Step 6: Compute each integral and add them up

Plug in your antiderivative (which is just the original position function, s(t)*), evaluate at the endpoints, take the absolute value of each piece's result, and add.

For our example, the antiderivative of v(t)* is s(t) = t³ - 6t² + 9t + 2*. So:

  • s(1) - s(0) = (1 - 6 + 9 + 2) - 2 = 6 - 2 = 4*
  • s(3) - s(1) = (27 - 54 + 27 + 2) - 6 = 2 - 6 = -4* → absolute value is 4
  • s(5) - s(3) = (125 - 150 + 45 + 2) - 2 = 22 - 2 = 20*

Total distance = 4 + 4 + 20 = 28 units

Quick sanity check: the displacement would just be s(5) - s(0) = 22 - 2 = 20*. The distance (28) is bigger, which makes sense since the object backtracked at one point. If they came out equal, that would mean the object never changed direction — and you could've skipped all that splitting.

Common Mistakes People Make

Forgetting to find where velocity is zero

Basically the big one. Here's the thing — if you just integrate velocity over the whole interval, you'll get displacement, not distance. And depending on the numbers, the answers can be wildly different.

Mixing up displacement and distance on a test

Read the problem. "Total distance" means what we've been doing. "Displacement" or "change in position" means just s(b) - s(a)*. The wording matters, and professors know students skim it.

Treating absolute value as decorative

You can't just write |∫ v(t) dt| and expect it to work. The absolute value has to be inside* the integral, applied to the integrand, with the interval properly split.

Skipping the sign check

Even if you split the interval correctly, if you don't verify the sign of velocity in each piece, you might end up subtracting when you should be adding. Always plug in a test point.

For more on this topic, read our article on american chemical society organic chemistry exam or check out 2018 acs award for affordable green chemistry 2018 recipient.

Practical Tips That Actually Help

Use a sign chart. Seriously. Write out the critical points on a number line, test each interval, and mark the sign. It's old-school, but it works.

Sketch the graph if you can. Plot v(t)* and shade the area between the curve and the t-axis. Total distance is the total shaded area*, regardless of whether it's above or below the axis. That visual alone clears up half the confusion.

Check your answer against the graph. If you computed a total distance that's smaller than

If you computed a total distance that comes out smaller than the absolute value of the displacement, something has gone wrong. Practically speaking, by definition, distance ≥ |displacement|; the extra “back‑and‑forth” motion can only add to the straight‑line change in position, never subtract from it. If your numbers contradict this inequality, go back and check each interval’s sign, re‑evaluate the absolute‑value step, or verify that you haven’t accidentally swapped the endpoints when evaluating the antiderivative.

Verify with a quick sign‑chart sanity check

  1. Plot the zeros of v(t)* on a number line (the critical points you found in Step 2).
  2. Pick a test point in each sub‑interval and plug it into v(t)* to confirm whether the velocity is positive or negative there.
  3. Mark the sign (+ or –) on each interval.
  4. Check that the total “positive area” minus “negative area” yields the displacement you would get by integrating v(t)* without splitting.

If the signs don’t line up with the pieces you integrated, the absolute‑value handling was likely the culprit.

When the algebra gets messy—use technology

Not every velocity function can be integrated symbolically with a neat antiderivative. In

When the algebra gets messy—use technology

There are plenty of velocity functions that resist a clean antiderivative. In those cases, turning to computational tools isn’t a crutch—it’s a practical necessity. Which means piece‑wise definitions, trigonometric‑exponential hybrids, or functions that change sign many times can make an analytic solution more trouble than it’s worth. The key is to let the software handle the numeric work while you stay responsible for the conceptual steps.

1. Choose a numeric integration routine
Both hand‑held calculators and computer environments provide built‑in quadrature routines (e.g., Simpson’s rule, adaptive Gaussian quadrature). In most scientific calculators (TI‑84, HP‑50g) you’ll find a fnInt( or ∫( function. On a computer, a few lines of Python do the job:

import numpy as np
from scipy.integrate import quad

v = lambda t: t**3 - 2t + np.sin(t)   # example velocity
total_dist, err = quad(lambda t: abs(v(t)), a, b)
displacement, _ = quad(v, a, b)

Notice that the integrand for distance is abs(v(t)), not abs(quad(v, a, b)). The absolute value must sit inside* the integral so the routine can treat each interval’s sign separately.

2. Use a CAS for symbolic sanity checks
If you suspect the antiderivative exists but is just too unwieldy, feed the function to a Computer Algebra System (WolframAlpha, Symbolab, Maxima). Ask it to compute

[ \int_{a}^{b} |v(t)|,dt ]

and compare the result with the numeric quadrature above. A mismatch usually means the CAS interpreted the absolute value incorrectly or you forgot to split the interval at the zeros of (v(t)).

3. Verify graphically
Plot (v(t)) together with (|v(t)|) on the same axes. The area under (|v(t)|) should appear as the total shaded region (positive area everywhere). Most graphing utilities let you shade between the curve and the (t)-axis, giving you an immediate visual check that the distance calculation matches the geometry.

4. Double‑check the limits
When a velocity function is defined piecewise

Handling piecewise‑defined velocities

When the velocity law is given as a separate formula on each sub‑interval, the integration steps are the same, but you have to be explicit about the break points. Suppose

[ v(t)=\begin{cases} f_1(t), & a\le t<t_1

Handling piecewise‑defined velocities

When the velocity law is given as a separate formula on each sub‑interval, the integration steps are the same, but you have to be explicit about the break points. Suppose

[ v(t)=\begin{cases} f_1(t), & a\le t<t_1\ f_2(t), & t_1\le t<t_2\ f_3(t), & t_2\le t\le b \end{cases} ]

The distance traveled is then the sum of the distances on each sub‑interval:

[ \text{Distance} = \int_a^{t_1} |f_1(t)|,dt + \int_{t_1}^{t_2} |f_2(t)|,dt + \int_{t_2}^{b} |f_3(t)|,dt ]

The same additive structure applies to displacement, but without absolute values. In real terms, Critical point: if any (f_i(t)) changes sign within its own interval, you must split that interval further at its zeros—otherwise the absolute value will give the wrong contribution. In practice, it helps to sketch the piecewise function first; the visual will reveal where the graph crosses the time axis and how many pieces you truly need.


Common pitfalls to avoid

Even when the math looks straightforward, a few recurring mistakes can derail your calculation:

  • Forgetting to account for negative velocity. Multiplying total speed by total time assumes constant direction. Real problems rarely cooperate.
  • Confusing displacement with distance. This is the most frequent error. Keep the formulas separate in your notes:
    [ \text{Displacement} = \int v(t),dt,\qquad \text{Distance} = \int |v(t)|,dt ]
  • Skipping the zero‑finding step. Zeros of (v(t)) are the only places where direction changes. Miss one, and your integral over an interval will be wrong.
  • Using incorrect units. Velocity in m/s integrated over time in seconds yields meters. Mixing units (minutes vs. seconds) produces nonsensical answers.

Putting it all together

The framework for any velocity‑to‑position problem is simple in principle: find where the velocity is zero, split the interval there, integrate with the appropriate sign on each piece, and sum the results. Whether you solve symbolically, numerically, or with a combination of both depends entirely on the complexity of (v(t)).

In the classroom, teachers expect you to show the reasoning—identifying zeros, setting up the correct integrals, and interpreting the final numbers. In the real world, engineers and scientists reach for software the moment the function gains a fourth term or a tangent. Both approaches are valid; what matters is that you understand why the method works, not just that* it works.

So the next time you encounter a velocity function that resists a clean antiderivative, remember: sketch first, split at the zeros, integrate each piece, and let technology handle the arithmetic once the conceptual groundwork is solid. Distance and displacement are not mysterious quantities—they are the area and the signed area under the velocity curve, and with the right tools and habits, you can extract them from almost any motion.

New and Fresh

Just Wrapped Up

Round It Out

A Natural Next Step

Thank you for reading about How To Find Total Distance Traveled From Position Function. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
PL

playontag

Staff writer at playontag.com. We publish practical guides and insights to help you stay informed and make better decisions.

Share This Article

X Facebook WhatsApp
⌂ Back to Home