solving differential equation? I have encountered this set of equation in a book explaining the cycloid motion of particle in orthogonal magnetic and electric field. In usual coordinate system.
$y''(t)=pz'(t)$
$z''(t)=p(q-y'(t))$
where p and q are constants and $y(t)$, $z(t)$ are position of particle in space at time t.Their general solution they written is 
$y(t)=C_1\cos(pt)+C_2\sin(pt)+qt+C_3$
$z(t)=C_2\cos(pt)-C_1\sin(pt)+C_4$
which i am unable to solve. Please help.

from equation 1
$$z'=\frac{y''}{p}$$
$$z''=\frac{y'''}{p}$$
substitute in the second equation
$$\frac{y'''}{p}=pq-py'$$
$$y'''+p^2y'=p^2q$$
integrate both sides
$$y''+p^2y=p^2qt+K_3$$
the particular solution is
$$y_p=C_1\cos pt+C_2\sin pt$$
to find the complementary solution we will assume 
$$y_c=At+B$$
substitute to get
$$A=q$$
$$B=\frac{K_3}{p^2}=C_3$$
So
$$y=y_p+y_c$$
$$y=C_1\cos pt+C_2\sin pt+C_3+q*t$$
then you can use this solution to find the $z$
