When `t=0, x=acos(pixx0//2)=acos0=a`. It means the origin for time measurement lies at the extreme position. When `t=3s,x=acos(pixx3//2)=acos(3pi//2)=0. ` It means the particle has covered a phase `3pi//2` from its starting point, while passing from mean position. Therefore,
the total distance travelled is `=2a+a=3a`.