Non-homogenous differential equation

  • Thread starter James889
  • Start date
  • #1
192
1
Hi,

My memory ran away, i completely forgot how to do this =/

I need to solve
[tex]y'' + 4y = tsint,~~y(0) = 0,~y'(0) = 1[/tex]

with the general solution [tex]C_1sin(2t) + C_2cos(2t)[/tex]

[tex]y = Atsin(t) +Btcos(t)[/tex]

[tex]y' = Asin(t) + Atcos(t) +Bcos(t) -Btcos(t)[/tex]

[tex]y'' = Acos(t) + Acos(t) -Atsin(t) - Bsin(t) -Bsin(t) -Btsin(t)[/tex]

substitute back into the first equation:

[tex]2Acos(t) - 2Bsin(t) + 3Atsin(t) + 3Btcos(t)[/tex]

So if i let A be [tex]1/3[/tex] i get [tex]2/3cos(t) + tsin(t)[/tex]

How did you determine the [tex]C_1[/tex] and [tex]C_2[/tex] constants ?
 

Answers and Replies

  • #2
35,285
7,131
Hi,

My memory ran away, i completely forgot how to do this =/

I need to solve
[tex]y'' + 4y = tsint,~~y(0) = 0,~y'(0) = 1[/tex]

with the general solution [tex]C_1sin(2t) + C_2cos(2t)[/tex]

[tex]y = Atsin(t) +Btcos(t)[/tex]
Your particular solution needs two more terms:
yp = Asin(t) + Bcos(t) + Ctsin(t) + Dtcos(t)
[tex]y' = Asin(t) + Atcos(t) +Bcos(t) -Btcos(t)[/tex]

[tex]y'' = Acos(t) + Acos(t) -Atsin(t) - Bsin(t) -Bsin(t) -Btsin(t)[/tex]

substitute back into the first equation:

[tex]2Acos(t) - 2Bsin(t) + 3Atsin(t) + 3Btcos(t)[/tex]

So if i let A be [tex]1/3[/tex] i get [tex]2/3cos(t) + tsin(t)[/tex]

How did you determine the [tex]C_1[/tex] and [tex]C_2[/tex] constants ?
From the initial conditions.
 
  • #3
192
1
ARGH!

I struggled with this all day trying to figure out what i did wrong..
 
  • #4
192
1
Right

[tex]y = ASin(t) + BCos(t) +CtSin(t) + DtCos(t)[/tex]

[tex]y' = ACos(t) - BSin(t) + CSin(t) + CtCos(t) + DCos(t) -DtSin(t)[/tex]

[tex] y'' = -ASin(t) -BCos(t) + CCos(t) +CCos(t) -CtSin(t) - DSin(t) - DSin(t) -DtCos(t)[/tex]


[tex] = -ASin(t) - BCos(t) +2CCos(t) -2DSin(t) -CtSin(t) -DtCos(t)[/tex]


Adding 4y gives me:

[tex] 3ASin(t) + 3BCos(t) - 2DSin(t) + 2CCos(t) + 3CtSin(t) + 3DtCos(t) [/tex]

So [tex]C = 1/3[/tex]
and [tex] B = -2/9[/tex]

But this does not satisfy y(0) = 0
 
  • #5
35,285
7,131
This is your particular solution. The general solution is the solution to the homogeneous problem (you miscalled it the general solution) plus the particular solution. Use the general solution and the initial conditions to find C1 and C2.
 
  • #6
275
0
James889:

If you have problem finding the particular solution using Undetermined Coefficients method,
you can always try using the inginiuos Variation of Parameters by Lagrange ;)

y1(x), y2(x) : are two linearly independent homogeneous solutions.
g(x) : the particular expression, in your case = x*sin(x).

u'1(x)*y1(x) + u'2(x)*y2(x) = 0
u'1'(x)*y'1(x) + u'2(x)*y'2(x) = g(x)

solve the system of equations and find u1(x) and u2(x) by integration.
the particular part of the answer will be:

Y(x) = u1(x)*y1(x) + u2(x)*y2(x).

the complete answer for the ODE (A,B are constants):

y(x) = [A*y1(x)] + [B*y1(x)] + [u1(x)*y1(x) + u2(x)*y2(x)].

*Lagrange was a genius !
 
  • #7
192
1
This is your particular solution. The general solution is the solution to the homogeneous problem (you miscalled it the general solution) plus the particular solution. Use the general solution and the initial conditions to find C1 and C2.


Hm,
So if i put
[tex] y =\frac{t}{3}sin~t - \frac{2}{9}cos~t + C_1sin(2t) + C_2cos(2t)[/tex]


for the condition y(0) = 0 [tex]C_2 = \frac{2}{9}[/tex]

then i have
[tex] y' = \frac{t}{3}cos~t + \frac{2}{9}sin~t + 2C_1cos(2t) -2C_2sin(2t)[/tex]

and for
[tex]y'(0) = 1[/tex]

[tex]\frac{1}{3} + 2C_1 = 1, \rightarrow C_1 = \frac{2}{6}[/tex]

Is this correct?
 
  • #8
35,285
7,131
Check it for yourself. You have y = (1/3) tsin(t) - (2/9) cos(t) + (1/3) sin(2t) + (2/9) cos(2t).

This is the solution if
1) it satisfies the initial conditions y(0) = 0 and y'(0) = 1, and
2) it satisfies the diff. equation y'' + 4y = tsin(t).
 

Related Threads on Non-homogenous differential equation

  • Last Post
Replies
5
Views
995
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
14
Views
3K
  • Last Post
Replies
2
Views
6K
  • Last Post
Replies
1
Views
851
  • Last Post
Replies
4
Views
841
Replies
2
Views
1K
Replies
3
Views
2K
Replies
31
Views
2K
Top