Numerical Solution to 2nd Order Eqn?

  • Thread starter qspeechc
  • Start date
827
13

Main Question or Discussion Point

Is there a numerical method for finding solutions to 2nd order non-homogeneous differential equations? Thanks.
 

Answers and Replies

D H
Staff Emeritus
Science Advisor
Insights Author
15,329
681
There are a plethora of numerical methods for finding solutions to a first order differential equation. Any second order differential equation (homogenous or not) can be expressed as a first order DE by making the first derivatives a state variable.

To solve a DE numerically you need not only the differential equations themselves but also information about the state. Initial value techniques are used in the case that the full state is known at some point in the domain. Boundary value techniques (much harder) are used in the case where only parts of the state are known, but at multiple points in the domain.
 
827
13
So, say I had a 2nd order DE, I re-write it as a DE interms of the first derivative, so it becomes first order. Then how do I extract the variable numerically, because we just found its derivative numerically, so actually, we have a set of data points for the derivative?
 
HallsofIvy
Science Advisor
Homework Helper
41,738
898
?? What do you mean by "re-write it as a DE in terms of the first derivative"? You should wind up with TWO first order differential equations.

If, for example, you have the second order equation, Y"(x)= f(x, Y, Y'), you could let U(x)= Y' so that your equation becomes U'= f(x, Y, U). Because that equation still involves Y, you need two equations: U'= f(x,Y,U) and Y'= U. Now run two simultaneous first order de solvers.

For example, if you are given Y"= f(x,Y,Y') with initial conditions Y(x0)= Y0, Y'(x0)= Y1, that is equivalent to the system of equations U'= f(x,Y,U) , Y'= U with conditions Y(x0)= Y0, U(x0)= Y1. Run, say, Runge-Kutta fourth order for both Y and U using the values calcuated for both Y and U at each step.
 
827
13
So, iffin I is understannin correkly, first find
U'= f(x,Y,U)
numerically, then from Y'= U find Y?
 
HallsofIvy
Science Advisor
Homework Helper
41,738
898
Find the next value of U then use that to find the next value of Y. In otherwords, calculate both U and Y at each step of your iteration.
 
827
13
Ah, I think I get it. Probably not. Thank you HallsofIvy
 

Related Threads for: Numerical Solution to 2nd Order Eqn?

  • Last Post
Replies
9
Views
913
  • Last Post
Replies
11
Views
4K
Replies
7
Views
2K
Replies
5
Views
2K
  • Last Post
Replies
2
Views
4K
Replies
1
Views
3K
Replies
4
Views
5K
Top