# Can't get this Differential Eq

• Oct 27th 2006, 11:05 PM
doke
Can't get this Differential Eq
Find a particular solution for y"+y=sinx+xcosx

I used an initial guess of

yp(x)= Asinx+Bcosx+Cxcosx+Dxsinx

y'p(x)= Acosx-Bsinx-Cxsinx+Ccosx+Dxcosx+Dsinx

y"p(x)= -Asinx-Bcosx-Cxcosx-Csinx-Csinx-Dxsinx+Dcosx+Dcosx

I end up with the following system of equations to solve my coefficients

-A+A-C-C (sinx)=1(sinx)

-B+D+D+B(cosx)=0(cosx)

-C+C=1 (xcosx) How can this be??? 0=1??
:confused: :confused: :confused:
-D+D=0 (xsinx)

Here's where I hit my snag. The answer has an x^2 power in it too. I'm stumped!:eek:
• Oct 28th 2006, 08:32 AM
Soroban
Hello, doke!

Quote:

Find a particular solution for: . $y'' + y\:=\:\sin x + x\cos x$

We already know that: $y \:=\:C_1\cos x + C_2\sin x$ is a homogenous solution.

Due to the $y''$, we must begin "two level higher".

We will try:
. . $y \:=\:Ax\sin x + Bx\cos x + Cx^2\sin x + Dx^2\cos x$

Then:
. . $y'\:=\:A\sin x + B\cos x + (C-2B)\sin x + (A + 2D)x\cos x - Dx^2\sin x + Cx^2\cos x$

And:
. . $y'' \:=\:2(C - B)\sin x + 2(A + D)\cos x - (A + 4D)\sin x \,+$ $(4C - B)x\cos x - Cx^2\sin x + Dx^2\cos x$

Hence:
. . $y'' + y \;=\;2(C - B)\sin x + 2(A + D)\cos x - 4Dx\sin x + 4Cx\cos x$ $=\;\sin x + x\cos x$

Then: . $\begin{Bmatrix}2(C - B) = 1 \\2(A + D) = 0\\ -4D = 0 \\ 4C = 1\end{Bmatrix}$

Solve the system and get: . $A = 0,\;\;B = \text{-}\frac{1}{4},\;\;C = \frac{1}{4},\;\;D = 0$

Therefore, the particular solution is: . $\boxed{y_p \:=\:-\frac{1}{4}x\cos x + \frac{1}{4}x^2\sin x}$

• Oct 28th 2006, 10:23 AM
doke
Wow! Thank you very much. I do have a question though... as a matter of general procedure, I suppose I could have used Asinx + Bcosx +Cxsinx +Dxcosx + Ex^2sinx + Fx^2cosx correct? I guess the extra terms will probably drop out but it seems more "consistent" to me.

I've done other problems such as y" -4y = sinhx and didn't start "two levels higher". Why did those work out okay and this one didn't?

• Oct 28th 2006, 03:12 PM
ThePerfectHacker
Quote:

Originally Posted by doke
I've done other problems such as y" -4y = sinhx and didn't start "two levels higher". Why did those work out okay and this one didn't?

The equation is,
$y''-4y=\frac{1}{2}e^x-\frac{1}{2}e^{-x}$
The charachteristic equation is,
$k^2-4=0$
The solutions are,
$k=\pm 2$
Thus, the two linearly independant solutions are,
$e^{2x} \mbox{ and }e^{-2x}$
That means when you search for a particular solution to the non-homogenous equation you look for,
$Ae^{x}+Be^{-x}$
Since, $e^x,e^{-x}$ are not part of the two linearlt independant solutions.
However you had, $\sinh (2x)$ then you need to "raise one level" because, $e^{2x}, e^{-2x}$ are the independant solutions.