# University of Florida/Egm4313/s12.team13.steinberg.r1

## R1.5A

### Problem Statement

4.) Find the general solution to the following ODE and check the result by substitution.

${\displaystyle y''+4y'+(\pi ^{2}+4)y=0\,\!}$

### Solution

The homogeneous characteristic equation for linear 2nd order ODE's with constant coefficients is

${\displaystyle \lambda ^{2}+a\lambda +b=0\,\!}$

(5.1)

For the ODE in this problem, the characteristic equation becomes

${\displaystyle \lambda ^{2}+4\lambda +(\pi ^{2}+4)=0\,\!}$

To solve for the solutions, the discriminant to the quadratic equation must first be calculated.

${\displaystyle \Delta =a^{2}-4b\,\!}$

(5.2)

${\displaystyle \Delta =16-4(\pi ^{2}+4)\,\!}$ ${\displaystyle =16-4\pi ^{2}-16\,\!}$ ${\displaystyle =-4\pi ^{2}\,\!}$

Since the discriminant is negative, there will be two imaginary solutions to the ODE. The solutions can be obtained by solving the remainder of the quadratic formula.

${\displaystyle \lambda _{1,2}={\frac {-a\pm {\sqrt {a^{2}-4b}}}{2}}\,\!}$

(5.3)

${\displaystyle \lambda _{1,2}={\frac {-4\pm {\sqrt {-4\pi ^{2}}}}{2}}\,\!}$ ${\displaystyle ={\frac {-4\pm 2\pi i}{2}}\,\!}$ ${\displaystyle =-2\pm \pi i\,\!}$

Therefore,

${\displaystyle \lambda _{1}=-2+\pi i\,\!}$

(5.4)

${\displaystyle \lambda _{2}=-2-\pi i\,\!}$

(5.5)

The two distinct, linearly independent, homogeneous solutions for the case with two imaginary roots are

${\displaystyle y_{h,1}(x)=e^{a_{1}x}\cos b_{1}x\,\!}$

(5.6)

${\displaystyle y_{h,2}(x)=e^{a_{2}x}\sin b_{2}x\,\!}$

(5.7)

The homogeneous solution is

${\displaystyle y_{h}=c_{1}y_{h,1}+c_{2}y_{h,2}\,\!}$

(5.8)

${\displaystyle y_{h}(x)=c_{1}e^{a_{1}x}\cos b_{1}x+c_{2}e^{a_{2}x}\sin b_{2}x\,\!}$

${\displaystyle y_{h}(x)=c_{1}e^{-2x}\cos \pi x+c_{2}e^{-2x}\sin \pi x\,\!}$

The final general solution is therefore

${\displaystyle y_{h}(x)=e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)\,\!}$

(5.9)

To check this result using substitution, we must take the first and second derivatives of the general solution to substitute back into the original ODE.

${\displaystyle y'(x)=-2e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)+e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)\,\!}$

(5.10)

${\displaystyle y''(x)=4e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)-2e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)-2e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)+e^{-2x}(-\pi ^{2}c_{1}\cos \pi x-\pi ^{2}c_{2}\sin \pi x)\,\!}$

(5.11)

${\displaystyle =4e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)-4e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)+e^{-2x}(-\pi ^{2}c_{1}\cos \pi x-\pi ^{2}c_{2}\sin \pi x)\,\!}$

Substituting back into the original ODE gives

${\displaystyle y''+4y'+(\pi ^{2}+4)y=0\,\!}$

(5.12)

${\displaystyle 4e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)-{\cancelto {0}{4e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)}}+e^{-2x}(-\pi ^{2}c_{1}\cos \pi x-\pi ^{2}c_{2}\sin \pi x)-8e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)+{\cancelto {0}{4e^{-2x}(-\pi c_{1}\sin \pi x+\pi c_{2}\cos \pi x)}}+(\pi ^{2}+4)(e^{-2x})(c_{1}\cos \pi x+c_{2}\sin \pi x)=0\,\!}$

${\displaystyle {\cancelto {0}{-4e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)}}+{\cancelto {0}{e^{-2x}(-\pi ^{2}c_{1}\cos \pi x-\pi ^{2}c_{2}\sin \pi x)}}+{\cancelto {0}{(\pi ^{2}+4)(e^{-2x})(c_{1}\cos \pi x+c_{2}\sin \pi x)}}=0\,\!}$

Since all terms cancel to 0, ${\displaystyle y_{(}x)=e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)\,\!}$ is a general solution to the original ODE.