# Numerical Solution to 2nd Order Eqn?

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

D H
Staff Emeritus
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.

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
Homework Helper
?? 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.

So, iffin I is understannin correkly, first find
U'= f(x,Y,U)
numerically, then from Y'= U find Y?

HallsofIvy