second-order ODE

## form Second-Order Homogeneous Linear ODE

(1)
$$y''+p(x)y'+q(x)y=0$$

### general solution

(2)
$$y_c(x)=c_1y_1(x)+c_2y_2(x)$$

$y_1$ and $y_2$ are suitable solutions of the ODE that are not proportional.

### particular solution

if we assign specific values to $c_1$ and $c_2$

## form form Second-Order Homogeneous Linear ODE with Constant Coefficients

(3)
$$y''+ay'+by=0$$

### characteristic equation

(4)
\begin{align} \lambda^2+a\lambda+b=0 \end{align}

if $\lambda$ is a solution of the characteristic equation, then $y=e^{\lambda{x}}$ is the solution of the ODE.
$y'=\lambda e^{\lambda x}$, $y''=\lambda^2e^{\lambda x}$

#### (Case I) two real roots if $a^2-4b>0$

(5)
\begin{align} y=c_1e^{\lambda_1x}+c_2e^{\lambda_2x} \end{align}

$\lambda_1=\frac{1}{2}(-a+\sqrt{a^2-4b})$, $\lambda_2=\frac{1}{2}(-a-\sqrt{a^2-4b})$

#### (Case II) a real double root if $a^2-4b=0$

(6)
\begin{align} y=(c_1+c_2x)e^{\frac{-ax}{2}} \end{align}

$\lambda=\lambda_1=\lambda_2=\frac{-a}{2}$

#### (Case III) complex conjugate roots if $a^2-4b<0$

(7)
\begin{align} y=e^{\frac{-ax}{2}}(A\cos{\omega{x}}+B\sin{\omega{x}}) \end{align}

where $\omega^2=b-\frac{1}{4}a^2$
$e^\lambda_1x=e^{-(\frac{a}{2})x+iwx}=e^{-(\frac{a}{2})x}(coswx+isinwx)$
$e^\lambda_2x=e^{-(\frac{a}{2})x-iwx}=e^{-(\frac{a}{2})x}(coswx-isinwx)$
$y_1=(e^{\lambda_1x}+e^{\lambda_2x})/2=e^{-\frac{ax}{2}}coswx$
$y_1=(e^{\lambda_1x}-e^{\lambda_2x})/2i=e^{-\frac{ax}{2}}sinwx$
p.s.
Euler Fomula
$e^{ix}=cosx+isinx$
$e^{-ix}=cosx-isinx$

## form Second-Order Non-homogeneous Linear ODE

(8)
$$y''+p(x)y'+q(x)y=r(x)$$

The general solution is given by $y(x)=y_h(x)+y_p(x)=c_1y_1(x)+c_2y_2(x)+y_p(x)$.

### Find any solution, $y_p$. There are two methods available:

#### Undetermined Coefficients

The Method is suitable for linear ODEs with constant coefficients a and b.
Second order ODE: Non-Homogeneous ( Undetermined Coefficients (1))
Second order ODE: Non-Homogeneous ( Undetermined Coefficients (2))

Basically, in the beginning, we guess the form of the solution to the differential equation, then determine the coefficients in the form. We choose a form for $y_p$ similar to r(x), but with unknown coefficients to be determined by substituting that $y_p$ and its derivatives into the ODE.

For $r(x)=Kx^me^{rx}$:
$y_p(x)=x^s(A_mx^m+\cdots+A_1x+A_0)e^{rx}$,
$s=0$ if $r$ is not a root of the associated characteristic equation;
$s=1$ if $r$ is a simple root of the associated characteristic equation;
$s=2$ if $r$ is a double root of the associated characteristic equation.

For $r(x)=Kx^me^{rx}sin\etax$ or $r(x)=Kx^me^{rx}cos\etax$:
$y_p(x)=x^s(A_mx^m+\cdots+A_1x+A_0)e^{rx}cos\etax+x^s(A_mx^m+\cdots+A_1x+A_0)e^{rt}sin\etax$,
$s=0$ if $r+i\eta$ is not a root of the associated characteristic equation;
$s=1$ if $r+i\eta$ is a simple root of the associated characteristic equation.

Superposition Principle:
If $y_1$ is a solution to $r_1(x)$ and $y_2$ is a solution to $r_2(x)$.
Then $y(x)=c_1y_1(x)+c_2y_2(x)$ is a solution to $c_1r_1(x)+c_2r_2(x)$.

#### Variation of Parameters

Second order ODE: Non-Homogeneous ( Variatin of Parameters)

(9)
\begin{align} y_p(x)=-y_1\int \frac{y_2r}{W}dx+y_2\int \frac{y_1r}{W}dx \end{align}

$W=y_1y_2'-y_2y_1'$

page revision: 27, last edited: 12 Feb 2009 03:43