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.

The solution of linear systems is similar to that of single equations.
First let us lower the degree of the equations by setting $u:=y',v:=z'$ and rewrite the system in a canonical form:
$$u'(t)-pv(t)=0\\v'(t)+pu(t)=pq.$$
Find the general solution of the homogenous system
$$u'(t)-pv(t)=0\\v'(t)+pu(t)=0.$$
You can do that by trying an exponential solution like $u=u_0e^{\lambda t},v=v_0e^{\lambda t}$. You get:
$$\lambda u_0e^{\lambda t}-pv_0e^{\lambda t}=0\\\lambda v_0e^{\lambda t}+pu_0e^{\lambda t}=0,$$
i.e. after simplification
$$\lambda u_0-pv_0=0\\\lambda v_0+pu_0=0.$$
You should recognize an Eigenproblem for a $2\times2$ matrix (two elements are missing). The Eigenvalues are $\pm ip$, and corresponding Eigenvectors are $(1,i), (1,-i)$.
Combining, the general solution can be written
$$u(t)=C_0\cos(pt)+C_1\sin(pt)\\v(t)=C_1\cos(pt)-C_0\sin(pt).$$
Now looking at the non-homogenous system, we should find a constant particular solution:
$$u(t)=u_0\\v(t)=v_0.$$
Plugging in the system we get
$$-pv_0=0\\pu_0=pq,$$
and by identification,
$$u_0=q,v_0=0.$$
Now, to get $y$ and $z$, you combine and integrate once on $t$.
This is a quick summary of a general approach to solve such systems, which can be based on matrix algebra techniques.
