Question: Piecewise coding for Acceleration question

Hello,

I have a simple acceleration/position problem that I can't figure out how to use piecewise to put into Maple --- can anyone assist?

A particle, initially at rest, moves along the x-axis such that its acceleration at time t>0 is given by: 

at time t=0, it's position is x=3

I need to use Maple to find the expression for the particles velocity and position, and to find the values for t for the particle at rest.

this what I have done on paper (but can't figure out how to put in Maple):

 

a = dv/dt
v = ∫a(t)dt
= ∫cos(t)dt
= sin(t) + c1
v(0) = 0 ----- the particle is initially at rest
sin(0) + c1 = 0
0 + c1 = 0
c1 = 0
 
s(t) = ∫v(t)dt
= ∫sin(t) dt
= -cos(t) + c2
s(0) = 3
-1 + c2 = 3
c2 = 4
Please Wait...