Mathematical Tools for Physics

(coco) #1
11—Numerical Analysis 332

You can look up a fancier version of this called the Runge-Kutta-Fehlberg method. It’s one of the better techniques
around.


Higher Order Equations
How can you use either the Euler or the Runge-Kutta method to solve a second order differential equation?
Answer: Turn it into a pair of first order equations.


y′′=f(x,y,y′) −→ y′=v, and v′=f(x,y,v)

The Euler method, Eq. ( 30 ) becomes


y(x 0 +h) =y(x 0 ) +hv(x 0 ), and v(x 0 +h) =v(x 0 ) +hf

(


x 0 ,y(x 0 ),v(x 0 )

)


The construction for Runge-Kutta is essentially the same.


Adams Methods
The Runge-Kutta algorithm has the advantage that it is self-starting; it requires only the initial condition to go
on to the next step. It has the disadvantage that it is inefficient. In going from one step to the next, it ignores all
the information available from any previous steps. The opposite approach leads to the Adams methods, though
these are not as commonly used any more. I’m going to develop a little of the subject mostly to show that the
methods that I’ve used so far can lead to disaster if you’re not careful.
Shift the origin to be the point at which you want the new value ofy. Assume that you already knowyat
−h,− 2 h,...,−Nh. Because of the differential equationy′=f(x,y), you also knowy′at these points.
Assume


y(0) =

∑N


1

αky(−kh) +

∑N


1

βky′(−kh). (39)

With 2 N parameters, you can get this accurate to orderh^2 N−^1 ,

y(−kh) =

∑∞


0

(−kh)n

y(n)(0)
n!

.

Free download pdf