Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Numerical Solution to 2nd Order Eqn?

  1. Apr 8, 2008 #1
    Is there a numerical method for finding solutions to 2nd order non-homogeneous differential equations? Thanks.
  2. jcsd
  3. Apr 8, 2008 #2

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
  4. Apr 9, 2008 #3
    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?
  5. Apr 9, 2008 #4


    User Avatar
    Science Advisor

    ?? 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.
  6. Apr 9, 2008 #5
    So, iffin I is understannin correkly, first find
    U'= f(x,Y,U)
    numerically, then from Y'= U find Y?
  7. Apr 9, 2008 #6


    User Avatar
    Science Advisor

    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.
  8. Apr 10, 2008 #7
    Ah, I think I get it. Probably not. Thank you HallsofIvy
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook