The total distance traveled is given by
[tex]\displaystyle\int_1^5|v(t)|\,\mathrm dt[/tex]
You have
[tex]\displaystyle\int_1^5|\cos t|\,\mathrm dt=\int_1^{\pi/2}\cos t\,\mathrm dt-\int_{\pi/2}^{3\pi/2}\cos t\,\mathrm dt+\int_{3\pi/2}^5\cos t\,\mathrm dt[/tex]
[tex]=\left(\sin\dfrac\pi2-\sin1\right)-\left(\sin\dfrac{3\pi}2-\sin\dfrac\pi2\right)+\left(\sin5-\sin\dfrac{3\pi}2\right)[/tex]
[tex]=(1-\sin1)-(-1-1)+(\sin5-(-1))[/tex]
[tex]=4-\sin1+\sin5[/tex]
[tex]\approx2.1996\text{ ft}[/tex]