Valentin K. answered 03/28/24
Expert PhD tutor in Calculus, Statistics, and Physics
displacement = ∫(2 to 8) v(t) dt
distance = ∫(2 to 8) |v(t)| dt
The distance integrates the absolute value of the velocity (called speed), i.e. the direction of motion doesn't matter, the distance traveled always increases.
The absolute value:
|v(t)| = - v(t) from t = 2 to 5, since v(t) is negative there
|v(t)| = + v(t) from t = 5 to 8, since v(t) is positive there
So, you have to split the integral:
distance = ∫(2 to 5) ( - v(t)) dt + ∫(5 to 8) v(t) dt
I assume you can take the simple integrals yourself. I hope that helps.