# Thread: 2nd Order Non-Homogeneous DE

1. ## 2nd Order Non-Homogeneous DE

Firstly Sorry for all the threads, but i have a test on DE's quite soon and i want to clarify as much as possible really without getting on my tutors bad books(i.e. annoying the hell out of her )

I can solve this sort

$y'' + Ay' + B' = Ax^2 + Bx^2 + C$

However this question is like this

$y'' - y = 2cosx - 2sinx$

I haven't a clue how to solve the particular when it ends like that. With my first example you just say $Ax^2 + Bx^2 + C$ and work out the constants, but with this i am unsure.

I have worked out the $y_{c}(x)$ part

and get

$y_{c}(x) = c_{1}e^{-x}+c_{2}e^x$

But i haven't a clue where to start with $y_{p}(x)$

2. Originally Posted by Rapid_W
Firstly Sorry for all the threads, but i have a test on DE's quite soon and i want to clarify as much as possible really without getting on my tutors bad books(i.e. annoying the hell out of her )

I can solve this sort

$y'' + Ay' + B' = Ax^2 + Bx^2 + C$

However this question is like this

$y'' - y = 2cosx - 2sinx$

I haven't a clue how to solve the particular when it ends like that. With my first example you just say $Ax^2 + Bx^2 + C$ and work out the constants, but with this i am unsure.

I have worked out the $y_{c}(x)$ part

and get

$y_{c}(x) = c_{1}e^{-x}+c_{2}e^x$

But i haven't a clue where to start with $y_{p}(x)$

Use $y_p = A \cos (x) + B \sin (x)$.

3. Thanks ever so much!

If for example it was = to 10cosx, what would my plan of action be then?

4. Originally Posted by Rapid_W
Thanks ever so much!

If for example it was = to 10cosx, what would my plan of action be then?
Use $y_p = A \cos (x) + B \sin (x)$.

5. The easiest way of finding $y_p$ when function on the right is a sum of trigonometric functions is to try

$y_p = A \sin x + B \cos x$

and equate coefficients.

I.e.

$y_{p}' = A \cos x - B \sin x$

$y_{p}'' = - (A \sin x + B \cos x) = - y_p$

so substituting for $y_{p}''$ in your equation gives

$y_{p}'' - y_{p} = -2 y_{p} = 2 \cos x - 2 \sin x$

$\Leftrightarrow -A \sin x - B \cos x = \cos x - \sin x$.

I.e. $A = 1$ and $B = -1$ .

So the final solution given by $y = y_c + y_p$ is

$\boxed{ y= c_1 e^{-x} + c_2 e^{x} + \sin x - \cos x }$ .

6. Sorry, Mr. Fantastic's posts weren't there when I started posting.

7. Originally Posted by the_doc
The easiest way of finding $y_p$ when function on the right is a sum of trigonometric functions is to try

$y_p = A \sin x + B \cos x$

and equate coefficients.

I.e.

$y_{p}' = A \cos x - B \sin x$

$y_{p}'' = - (A \sin x + B \cos x) = - y_p$

[snip]
@OP: I will add that this type of particular solution will not work when the non-homogeneous bit of the DE contains $\cos (\lambda x)$ or $\sin (\lambda x)$ terms where $\lambda$ is a solution to the auxillary equation.

8. Thanks i know your answer is correct, but my arithmatic is wrong and i can't work out where

$y_{p}(x)=Asinx+Bcosx$
$y'=Acosx-Bsinx$
$y''=-Asinx - Bsinx$
so
$(-A-B)sinx+(A-B)cosx$
giving
$-A-B=-2$
$A-B=2$
and i keep getting B=0 and A=-2.

i'll run through what you have done again but i can't work out the jump where you have used the iff symbol

9. Worked out where i've gone wrong. I used y', where i should have used y. I've been awake too long lol, thanks everyone for all your help, i think i've cracked this type of DE now!

10. Hit another obstacle, sorry guys...

$y''-7y'+10y=9e^{2x}$

$y_{c}(x) = c_{1}e^{2x}+c_{2}e^{5x}$

and i took what i though was a logical step for $y_{p}(x)$

$y_{p}(x)=Ae^{2x}$

however when i simplified all the substituting i ended up with $0Ae^{2x}$
giving $0A=9$

which is obviously no help because i highly doubt $y_{p}(x)$ can equal $\infty$.

Thanks.

11. Try:

$y_p (x) = A \,x \,e^{2x}$.

When the non-homogeneous part is a multiple of a part of your complementary function (in this case $e^{2x}$) then you should try $x$ times it.

In general you can always use the method of 'Variation of parameters' but it can be alot of work!

12. Thanks, i had just started to try that, there is a lot of work, but i get it down to this

$y_{p}=Axe^{2x}$
$y_{p}'=2Axex^{2x} + Ae^{2x}$
$y_{p}''=4Axe^{2x} + 4Ae^{2x}$

and plugged back in give

$-3Ae^{2x}$

So $-3A = 9$
$A=-3$

so $y_{p}(x)=-3xe^{2x}$

Now, i'm not fully confident with this as Wolfram Alpha lists the particular interval as $-e^{2x}(3x+1)$

y''-7y'+10y=9e^(2x) - Wolfram|Alpha

I understand why the 3x is in the bracket, but where has the +1 come from?

13. Originally Posted by Rapid_W
Thanks, i had just started to try that, there is a lot of work, but i get it down to this

$y_{p}=Axe^{2x}$
$y_{p}'=2Axex^{2x} + Ae^{2x}$
$y_{p}''=4Axe^{2x} + 4Ae^{2x}$

and plugged back in give

$-3Ae^{2x}$

So $-3A = 9$
$A=-3$

so $y_{p}(x)=-3xe^{2x}$

Now, i'm not fully confident with this as Wolfram Alpha lists the particular interval as $-e^{2x}(3x+1)$

y''-7y'+10y=9e^(2x) - Wolfram|Alpha

I understand why the 3x is in the bracket, but where has the +1 come from?
$y_p = -3x e^{2x}$ is the correct particular solution.

If you add the Wolfram Alpha particular solution to $y_c$ you will see why the +1 is irrelevant.

14. Originally Posted by Rapid_W
Firstly Sorry for all the threads, but i have a test on DE's quite soon and i want to clarify as much as possible really without getting on my tutors bad books(i.e. annoying the hell out of her )

I can solve this sort

$y'' + Ay' + B' = Ax^2 + Bx^2 + C$

However this question is like this

$y'' - y = 2cosx - 2sinx$

I haven't a clue how to solve the particular when it ends like that. With my first example you just say $Ax^2 + Bx^2 + C$ and work out the constants, but with this i am unsure.

I have worked out the $y_{c}(x)$ part

and get

$y_{c}(x) = c_{1}e^{-x}+c_{2}e^x$

But i haven't a clue where to start with $y_{p}(x)$

Alternatively, we could take the Laplace transform of both sides. Let $\mathcal{L} \{y(x) \} = Y(s)$. We have $y'' - y = 2 \cos x - 2 \sin x$. Then $\mathcal{L} \{y'' - y \} = \mathcal{L} \{2 \cos x - 2 \sin x \}$. Solve for $Y(s)$. Then take inverse Laplace transforms to get $y(x)$.