So I think my algebra is wrong somewhere. Lets say you have an object that goes under SHM with some initial conditions (amplitude is 5m. The piston is at 5m at t = 0 and period is 20 seconds).
Okay so $x(t) = A sin(\omega_0 + \phi)$. $\phi$ for us is 0. The frequency = $0.05 Hz$, angular frequency = $\frac{\pi}{10}$ and period of the piston = $20s$. The maximum velocity is is when the first derivative $x'(t) = \omega_0 A cos(\omega_0 t)$
The maximum velocity is when the cosine function is 1 at x = 0. So the maximum velocity is $v(t) = A\omega_0$ so that means $cos(\omega_0 t)= 1$ but $\omega_0 = \frac{\pi}{10}$ so the missing value is t. But thats trivial to find, since cosine function is 1. So $t = 20s$
So here is my issue. The maximum velocity can only be at x = 0 (when kinetic energy is max, and potential energy is zero). But the value t = 20s represents the object at x = Amplitude.
So what am I doing wrong?
edit: I just realized that if $x(t) = A sin(\omega_0 + \phi)$ then the initial conditions are not satisfied. When t = 0, sin function goes to 0 and hence everything is 0 but that dosnt satisfy initial conditions. When $t = 0$, displacement should be $5m$ However, if i replace $sin$ with $cos$ then everything works. Is that okay?