How do you find the total distance traveled by a particle that moves along a line?

If $p \left(t\right)$ is the position function of a particle, the distance traveled by the particle from $t = {t}_{1}$ to $t = {t}_{2}$ can be found by
${\int}_{{t}_{1}}^{{t}_{2}} | p ' \left(t\right) | \mathrm{dt}$.