Calculate total distance
A cart that turns around twice
A cart moves along a straight track with velocity \(v(t) = t^2 - 4t + 3\) meters per second, for \(t\) from 0 to 4. The velocity changes sign at \(t = 1\) and at \(t = 3\), so the cart turns around at these times. The total distance is the length of the whole path, with every move to the right and to the left counted.
Drag the orange edge from 0 to 4. The first green area moves the cart \(\tfrac43\) meter to the right, and the red area moves it \(\tfrac43\) meter back to the left. The last green area moves it \(\tfrac43\) meter to the right again.
Each part of the path between two turns is a leg. Each arrow above the line is as long as the area it comes from, so the three legs add to 4 meters.
Press Flip the red area up. All three pieces are now above the axis, and their total area is the distance, 4 meters.
Speed is the flipped velocity
Press Mark the turning times. The dashed lines mark the times where the velocity changes sign, so the cart turns around there.
Between two dashed lines the velocity has one sign, so the cart moves in one direction. The distance it covers there is the size of that area.
Press Flip the red area up. The new graph is the speed, the size of the velocity without its sign, so it is never negative.
Every piece is now above the axis, so the area under the speed graph is the total distance.
Notation
Speed is the absolute value of the velocity. When the red area flips up, the graph shows the speed.
\[\text{speed} = |v(t)|\]The total distance from time \(a\) to time \(\cy{b}\) is the integral of the speed, the area under the speed graph.
\[\text{distance} = \cb{\int_a^b |v(t)|\,dt}\]To integrate \(|v|\), split the interval at the times \(c_1\) and \(c_2\) where \(v\) changes sign. On a piece where \(v \ge 0\), \(|v| = v\). On a piece where \(v \le 0\), \(|v| = -v\), so each piece adds the size of its own signed area.
\[\begin{aligned} \int_a^b |v|\,dt = {} &\left|\int_a^{c_1} v\,dt\right| + \left|\int_{c_1}^{c_2} v\,dt\right| \\ &+ \left|\int_{c_2}^{b} v\,dt\right| \end{aligned}\]A zero of \(v\) where the sign does not change is not a turn.
When it fails
The integral of \(v\) alone equals the distance only when \(v \ge 0\). Press Integrate without splitting.
The red area cancels part of the green areas, so the integral is the displacement, the change in position shown by the teal arrow. It is shorter than the path.
Example 1: a linear velocity
A robot moves along a rail with velocity \(v(t) = 3 - t\) meters per second for \(0 \le t \le 5\). Find the total distance it travels.
The velocity is 0 when \(3 - t = 0\), at \(t = 3\). It is positive before then and negative after, so the robot moves to the right and then to the left.
\[3 - t = 0 \quad\Rightarrow\quad t = 3\]The green triangle from 0 to 3 has base 3 and height 3. The red triangle from 3 to 5 has base 2 and height 2. The robot moves 4.5 meters to the right, then 2 meters to the left.
\[\begin{gathered} \int_0^3 (3 - t)\,dt = \cg{4.5} \\ \int_3^5 (3 - t)\,dt = \cr{-2} \end{gathered}\]Add the sizes of the areas. The robot travels 6.5 meters. Its displacement is only 4.5 − 2 = 2.5 meters.
\[4.5 + 2 = \cy{6.5}\]
Example 2: three legs
A particle has velocity \(v(t) = t^2 - 7t + 10\) meters per second. Find the total distance it travels from \(t = 0\) to \(t = 6\).
Factor the velocity: \(v = (t - 2)(t - 5)\), which is 0 at \(t = 2\) and at \(t = 5\). It is positive on \([0, 2]\), negative on \([2, 5]\) and positive on \([5, 6]\).
A tempting wrong move: Integrate once over the whole interval and take the absolute value.
\[\left|\int_0^6 v\,dt\right| = |6| = \cr{6}\]The absolute value acts after the red area cancels part of the green areas. The first green arrow alone reaches about 8.7 meters, so the path is longer than 6.
Take the absolute value of each piece before adding. An antiderivative is \(F(t) = \tfrac{t^3}{3} - \tfrac{7t^2}{2} + 10t\), with \(F(0) = 0\), \(F(2) = \tfrac{26}{3}\), \(F(5) = \tfrac{25}{6}\) and \(F(6) = 6\).
\[\begin{aligned} &\bigl|F(2) - F(0)\bigr| = \cg{\tfrac{26}{3}} \\ &\bigl|F(5) - F(2)\bigr| = \cr{\tfrac{9}{2}} \\ &\bigl|F(6) - F(5)\bigr| = \cg{\tfrac{11}{6}} \end{aligned}\]Add the three legs. The particle travels 15 meters, and its displacement is only 6 meters.
\[\tfrac{52}{6} + \tfrac{27}{6} + \tfrac{11}{6} = \cy{15}\]
Practice
A particle has velocity \(v(t) = 4\cos t\) meters per second for \(0 \le t \le \pi\). Find its total distance and its displacement.
The cosine is 0 at \(t = \pi/2\). The graph is above the axis before it and below it after.
Solution
The velocity changes sign at \(t = \tfrac{\pi}{2}\). An antiderivative is \(4\sin t\), so the areas on the two pieces are 4 and \(-4\).
\[\begin{gathered} \int_0^{\pi/2} 4\cos t\,dt = \cg{4} \\ \int_{\pi/2}^{\pi} 4\cos t\,dt = \cr{-4} \end{gathered}\]The distance adds the sizes of the areas. The displacement adds the areas with their signs.
\[\begin{gathered} \text{distance} = 4 + 4 = 8 \\ \text{displacement} = 4 - 4 = 0 \end{gathered}\]
Questions
The figure shows the velocity of a particle in meters per second. It is 3 for the first 2 seconds, then falls in a straight line to −3 at t = 6.
At what time does the particle turn around?
- \(t = 4\)
- \(t = 2\)
- \(t = 6\)
Answer
\(t = 4\)
What is the total distance traveled from \(t = 0\) to \(t = 6\)?
- 12 meters
- 6 meters
- 9 meters
Answer
12 meters
A particle has velocity \(v(t) = 2t - 8\) meters per second. Find the total distance from \(t = 0\) to \(t = 6\).
- 20 meters
- 12 meters
- 16 meters
Answer
20 meters
Summary
You find a total distance by splitting the interval where the velocity changes sign, then adding the sizes of the signed areas of the pieces.
This works because speed is the absolute value of the velocity, and the total distance is the integral of the speed.
You use it when a question asks how far a particle traveled in all, not where it ended.
This is one of four skills in topic 8.2 of Which & Why: AP Calculus.