Tutorials › AP Calculus › Displacement and Distance for Piecewise Velocity

Shells and Integral Applications · Tutorial 713 of 999

Displacement and Distance for Piecewise Velocity

Add the signed integrals across each time interval for displacement, and split at velocity zeros to calculate total distance.

Advanced 10 min read

What You'll Learn

  • Define displacement and total distance from a piecewise velocity function.
  • Add the signed integrals over the function’s time intervals.
  • Find zeros within each piece to locate changes in direction.
  • Check the signs on both sides of a piece boundary, including jump discontinuities.
  • Distinguish the absolute value of net displacement from total distance traveled.

Why Piecewise Velocity Requires Care

A particle’s velocity may be described by different formulas on different time intervals. The formulas can have different signs, and the velocity can change direction either inside one interval or at the boundary between two intervals. To calculate motion correctly, keep track of both the time intervals and the signs of the velocity.

Displacement is a signed change in position: motion in one direction contributes positively, and motion in the opposite direction contributes negatively. Total distance counts all motion as positive. Therefore, displacement and distance generally require different calculations.

Key distinction: Add the signed velocity integrals to find displacement. To find total distance, integrate the absolute value of velocity, splitting intervals wherever the velocity changes sign.

Definitions for Piecewise Velocity

Suppose a particle moves from time \(t=a\) to time \(t=b\), and its velocity is \(v(t)\). Assume \(v\) is piecewise continuous on this time interval, so its integral is defined. The particle’s displacement is the signed change in position, while its total distance is the amount of ground it travels.

Definition: The displacement from \(t=a\) to \(t=b\) is \( \displaystyle \int_a^b v(t)\,dt \). The total distance traveled is \( \displaystyle \int_a^b |v(t)|\,dt \). If the particle begins at position \(x(a)=x_0\), then its final position is \( \displaystyle x(b)=x_0+\int_a^b v(t)\,dt \).

Suppose the velocity formula changes at times \(a=t_0<t_1<\cdots<t_n=b\). By additivity of definite integrals, displacement is the sum of the signed integrals on those pieces:

$$ \int_a^b v(t)\,dt = \sum_{i=1}^{n}\int_{t_{i-1}}^{t_i}v(t)\,dt. $$

This sum does not automatically give total distance. If velocity changes sign within a piece, its positive and negative contributions can cancel in that piece’s signed integral. For distance, split at the zero or zeros of the velocity as well as at the piece boundaries.

Why the Two Integral Rules Work

On a time interval where \(v(t)\geq 0\), the particle moves in the positive direction. Its speed is \(v(t)\), so integrating velocity gives both its displacement and its distance on that interval. Where \(v(t)\leq 0\), the particle moves in the negative direction: velocity contributes negatively to displacement, but speed is \(-v(t)\), so distance remains positive. In both cases, speed is \(|v(t)|\).

More formally, on each interval where a position function \(x\) has derivative \(x'(t)=v(t)\), the Fundamental Theorem of Calculus gives the position change as the integral of velocity. Adding those changes across the finite partition gives the total displacement; intermediate position changes cancel when added. The distance traveled on a sign-constant interval is the absolute value of its position change, which equals the integral of \(|v(t)|\) there. Adding these distances gives the integral of \(|v|\). Values at finitely many boundary times do not affect either integral, so a jump in velocity at a boundary is allowed.

$$ \text{displacement}=\int_a^b v(t)\,dt, \qquad \text{total distance}=\int_a^b |v(t)|\,dt. $$

For a given piece, check for zeros in its interior and determine the sign on each resulting interval. Also compare the signs immediately before and after a piece boundary. A jump can change the direction even when neither formula is zero at the boundary.

Worked Example: Two Pieces with Sign Changes Inside

Worked Example: Two Pieces with Sign Changes Inside

A particle has velocity \(v(t)=t-1\) for \(0\leq t\leq2\), and \(v(t)=3-t\) for \(2<t\leq4\), in meters per second. Find its displacement and total distance from \(t=0\) to \(t=4\).

Step 1: Find the sign changes. On the first piece, \(t-1=0\) at \(t=1\); it is negative on \([0,1)\) and positive on \((1,2]\). On the second piece, \(3-t=0\) at \(t=3\); it is positive on \((2,3)\) and negative on \((3,4]\).

Step 2: Calculate displacement. Integrate each velocity formula over its piece and add the signed results:

$$ \int_0^2(t-1)\,dt = \left[\frac{t^2}{2}-t\right]_0^2 = (2-2)-0 = 0, $$
$$ \int_2^4(3-t)\,dt = \left[3t-\frac{t^2}{2}\right]_2^4 = (12-8)-(6-2) = 4-4 = 0. $$

Thus the total displacement is \(0+0=0\) meters.

Step 3: Calculate total distance. Split at both zeros and integrate the absolute velocity on each interval:

$$ \begin{aligned} \int_0^1(1-t)\,dt &=\left[t-\frac{t^2}{2}\right]_0^1 =1-\frac12=\frac12,\\ \int_1^2(t-1)\,dt &=\left[\frac{t^2}{2}-t\right]_1^2 =0-\left(\frac12-1\right)=\frac12,\\ \int_2^3(3-t)\,dt &=\left[3t-\frac{t^2}{2}\right]_2^3 =\frac92-4=\frac12,\\ \int_3^4(t-3)\,dt &=\left[\frac{t^2}{2}-3t\right]_3^4 =-4-\left(\frac92-9\right)=\frac12. \end{aligned} $$

The total distance is \(\frac12+\frac12+\frac12+\frac12=2\) meters. As a check, differentiating the antiderivative \(\frac{t^2}{2}-t\) gives \(t-1\), and differentiating \(3t-\frac{t^2}{2}\) gives \(3-t\). The signed integrals are both zero, consistent with the particle returning to its starting position over each piece, while the positive distance contributions sum to \(2\) meters.

Discontinuities at Piece Boundaries

The velocity does not have to be continuous for the integral rules to apply. At a boundary, use the formula assigned to each time interval and check the signs on the intervals to either side. If the velocity jumps from negative to positive, the particle changes direction at the jump, even if neither side’s formula is zero there. A single boundary value has no effect on the definite integral.

Worked Example: A Jump and a Sign Change Within a Piece

Let \(v(t)=-2\) on \(0\leq t\leq1\), \(v(t)=2t-3\) on \(1<t\leq3\), and \(v(t)=1\) on \(3<t\leq4\), in meters per second. Find displacement and total distance.

Step 1: Track signs. The first piece is negative. On the middle piece, \(2t-3=0\) at \(t=\frac32\), so velocity is negative from just after \(1\) to \(\frac32\), then positive until \(3\). The final piece is positive. At \(t=1\), velocity jumps from \(-2\) to values just above \(-1\), so there is no direction change there. At \(t=3\), it jumps from \(3\) to \(1\), also without changing direction.

Step 2: Add signed integrals.

$$ \int_0^1(-2)\,dt=-2. $$
$$ \int_1^3(2t-3)\,dt = \left[t^2-3t\right]_1^3 = (9-9)-(1-3) = 2. $$
$$ \int_3^4 1\,dt=4-3=1. $$

Therefore displacement is \(-2+2+1=1\) meter.

Step 3: Split the middle piece for distance. On \([1,\frac32]\), the velocity is negative; on \([\frac32,3]\), it is positive.

$$ \begin{aligned} \int_1^{3/2}(3-2t)\,dt &=\left[3t-t^2\right]_1^{3/2} =\left(\frac92-\frac94\right)-(3-1) =\frac94-2=\frac14,\\ \int_{3/2}^3(2t-3)\,dt &=\left[t^2-3t\right]_{3/2}^3 =0-\left(\frac94-\frac92\right) =\frac94. \end{aligned} $$

The first piece contributes distance \(2\) meters, the middle piece contributes \(\frac14+\frac94=\frac52\) meters, and the last piece contributes \(1\) meter. Total distance is \(2+\frac52+1=\frac{11}{2}\) meters.

Check: The displacement components \(-2\), \(2\), and \(1\) add to \(1\), while the distance components are all nonnegative and add to \(\frac{11}{2}\). The antiderivative \(t^2-3t\) differentiates to \(2t-3\), as required on the middle piece.

Using Displacement to Find Final Position

If an initial position is supplied, add the signed displacement to it. Do not add total distance: distance tells how far the particle traveled, not where it ends up relative to its starting point.

Worked Example: Find Final Position and Total Distance

A particle starts at position \(x(0)=3\) meters. Its velocity is \(v(t)=2-t\) for \(0\leq t\leq2\), \(v(t)=t-4\) for \(2<t\leq5\), and \(v(t)=-1\) for \(5<t\leq6\), in meters per second. Find its final position and total distance traveled.

Step 1: Identify the signs. The first piece is positive until \(t=2\). On the second piece, \(t-4=0\) at \(t=4\), so it is negative from just after \(2\) to \(4\), then positive from \(4\) to \(5\). The last piece is negative. The sign changes at \(t=2\) and \(t=5\) occur across piece boundaries; there is also an interior zero at \(t=4\).

Step 2: Find displacement piece by piece.

$$ \int_0^2(2-t)\,dt = \left[2t-\frac{t^2}{2}\right]_0^2 = 4-2 = 2, $$
$$ \int_2^5(t-4)\,dt = \left[\frac{t^2}{2}-4t\right]_2^5 = \left(\frac{25}{2}-20\right)-(2-8) = -\frac{15}{2}+6 = -\frac32, $$
$$ \int_5^6(-1)\,dt=-1(6-5)=-1. $$

The displacement is \(2-\frac32-1=-\frac12\) meter. Therefore the final position is \(x(6)=3-\frac12=\frac52\) meters.

Step 3: Find distance, splitting the middle piece at \(t=4\).

$$ \begin{aligned} \int_0^2(2-t)\,dt&=2,\\ \int_2^4(4-t)\,dt &=\left[4t-\frac{t^2}{2}\right]_2^4 =(16-8)-(8-2)=2,\\ \int_4^5(t-4)\,dt &=\left[\frac{t^2}{2}-4t\right]_4^5 =-\frac{15}{2}-(-8)=\frac12,\\ \int_5^6 1\,dt&=1. \end{aligned} $$

Total distance is \(2+2+\frac12+1=\frac{11}{2}\) meters. As a check on final position, initial position plus displacement is \(3-\frac12=\frac52\) meters. The antiderivatives used differentiate to \(2-t\), \(t-4\), and the constant velocities \(1\) or \(-1\), respectively.

A Common Mistake: Taking an Absolute Value Too Soon

Taking the absolute value of the integral over an entire piece does not always give the distance on that piece. In the preceding example, the middle piece has signed integral \(-\frac32\). A tempting calculation is to use \(\left|-\frac32\right|=\frac32\) as the distance on that piece. That is wrong: velocity changes sign at \(t=4\), so the particle travels backward and then forward within the same piece. The actual distance there is \(2+\frac12=\frac52\) meters.

Correction: First locate all interior zeros and any sign changes across piece boundaries. Then integrate \(|v(t)|\) on the resulting intervals and add the nonnegative values. Taking the absolute value only after integrating an interval can conceal cancellation.

A Reliable Procedure

1
Mark the formula intervals.
Write down every time at which the velocity formula changes.
2
Find interior zeros.
Solve \(v(t)=0\) separately within each formula’s interval.
3
Determine signs.
Check each interval between zeros and piece boundaries; compare signs across boundaries to detect a jump-related direction change.
4
Calculate displacement and distance separately.
Add signed integrals for displacement. For distance, reverse the sign of negative-velocity portions, or integrate \(|v|\) on each sign-constant interval.
5
Check the result.
Distance cannot be negative and cannot be less than the absolute value of displacement. If an initial position is given, add displacement—not distance—to find the final position.

Check Your Understanding

For each question, identify the sign changes before calculating. Include units when the question specifies them.

  1. A particle has velocity \(v(t)=t-2\) on \(0\leq t\leq4\). Find its displacement and total distance.
  2. For \(v(t)=-3\) on \(0\leq t\leq1\) and \(v(t)=2\) on \(1<t\leq4\), find displacement and total distance. Does the velocity’s jump change direction?
  3. Why can the absolute value of the signed integral over one formula interval fail to give the distance on that interval?
  4. A particle begins at position \(x(0)=-2\) meters and has displacement \(5\) meters over a time interval. What is its final position?
  5. What information must be checked at a piece boundary if the velocity function is discontinuous there?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon