4.) Find the general solution to the following ODE and check the result by substitution.
y
″
+
4
y
′
+
(
π
2
+
4
)
y
=
0
{\displaystyle y''+4y'+(\pi ^{2}+4)y=0\,\!}
The homogeneous characteristic equation for linear 2nd order ODE's with constant coefficients is
λ
2
+
a
λ
+
b
=
0
{\displaystyle \lambda ^{2}+a\lambda +b=0\,\!}
(5.1)
For the ODE in this problem, the characteristic equation becomes
λ
2
+
4
λ
+
(
π
2
+
4
)
=
0
{\displaystyle \lambda ^{2}+4\lambda +(\pi ^{2}+4)=0\,\!}
To solve for the solutions, the discriminant to the quadratic equation must first be calculated.
Δ
=
a
2
−
4
b
{\displaystyle \Delta =a^{2}-4b\,\!}
(5.2)
Δ
=
16
−
4
(
π
2
+
4
)
{\displaystyle \Delta =16-4(\pi ^{2}+4)\,\!}
=
16
−
4
π
2
−
16
{\displaystyle =16-4\pi ^{2}-16\,\!}
=
−
4
π
2
{\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.
λ
1
,
2
=
−
a
±
a
2
−
4
b
2
{\displaystyle \lambda _{1,2}={\frac {-a\pm {\sqrt {a^{2}-4b}}}{2}}\,\!}
(5.3)
λ
1
,
2
=
−
4
±
−
4
π
2
2
{\displaystyle \lambda _{1,2}={\frac {-4\pm {\sqrt {-4\pi ^{2}}}}{2}}\,\!}
=
−
4
±
2
π
i
2
{\displaystyle ={\frac {-4\pm 2\pi i}{2}}\,\!}
=
−
2
±
π
i
{\displaystyle =-2\pm \pi i\,\!}
Therefore,
λ
1
=
−
2
+
π
i
{\displaystyle \lambda _{1}=-2+\pi i\,\!}
(5.4)
λ
2
=
−
2
−
π
i
{\displaystyle \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
{\displaystyle 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
{\displaystyle 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
{\displaystyle 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
{\displaystyle 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
−
2
x
cos
π
x
+
c
2
e
−
2
x
sin
π
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
y
h
(
x
)
=
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
{\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.
y
′
(
x
)
=
−
2
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
+
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
{\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)
y
″
(
x
)
=
4
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
−
2
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
−
2
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
+
e
−
2
x
(
−
π
2
c
1
cos
π
x
−
π
2
c
2
sin
π
x
)
{\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)
=
4
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
−
4
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
+
e
−
2
x
(
−
π
2
c
1
cos
π
x
−
π
2
c
2
sin
π
x
)
{\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
y
″
+
4
y
′
+
(
π
2
+
4
)
y
=
0
{\displaystyle y''+4y'+(\pi ^{2}+4)y=0\,\!}
(5.12)
4
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
−
4
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
0
+
e
−
2
x
(
−
π
2
c
1
cos
π
x
−
π
2
c
2
sin
π
x
)
−
8
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
+
4
e
−
2
x
(
−
π
c
1
sin
π
x
+
π
c
2
cos
π
x
)
0
+
(
π
2
+
4
)
(
e
−
2
x
)
(
c
1
cos
π
x
+
c
2
sin
π
x
)
=
0
{\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\,\!}
−
4
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
0
+
e
−
2
x
(
−
π
2
c
1
cos
π
x
−
π
2
c
2
sin
π
x
)
0
+
(
π
2
+
4
)
(
e
−
2
x
)
(
c
1
cos
π
x
+
c
2
sin
π
x
)
0
=
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,
y
(
x
)
=
e
−
2
x
(
c
1
cos
π
x
+
c
2
sin
π
x
)
{\displaystyle y_{(}x)=e^{-2x}(c_{1}\cos \pi x+c_{2}\sin \pi x)\,\!}
is a general solution to the original ODE.
Section 2 Lecture Notes