Consider an object moving along a line that has velocity and initial position given by

\begin{align*} v(t) &= -\pi \cos (\pi t)\\ s(0) &= 2 \end{align*}

for \(0\leq t\leq 4\).

The position function for the particle for \(0\leq t\leq 4\) is given by

\[ s(t) = \answer {2-\sin (\pi t)}. \]