University of Florida/Egm4313/s12.team11.imponenti/R3.8

Problem 3.8

solved by Luca Imponenti

Kreyszig 2011 pg.84 problem 5

Problem Statement

Find a (real) general solution. State which rule you are using. Show each step of your work.

${\displaystyle y''+4y'+4y=e^{-x}cos(x)\!}$

Homogeneous Solution

To find the homogeneous solution, ${\displaystyle y_{h}\!}$, we must find the roots of the equation

${\displaystyle \lambda ^{2}+4\lambda +4=0\!}$

${\displaystyle (\lambda +2)(\lambda +2)=0\!}$

${\displaystyle \lambda =-2\!}$

We know the homogeneous solution for the case of a double root to be

${\displaystyle y_{h}=c_{1}e^{\lambda x}+c_{2}xe^{\lambda x}\!}$

${\displaystyle y_{h}=c_{1}e^{-2x}+c_{2}xe^{-2x}\!}$

Particular Solution

We have the following excitation

${\displaystyle r(x)=e^{-x}cos(x)\!}$

From table 2.1, K 2011, pg. 82, we have

${\displaystyle y_{p}(x)=e^{-x}[Kcos(x)+Msin(x)]\!}$

Since this does not correspond to our homogeneous solution we can use the Basic Rule (a), K 2011, pg. 81 to solve for the particular solution

${\displaystyle y_{p}''+4y_{p}'+4y_{p}=r(x)\!}$

where

${\displaystyle y_{p}'=e^{-x}[-Ksin(x)+Mcos(x)]-e^{-x}[Kcos(x)+Msin(x)]\!}$

${\displaystyle y_{p}'=e^{-x}[-Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]\!}$

and

${\displaystyle y_{p}''=e^{-x}[-Kcos(x)-Msin(x)+Ksin(x)-Mcos(x)]-e^{-x}[Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]\!}$

${\displaystyle y_{p}''=e^{-x}[-Kcos(x)-Msin(x)+Ksin(x)-Mcos(x)+Ksin(x)-Mcos(x)+Kcos(x)+Msin(x)]\!}$

${\displaystyle y_{p}''=e^{-x}[2Ksin(x)-2Mcos(x)]\!}$

Plugging these equations back into the differential equation

${\displaystyle y_{p}''+4y_{p}'+4y_{p}=r(x)\!}$

${\displaystyle e^{-x}[2Ksin(x)-2Mcos(x)]+4e^{-x}[-Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]+4e^{-x}[Kcos(x)+Msin(x)]=e^{-x}cos(x)\!}$

${\displaystyle e^{-x}[2Ksin(x)-2Mcos(x)-4Ksin(x)+4Mcos(x)-4Kcos(x)-4Msin(x)+4Kcos(x)+4Msin(x)]=e^{-x}cos(x)\!}$

${\displaystyle 2Mcos(x)-2Ksin(x)=cos(x)\!}$

from the above equation it is obvious that ${\displaystyle K=0\!}$ and ${\displaystyle M={\frac {1}{2}}\!}$

therefore the particular solution to the differential equation is

${\displaystyle y_{p}(x)={\frac {1}{2}}e^{-x}sin(x)\!}$

General Solution

The general solution will be the summation of the homogeneous and particular solutions

${\displaystyle y(x)=y_{h}(x)+y_{p}(x)\!}$

${\displaystyle y(x)=c_{1}e^{-2x}+c_{2}xe^{-2x}+{\frac {1}{2}}e^{-x}sin(x)\!}$

   ${\displaystyle y(x)=e^{-2x}(c_{1}+c_{2}x)+{\frac {1}{2}}e^{-x}sin(x)\!}$


The coefficients ${\displaystyle c_{1}\!}$ and ${\displaystyle c_{2}\!}$ can be readily solved for given either initial conditions or boundary value conditions.

Kreyszig 2011 pg.84 problem 6

Problem Statement

Find a (real) general solution. State which rule you are using. Show each step of your work.

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

Homogeneous Solution

To find the homogeneous solution, ${\displaystyle y_{h}\!}$, we must find the roots of the equation

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

${\displaystyle \lambda ={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}\!}$ with ${\displaystyle a=1,b=1,c=(\pi ^{2}+{\frac {1}{4}})\!}$

${\displaystyle \lambda ={\frac {-1\pm {\sqrt {1^{2}-4*1*(\pi ^{2}+{\frac {1}{4}})}}}{2*1}}\!}$

${\displaystyle \lambda =-\alpha \pm i\omega =-{\frac {1}{2}}\pm \pi i\!}$

We know the homogeneous solution for the case of a double root to be

${\displaystyle y_{h}=e^{-\alpha x}[Acos(\omega x)+Bsin(\omega x)]\!}$

${\displaystyle y_{h}=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)]\!}$

Particular Solution

We have the following excitation

${\displaystyle r(x)=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

From table 2.1, K 2011, pg. 82, we have

${\displaystyle y_{p}(x)=e^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]\!}$

Since this corresponds to our homogeneous solution we must use the Modification Rule (b), K 2011, pg. 81 to solve for the particular solution

so ${\displaystyle y_{p}(x)=xe^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]\!}$

differentiating

${\displaystyle y_{p}'=\pi xe^{-{\frac {x}{2}}}[-Ksin(\pi x)+Mcos(\pi x)]+(e^{\frac {x}{2}}-{\frac {1}{2}}xe^{-{\frac {x}{2}}})[Kcos(\pi x)+Msin(\pi x)]\!}$

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}(\pi x[-Ksin(\pi x)+Mcos(\pi x)]+(1-{\frac {1}{2}}x)[Kcos(\pi x)+Msin(\pi x)])\!}$

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}[-\pi xKsin(\pi x)+\pi xMcos(\pi x)+Kcos(\pi x)+Msin(\pi x)-{\frac {1}{2}}xKcos(\pi x)-{\frac {1}{2}}xMsin(\pi x)]\!}$

and

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[-\pi ^{2}xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^{2}xMsin(\pi x)+\pi Mcos(\pi x)-\pi Ksin(\pi x)+\pi Mcos(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Msin(\pi x)]-{\frac {1}{2}}e^{-{\frac {x}{2}}}[-\pi xKsin(\pi x)+\pi xMcos(\pi x)+Kcos(\pi x)+Msin(\pi x)-{\frac {1}{2}}xKcos(\pi x)-{\frac {1}{2}}xMsin(\pi x)]\!}$

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[-\pi ^{2}xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^{2}xMsin(\pi x)+\pi Mcos(\pi x)-\pi Ksin(\pi x)+\pi Mcos(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Msin(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}Msin(\pi x)+{\frac {1}{4}}xKcos(\pi x)+{\frac {1}{4}}xMsin(\pi x)]\!}$

grouping cosine and sine terms we get

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)]\!}$

and

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}[(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)]\!}$

next we substitute the above equations into the ODE

${\displaystyle y_{p}''+y_{p}'+(\pi ^{2}+{\frac {1}{4}})y_{p}=r(x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)]+e^{-{\frac {x}{2}}}[(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)]+(\pi ^{2}+{\frac {1}{4}})xe^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)+(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)+(\pi ^{2}+{\frac {1}{4}})x(Kcos(\pi x)+Msin(\pi x))]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K+\pi xM+K-{\frac {1}{2}}xK+(\pi ^{2}+{\frac {1}{4}})xK)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K-\pi xK+M-{\frac {1}{2}}xM+(\pi ^{2}+{\frac {1}{4}})xM)sin(\pi x)]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle 2\pi Mcos(\pi x)-2\pi Ksin(\pi x)=sin(\pi x)\!}$

after cancelling terms; we can equate cosine and sine coefficients to get two equations

${\displaystyle 2\pi M=0\!}$

${\displaystyle -2\pi K=1\!}$

so ${\displaystyle M=0\!}$ and ${\displaystyle K=-{\frac {1}{2\pi }}\!}$

and the particular solution to the ODE is

${\displaystyle y_{p}(x)=-{\frac {1}{2\pi }}xe^{-{\frac {x}{2}}}cos(\pi x)\!}$

General Solution

The general solution will be the summation of the homogeneous and particular solutions

${\displaystyle y=y_{h}+y_{p}\!}$

${\displaystyle y=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)]-{\frac {1}{2\pi }}xe^{-{\frac {x}{2}}}cos(\pi x)\!}$

   ${\displaystyle y=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)-{\frac {1}{2\pi }}xcos(\pi x)]\!}$


Egm4313.s12.team11.imponenti 04:28, 21 February 2012 (UTC)