03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

140 CHAPTER 10. ORDINARY DIFFERENTIAL EQUATIONS<br />

for any r ≥ 0, and t 0 ∈ (0, 2π] . Given an initial value, the parameters r and t 0 are uniquely<br />

determined. Thus the trajectory of X over time is that of an ellipse in the plane. 2 Thus the<br />

family of such ellipses, taking all r ≥ 0, form the phase curves of this ODE. We would expect the<br />

approximation of an ODE to never cross a phase curve. This is because the phase curve represents<br />

the<br />

Euler’s Method and the second order Runge-Kutta Method were used to approximate the ODE<br />

with initial value<br />

[ ] 1.5<br />

X (0) = .<br />

1.5<br />

Euler’s Method was used for step size h = 0.005 for 3000 steps. The Runge-Kutta Method was<br />

employed with step size h = 0.015 for 3000 steps. The approximations are shown in Figure 10.7.<br />

Given that the actual solution of this initial value problem is an ellipse, we see that Euler’s<br />

Method performed rather poorly, spiralling out from the ellipse. This must be the case for any step<br />

size, since Euler’s Method steps in the direction tangent to the actual solution; thus every step of<br />

Euler’s Method puts the approximation on an ellipse of larger radius. Smaller stepsize minimizes<br />

this effect, but at greater computational cost.<br />

The Runge-Kutta Method performs much better, and for larger step size. At the given resolution,<br />

no spiralling is observable. Thus the Runge-Kutta Method outperforms Euler’s Method, and<br />

at lesser computational cost. 3<br />

2 In the case r = 0, the ellipse is the “trivial” ellipse which consists of a point.<br />

3 Because the Runge-Kutta Method of order two requires two evaluations of F , whereas Euler’s Method requires<br />

only one, per step, it is expected that they would be ‘evenly matched’ when Runge-Kutta Method uses a step size<br />

twice that of Euler’s Method.

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

Saved successfully!

Ooh no, something went wrong!