# Find a particular solution $y_p$ for $5y''+8y'+8y=\cos^{2}(x)$

I'm getting $A = \frac{-3}{68}$ and $B = \frac{1}{34}$ for the guess $y_p = A\cos(2x)+B\sin(2x)$ using the method of undetermined coefficients. Apparently this answer is wrong (with $A$ and $B$ plugged in). Can anyone help me find the right one?

Thanks!

-
That's also incorrect. – user1038665 Oct 20 '12 at 0:40
The full solution is $e^{-4 x/5} \left(c_1 \sin \left(\frac{2 \sqrt{6} x}{5}\right)+c_2 \cos \left(\frac{2 \sqrt{6} x}{5}\right)\right)+\frac{1}{400} (8 \sin (2 x)-6 \cos (2 x)+25)$ – Dr. belisarius Oct 20 '12 at 0:41
Ah, thank you, this works. But can you please elaborate on where the +25 comes from in the particular solution? – user1038665 Oct 20 '12 at 0:44
Since $\cos^2(x) = \frac{1}{2}\cos(2x) + \frac{1}{2}$, your particular solution $y_p$ better have a constant in it. – Shaun Ault Oct 20 '12 at 0:44

Note that the right hand side is ${\cos ^2}(x)$, so want to choose something similar as our particular solution. But $\cos (2x) = {\cos ^2}(x) - {\sin ^2}(x) = 2{\cos ^2}(x) - 1$ so $${\cos ^2}(x) = \frac{1}{2} + \frac{1}{2}\cos (2x)$$ and we can look for a particular solution of the form $${y_p} = A + B\sin (2x) + C\cos (2x).$$

Then you need to use the initial conditions to determine the coefficients or plug ${y_p}$ into the differential equation, collect like terms, and equate the coefficients.

-

Here is a method to determine the PI using the "operator method", if $f(-a^2)\ne0$, then $$\frac{1}{f(D^2)}\cos(ax+b)=\frac{1}{f(-a^2)}\cos(ax+b)$$ First note that $f(D)=5D^2+8D+8$

Now $\cos^2x=1/2+\cos2x/2$ and $1/f(D)(1/2)=(1/8)[1+D(1+5D/8)]^{-1}(1/2)=(1/8)(1/2)=1/16$

Also, $$\frac{1}{f(D)}\cos2x=\frac{1}{5(-4)+8D+8}\cos2x=\frac{1}{4(2D-3)}\cos2x=\frac{2D+3}{4(4D^2-9)}\cos2x$$

$$=\frac{1}{4(-4.4-9)}[2D+3]\cos2x=-\frac{3\cos2x-4\sin2x}{100}$$

Now add these two results to get $y_p$.

-

See below for the details. Your equation is

$$\left( {5{D^2} + 8D + 8} \right)y = {\cos ^2}\left( x \right)$$

Make that into

$$\left( {5{D^2} + 8D + 8} \right)y = \frac{{1 + \cos \left( {2x} \right)}}{2}$$

and apply $D$

\eqalign{ & \left( {5{D^2} + 8D + 8} \right)y = \frac{{1 + \cos \left( {2x} \right)}}{2} \cr & \left( {5{D^2} + 8D + 8} \right)y' = - \sin \left( {2x} \right) \cr & \left( { - 5{D^2} - 8D - 8} \right)y' = \sin \left( {2x} \right) \cr}

Thus, we have \eqalign{ & - 5{D^2} - 8D - 8 = \left( { - 5{D^2} - 8} \right) - 8D \cr & \varphi \left( D \right) = - 5D - 8 \cr & \xi \left( D \right) = - 8 \cr}

and then

$$y' = \frac{{3\sin 2x + 4\cos 2x}}{{100}}{\text{ }}$$

and you solution is $$y = \frac{{ - 3\cos 2x + 4\sin 2x}}{{200}} + C{ _1}$$

I leave it to you to find $C_1$.

I know the following is not completely rigorous, but it has its justifications.

As a generalization of Tapu's solution, suppose we're given

$$\phi(D)=\sum_{k=0}^m a_kD^k$$

where $D=\dfrac d {dx}$. Since $D^2\sin(ax)=-a^2\sin (ax)$, we have that

$$\phi(D^2)\sin(ax)=\phi(-a^2)\sin(ax)$$

But we may write

$$\phi (D) = \sum\limits_{k = 0}^{m'} {{a_{2k}}{D^{2k}}} + \sum\limits_{k = 0}^{m'} {{a_{2k + 1}}{D^{2k + 1}}}$$

whence

$$\phi (D) = \varphi \left( {{D^2}} \right) + D\xi \left( {{D^2}} \right)$$

thus an equation of the form

$$\phi (D)y = \sin ax$$

becomes $$\left[ {\varphi \left( {{D^2}} \right) + D\xi \left( {{D^2}} \right)} \right]y = \sin ax$$

We apply the "conjugate" of the operator to the equation, to get \eqalign{ & \left[ {{\varphi ^2}\left( {{D^2}} \right) - {D^2}{\xi ^2}\left( {{D^2}} \right)} \right]y = \left[ {\varphi \left( {{D^2}} \right) - D\xi \left( {{D^2}} \right)} \right]\sin ax \cr & \left[ {{\varphi ^2}\left( {{D^2}} \right) - {D^2}{\xi ^2}\left( {{D^2}} \right)} \right]y = \varphi \left( { - {a^2}} \right)\sin ax - a\xi \left( { - {a^2}} \right)\cos ax \cr & \left[ {{\varphi ^2}\left( {{D^2}} \right) - {D^2}{\xi ^2}\left( {{D^2}} \right)} \right]y = \alpha \sin ax + \beta \cos ax \cr & \Phi \left( {{D^2}} \right)y = \alpha \sin ax + \beta \cos ax \cr}

Assuming $$\Phi \left( { - {a^2}} \right) \ne 0$$ we may write $$\frac{{\sin ax}}{{\Phi \left( { - {a^2}} \right)}} = \frac{{\sin ax}}{{\Phi \left( {{D^2}} \right)}}$$ so that

\eqalign{ & y = \frac{{\alpha \sin ax + \beta \cos ax}}{{\Phi \left( { - {a^2}} \right)}} \cr & y = \frac{{\varphi \left( { - {a^2}} \right)\sin ax - a\xi \left( { - {a^2}} \right)\cos ax}}{{{\varphi ^2}\left( { - {a^2}} \right) + {a^2}{\xi ^2}\left( { - {a^2}} \right)}} \cr}

For the cosine, you get $$y = \frac{{\varphi \left( { - {a^2}} \right)\cos ax + a\xi \left( { - {a^2}} \right)\sin ax}}{{{\varphi ^2}\left( { - {a^2}} \right) + {a^2}{\xi ^2}\left( { - {a^2}} \right)}}$$

As an example, consider

$$(D^2-3D+2)y=\sin 3x$$

Then $\phi(D)=D^2-3D+2=D^2+2-3D=\varphi(D^2)-D \xi(D^2)$ where $\varphi(D)=D+2$ and $\xi(D)=-3$. Thus $$y = \frac{{ - 7\sin 3x - 3\left( { - 3} \right)\cos 3x}}{{49 + 9{{\left( { - 3} \right)}^2}}} = \frac{{9\cos 3x - 7\sin 3x}}{{130}}$$

-
Why exactly did you post this? – glebovg Oct 20 '12 at 3:04
@glebovg What is your objection? – Pedro Tamaroff Oct 20 '12 at 3:05
I think OP was looking for a solution not a generalization. – glebovg Oct 20 '12 at 3:06
@glebovg I provided with both. It is the general solution to any equation of the form $\phi(D)y=\sin \lambda x$ or $\phi(D)y=\cos \lambda x$, which I think he/she will find handy. Did you downvote? – Pedro Tamaroff Oct 20 '12 at 3:07
Seems unnecessary given the nature of the question. – glebovg Oct 20 '12 at 3:09