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

Problem 3.8
solved by Luca Imponenti

Problem Statement
Find a (real) general solution. State which rule you are using. Show each step of your work.
 * $$y''+4y'+4y=e^{-x}cos(x)\!$$

Homogeneous Solution
To find the homogeneous solution, $$y_h\!$$, we must find the roots of the equation

$$\lambda^2+4\lambda+4=0\!$$

$$(\lambda+2)(\lambda+2)=0\!$$

$$\lambda=-2\!$$

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

$$y_h=c_1e^{\lambda x}+c_2xe^{\lambda x}\!$$


 * $$y_h=c_1e^{-2x}+c_2xe^{-2x}\!$$

Particular Solution
We have the following excitation
 * $$r(x)=e^{-x}cos(x)\!$$

From table 2.1, K 2011, pg. 82, we have
 * $$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

$$y_p''+4y_p'+4y_p=r(x)\!$$

where

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

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

and

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

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

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

Plugging these equations back into the differential equation

$$y_p''+4y_p'+4y_p=r(x)\!$$

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

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

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

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

therefore the particular solution to the differential equation is


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

$$y(x)=y_h(x)+y_p(x)\!$$

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

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

The coefficients $$c_1\!$$ and $$c_2\!$$ can be readily solved for given either initial conditions or boundary value conditions.

Problem Statement
Find a (real) general solution. State which rule you are using. Show each step of your work.
 * $$y''+y'+(\pi ^2+\frac{1}{4})y=e^{-\frac{x}{2}}sin(\pi x)\!$$

Homogeneous Solution
To find the homogeneous solution, $$y_h\!$$, we must find the roots of the equation

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

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

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

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

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


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

Particular Solution
We have the following excitation
 * $$r(x)=e^{-\frac{x}{2}}sin(\pi x)\!$$

From table 2.1, K 2011, pg. 82, we have
 * $$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 $$y_p(x)=xe^{-\frac{x}{2}}[Kcos(\pi x)+Msin(\pi x)]\!$$

differentiating

$$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)]\!$$

$$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)])\!$$

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

$$y_p''=e^{-\frac{x}{2}}[-\pi ^2xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^2xMsin(\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)]\!$$

$$y_p''=e^{-\frac{x}{2}}[-\pi ^2xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^2xMsin(\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

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

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

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

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

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

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

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

$$2\pi M=0\!$$

$$-2\pi K=1\!$$

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

and the particular solution to the ODE is


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

$$y=y_h+y_p\!$$

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

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