# 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.

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

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

$\lambda ^{2}+a\lambda +b=0\,\!$ (5.1)

For the ODE in this problem, the characteristic equation becomes

$\lambda ^{2}+4\lambda +(\pi ^{2}+4)=0\,\!$ To solve for the solutions, the discriminant to the quadratic equation must first be calculated.

$\Delta =a^{2}-4b\,\!$ (5.2)

$\Delta =16-4(\pi ^{2}+4)\,\!$ $=16-4\pi ^{2}-16\,\!$ $=-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.

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

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

$\lambda _{1}=-2+\pi i\,\!$ (5.4)

$\lambda _{2}=-2-\pi i\,\!$ (5.5)

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

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

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

The homogeneous solution is

$y_{h}=c_{1}y_{h,1}+c_{2}y_{h,2}\,\!$ (5.8)

$y_{h}(x)=c_{1}e^{a_{1}x}\cos b_{1}x+c_{2}e^{a_{2}x}\sin b_{2}x\,\!$ $y_{h}(x)=c_{1}e^{-2x}\cos \pi x+c_{2}e^{-2x}\sin \pi x\,\!$ The final general solution is therefore

$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.

$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)

$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)

$=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

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

$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\,\!$ ${\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, $y_{(}x)=e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)\,\!$ is a general solution to the original ODE.