1 / 5

Introduction to the Runge-Kutta algorithm for approximating derivatives

Introduction to the Runge-Kutta algorithm for approximating derivatives. PHYS 361 Spring, 2011. review: Euler method. General form of first-oder Diff Eq:. Example: decay equation. To implement a numerical solution, we must approximate the derivative.

carrington
Download Presentation

Introduction to the Runge-Kutta algorithm for approximating derivatives

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011

  2. review: Euler method General form of first-oder Diff Eq: Example: decay equation To implement a numerical solution, we must approximate the derivative. The Euler method is the simplest approach: (forward difference) Substituting this into our decay equation, we can solve for xi+1 This is equivalent to linearly extrapolating x(t) from xi to xi+1 or... using the Taylor series expansion for x(t) and cutting out all terms involving Dt2 or higher. This makes the Euler method “first order accurate”

  3. Taylor series Substitute f(x) for dx/dt (from our equation), keep up to 2nd order in dt This approach is fine if we know df/dx and df/dt

  4. Runge-Kutta make use of Mean value theorem Same idea as Euler method, but aim for “exact” solution by using the “mean value” slope, instead of the slope at ti. x xm Approximate the mean value slope by evaluating f(x,t) at xm and tm ti tm ti+1 Use Euler method to approximate xm: Decay example: 2nd order R-K has two steps 4th order R-K has four steps

  5. Runge-Kutta... another approach Approximate mean slope by averaging slopes at ti, ti+1, and ti+1/2 Decay example: x xi xm xi+1 ti tm ti+1 Use weighted average of slopes:

More Related