17.02.2014 Views

Mathematical Methods for Physicists: A concise introduction - Site Map

Mathematical Methods for Physicists: A concise introduction - Site Map

Mathematical Methods for Physicists: A concise introduction - Site Map

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NUMERICAL METHODS<br />

Runge±Kutta method is that we do not need to compute partial derivatives, but it<br />

becomes rather complicated if pursued <strong>for</strong> more than two or three steps.<br />

The accuracy of the Runge±Kutta method can be improved with the following<br />

<strong>for</strong>mula:<br />

y n‡1 ˆ y n ‡ h 6 …k 1 ‡ 2k 2 ‡ 2k 3 ‡ k 4 †;<br />

…13:25†<br />

where<br />

k 1 ˆ f …x n ; y n †;<br />

k 2 ˆ f …x n ‡ h=2; y n ‡ hk 1 =2†;<br />

k 3 ˆ f …x n ‡ h; y 0 ‡ hk 2 =2†;<br />

k 4 ˆ f …x n ‡ h; y n ‡ hk 3 †:<br />

…13:25a†<br />

…13:25b†<br />

…13:25c†<br />

…13:25d†<br />

With this <strong>for</strong>mula the error in y n‡1 is of order h 5 .<br />

You may wonder how these <strong>for</strong>mulas are established. To this end, let us go<br />

back to Eq. (13.22), the three-term Taylor series, and rewrite it in the <strong>for</strong>m<br />

where<br />

y 1 ˆ y 0 ‡ hf 0 ‡…1=2†h 2 …A 0 ‡ f 0 B 0 †‡…1=6†h 3 …C 0 ‡ 2f 0 D 0 ‡ f 2 0 E 0<br />

‡ A 0 B 0 ‡ f 0 B 2 0†‡O…h 4 †; …13:26†<br />

A ˆ @f<br />

@x ;<br />

B ˆ @f<br />

@y ;<br />

C ˆ @2 f<br />

@x 2 ;<br />

D ˆ @2 f<br />

@x@y ;<br />

E ˆ @2 f<br />

@y 2<br />

and the subscript 0 denotes the values of these quantities at …x 0 ; y 0 †.<br />

Now let us expand k 1 ; k 2 ,andk 3 in the Runge±Kutta <strong>for</strong>mula (13.24) in powers<br />

of h in a similar manner:<br />

Thus<br />

k 2 ˆ f …x 0 ‡ h=2; y 0 ‡ k 1 h=2†;<br />

k 1 ˆ hf …x 0 ; y 0 †;<br />

ˆ f 0 ‡ 1 2 h…A 0 ‡ f 0 B 0 †‡ 1 8 h2 …C 0 ‡ 2f 0 D 0 ‡ f 2 0 E 0 †‡O…h 3 †:<br />

2k 2 k 1 ˆ f 0 ‡ h…A 0 ‡ f 0 B 0 †‡<br />

and<br />

<br />

<br />

d<br />

dh …2k 2 k 1 † ˆ f 0 ;<br />

hˆ0<br />

!<br />

d 2<br />

dh 2 …2k 2 k 1 †<br />

hˆ0<br />

ˆ 2…A 0 ‡ f 0 B 0 †:<br />

474

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!