Solving second order unhomogonous equations

  • Thread starter Thread starter sweep123
  • Start date Start date
  • Tags Tags
    Second order
Click For Summary
SUMMARY

The discussion focuses on solving the second-order unhomogeneous differential equation y'' + y = x sin(x) with initial conditions y(0) = 0 and y'(0) = 1. Participants suggest various methods for finding the particular integral, including using trial functions of the form y = c1*x^2*sin(x) + c2*x^2*cos(x) + c3*x*sin(x) + c4*x*cos(x) and the variation of parameters method. A key insight is that the particular solution can also be expressed as y = x(A0 + A1*x)e^(ix), where A0 and A1 are coefficients derived from matching terms with the right-hand side of the equation. The discussion concludes that persistence in trying different coefficients leads to a solvable form of the equation.

PREREQUISITES
  • Understanding of second-order differential equations
  • Familiarity with particular integrals and trial functions
  • Knowledge of the variation of parameters method
  • Basic complex number manipulation in the context of differential equations
NEXT STEPS
  • Study the method of undetermined coefficients for finding particular solutions
  • Learn about the variation of parameters method in detail
  • Explore complex solutions to differential equations, particularly using e^(ix)
  • Practice solving second-order differential equations with varying right-hand sides
USEFUL FOR

Students and educators in mathematics, particularly those focusing on differential equations, as well as engineers and physicists applying these concepts in practical scenarios.

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
You need a bigger family of trial functions. Try c1*x^2*sin(x)+c2*x^2*cos(x)+c3*x*sin(x)+c4*x*cos(x).
 
instead of looking at that equation you could try to look at an equivalent equation
L[y] = y'' + y = xe^{ix}, where i = \sqrt{-1}. then since i is a particular root of the characteristic equation, y has a solution of the form
y = x^{2}A_{0}e^{ix} from there it is easily shown that the complex part of the solution of y 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
L[y] = y'' + y = xe^{ix}, where i = \sqrt{-1}. then since i is a particular root of the characteristic equation, y has a solution of the form
y = x^{2}A_{0}e^{ix} from there it is easily shown that the complex part of the solution of y 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:
y = x(A_{0} + A_{1}x)e^{xi} you have to derive the coefficients by evaluating L[y] and matching up the coefficients A_{0}, A_{1} with the right hand side of the equation ( xe^{ix} ) 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 y_{1}, y_{2} then using those you can find a solution to the differentiall equation of the form,

\phi(x) = y_{1}u_{1} + y_{2}u_{2}
where
u'_{1} = \frac{-sin(x)y_{2}}{W[y_{1}, y_{2}]}
u'_{2} = \frac{sin(x)y_{1}}{W[y_{1}, y_{2}]}
and
W[y_{1}, y_{2}] = y_{1}'y_{2} - y_{1}y_{2}'
 
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.
 
  • #10
oh yeah. i should have spent a bit more time on that. Thanks
 

Similar threads

Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
2K
Replies
4
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
5
Views
2K
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K