Solving second order unhomogonous equations

  • Thread starter Thread starter sweep123
  • Start date Start date
  • Tags Tags
    Second order
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
9 replies · 2K views
sweep123
Messages
15
Reaction score
0

Homework Statement


solve y"+y=xsin(x) , initial conditions y(0)=0, y'(0)=1


Homework Equations





The Attempt at a Solution


I know that when right hand side equals something like sin(x), then the particular integral is xc1sin(x)+xc2cos(x). I am unsure what the particular integral should be for above. can anyone help me. I have tried (x^2)c1sin(x)+(x^2)c2cos(x), but have not gotten a solution from it. Thanks
 
Physics news on Phys.org
instead of looking at that equation you could try to look at an equivalent equation
[tex]L[y] = y'' + y = xe^{ix}[/tex], where [tex]i = \sqrt{-1}[/tex]. then since [tex]i[/tex] is a particular root of the characteristic equation, y has a solution of the form
[tex]y = x^{2}A_{0}e^{ix}[/tex] from there it is easily shown that the complex part of the solution of [tex]y[/tex] is the solution of the original equation you proposed.

You could also try the variation of parameters method but I often avoid it because of messy integration
 
Last edited:
Dmak said:
instead of looking at that equation you could try to look at an equivalent equation
[tex]L[y] = y'' + y = xe^{ix}[/tex], where [tex]i = \sqrt{-1}[/tex]. then since [tex]i[/tex] is a particular root of the characteristic equation, y has a solution of the form
[tex]y = x^{2}A_{0}e^{ix}[/tex] from there it is easily shown that the complex part of the solution of [tex]y[/tex] is the solution of the original equation you proposed.

You could also try the variation of parameters method but I often avoid it because of messy integration

I really don't know what you are talking about, but neither the real nor the imaginary part of x^2*exp(ix) is a particular solution to y''+y=x*sin(x).
 
Dick said:
I really don't know what you are talking about, but neither the real nor the imaginary part of x^2*exp(ix) is a particular solution to y''+y=x*sin(x).

whoops what i meant was a particular solution of the form:
[tex]y = x(A_{0} + A_{1}x)e^{xi}[/tex] you have to derive the coefficients by evaluating [tex]L[y][/tex] and matching up the coefficients [tex]A_{0}, A_{1}[/tex] with the right hand side of the equation ( [tex]xe^{ix}[/tex] ) then you use the imaginary portion of this solution, this one was more tedious than I thought and I would recommend using the variation of parameters method.
 
thanks. that's really helpful. is there anyway of knowing what the particular integral is for any unhomogenous second order differential equation, or is it just trial and error?
 
ive just tried substituting the particular integral
y(x)= c1(x^2)sin(x)+c2(x^2)cos(x)+xc3sin(x)+xc4cos(x) into y"+y=xsinx. I end up with
2c1sin(x)+4xc1cos(x)+2c2cos(x)-4xc2sin(x)+2c3cos(x)-2c4sin(x)=xsin(x)

This doesn't look solvable. I've checked my differentiating a couple of times and it looks okay. Any suggestions where I may be going wrong?
 
Last edited:
This would be a fine method: http://www.sosmath.com/diffeq/second/variation/variation.html

essentially find two homogeneous solutions [tex]y_{1}, y_{2}[/tex] then using those you can find a solution to the differentiall equation of the form,

[tex]\phi(x) = y_{1}u_{1} + y_{2}u_{2}[/tex]
where
[tex]u'_{1} = \frac{-sin(x)y_{2}}{W[y_{1}, y_{2}]}[/tex]
[tex]u'_{2} = \frac{sin(x)y_{1}}{W[y_{1}, y_{2}]}[/tex]
and
[tex]W[y_{1}, y_{2}] = y_{1}'y_{2} - y_{1}y_{2}'[/tex]
 
Last edited:
sweep123 said:
ive just tried substituting the particular integral
y(x)= c1(x^2)sin(x)+c2(x^2)cos(x)+xc3sin(x)+xc4cos(x) into y"+y=xsinx. I end up with
2c1sin(x)+4xc1cos(x)+2c2cos(x)-4xc2sin(x)+2c3cos(x)-2c4sin(x)=xsin(x)

This doesn't look solvable. I've checked my differentiating a couple of times and it looks okay. Any suggestions where I may be going wrong?

It is solvable. How about c1=c4=0 and c2=-1/4 and c3=1/4? You just have to try harder.
 
oh yeah. i should have spent a bit more time on that. Thanks