# Differential equations - Second order ordinary differential equations

1. Homogeneous Linear Equations with Constant Coefficients
$y''+py'+qy=0.$
The characteristic equation is
$\lambda^2+p\lambda+q=0.$
If $\lambda_1$ and $\lambda_2$ are distinct real roots of the characteristic equation , then the general solution is
$y=C_1e^{\lambda_1x}+C_2e^{\lambda_2x},$ Where
$C_1$ and $C_2$ are integration contstants.
If $\lambda_1=\lambda_2=-{p \over 2},$then the general solution is
$y=(C_1+C_2x)e^{{-p \over 2}x}.$
If $\lambda_1$ and $\lambda_2$ are complex numbers :
$\lambda_1=\alpha+\beta i,\lambda_2=\alpha- \beta i,$ where
$\alpha= -{p \over 2}, \beta= {\sqrt {4q-p^2} \over 2},$
then the general solution is
$y=e^{\alpha x}(C_1cos\beta x+C_2 sin \beta x).$
2. Inhomogeneous Lineaar Equations with Constant Coefficints.
$y''+py'+qy=f(x).$
The general solution is given by
$y=y_p+y_h,$ where
$y_p$ is a particular solution of the inhomogeneous equation and $y_h$ is the general solution of the associated homogeneous equation

If the right side has the form
$f(x)=e^{\alpha x}(P_1(x)cos \beta x+P_1(x)sin \beta x),$
then the particular solution $y_p$is given by
$y_p=x^ke^{\alpha x}(R_1(x) cos \beta x +R_2(x)sin \beta x),$
Where the polynomials $R_1(x)$ and $R_2(x)$ have to be found by using the method of undetermined coefficients.
*   If $\alpha +\beta i$ is not a root of the characteristic equation, then the power k=0 ,
*   If $\alpha +\beta i$ is a simple root , then k=1 ,
*   If $\alpha +\beta i$ is a double root , then k=2.
3. Differential Equations with Y Missing
$y''= f(x,y').$
Set  u=y' . Then the new equation satisfied by v is
$u'=f(x,u),$
Which is a first order differential equation.
4. Differential Equations with x Missing
$y''=f(y,y').$
$Set \;\;\;u=y'. Since$
$y''={du \over dx }={du \over dy} {dy \over dx}=u{du \over dy },$
We have
$u{du \over dy }= f(y,u),$
Which is a first order differential equation.
5. Free Undamped Vibrations
The motion of a Mass pn a Spring is described by the equation  $m \ddot {y}+ky=0,$
where
m is the mass of the object,
k is the stiffness of the spring
y is displacement of the mass from equilibrium.

The general solution is
$y= A\, cos ( \omega_0t-\delta),$
Where
A is the amplitude of the displacement ,
$\omega_0$ is the fundamental frequency, the peruod is $T = {2 \pi \over \omega_0 },$
$\delta$ is phase angle of the displacement ,
This is and example of simple harmonic motion.
6. Free Damped Vibrations
$m \ddot{y}+\gamma \dot{y}+ky=0 ,$Where
$\gamma$ is the damping coefficient.
There are 3 cases for the general solution :

Case 1:   $\gamma^2 > 4 km$ (overdamped )
$y(t)=Ae^{\gamma_1t}+Bc^{\gamma_2t},$
Where
$\lambda_1={- \gamma - {\sqrt {\gamma-4km}} \over 2 m},$
$\lambda_2={- \gamma +{\sqrt {\gamma^2-4km}} \over 2 m},$

Case 2:  $\gamma^2 > 4 km$ ( Crirically Damped )
$y(t)=(A+Bt)e^{\gamma t},$
Where
$\lambda =- {\gamma \over 2m}$.

Case 3:  $\gamma^2 > 4 km$ (underdamped )
$y(t)= e^{{\gamma \over2m}t} A\;cos(\omega t-\delta),$ Where
$\omega=\sqrt {4km-\gamma^2} \; \; .$
7. Simple Pendulum
${d^2 \theta \over dt^2}+{g \over L } \theta=0 ,$
where $\theta$ is the angular displacement , L is the pendulum  length, g is the acceleration of gravity .
$\theta(t)=\theta_{max} sin \sqrt {{g \over L}t},$ the period is $T=2 \pi \sqrt {L \over g}$   .
8. RLC Circuit
$L{d^2I \over dt^2}+R{dI \over dt}+{1 \over C}I=V'(t)=\omega E_0 \, cos (\omega t) ,$
Where I is the current in and RLC circuit with an ac voltage source $V(t)= E_0 \; sin(\omega t).$

The general solution is
$I(t)=C_1e^{r_1t}+C_2e^{r_2t}+A\, sin(\omega t-\phi),$
Where
$r_{1,2}={-R \pm \sqrt {R^2-{4L \over C}} \over 2L} \, ,$
$A= {\omega E_0 \over \sqrt {(L \omega^2-{1 \over C})}+R^2 \omega^2 } \; ,$
$\phi= arctan ({L\omega \over R}-{1 \over RC\omega})$
$C_1,C_2$ are constants depending on initial conditions.