Ch 8.3: The Runge-Kutta Method

Slides:



Advertisements
Similar presentations
Example Project and Numerical Integration Computational Neuroscience 03 Lecture 11.
Advertisements

Ch 2.7: Numerical Approximations: Euler’s Method
Section 7.2: Direction Fields and Euler’s Methods Practice HW from Stewart Textbook (not to hand in) p. 511 # 1-13, odd.
Boyce/DiPrima 9th ed, Ch 2.7: Numerical Approximations: Euler’s Method Elementary Differential Equations and Boundary Value Problems, 9th edition, by.
Computational Methods in Physics PHYS 3437
Section 5.7 Numerical Integration. Approximations for integrals: Riemann Sums, Trapezoidal Rule, Simpson's Rule Riemann Sum: Trapezoidal Rule: Simpson’s.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Chapter 7 Numerical Differentiation and Integration
1cs542g-term Notes  Notes for last part of Oct 11 and all of Oct 12 lecture online now  Another extra class this Friday 1-2pm.
1cs542g-term Notes  Even if you’re not registered (not handing in assignment 1) send me an to be added to a class list.
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Initial-Value Problems
Numerical Integration
8 TECHNIQUES OF INTEGRATION. There are two situations in which it is impossible to find the exact value of a definite integral. TECHNIQUES OF INTEGRATION.
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations.
Numerical Solution of Ordinary Differential Equation
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
In the previous two sections, we focused on finding solutions to differential equations. However, most differential equations cannot be solved explicitly.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
19.5 Numeric Integration and Differentiation
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Numerical Integration In general, a numerical integration is the approximation of a definite integration by a “weighted” sum of function values at discretized.
Numerical Integration Methods
Integrals 5.
MAT 1235 Calculus II Section 7.7 Approximate (Numerical) Integration
4.6 Numerical Integration -Trapezoidal Rule -Simpson’s Rule
1 Numerical Integration Section Why Numerical Integration? Let’s say we want to evaluate the following definite integral:
Copyright © Cengage Learning. All rights reserved. 10 Parametric Equations and Polar Coordinates.
Chapter 5 Integral. Estimating with Finite Sums Approach.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Computational Biology, Part 17 Biochemical Kinetics III Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Boyce/DiPrima 9 th ed, Ch 8.5: More on Errors; Stability Elementary Differential Equations and Boundary Value Problems, 9 th edition, by William E. Boyce.
Remainder Estimation Theorem
Boyce/DiPrima 9 th ed, Ch 2.7: Numerical Approximations: Euler’s Method Elementary Differential Equations and Boundary Value Problems, 9 th edition, by.
5.1.  When we use the midpoint rule or trapezoid rule we can actually calculate the maximum error in the calculation to get an idea how much we are off.
Techniques of Integration Substitution Rule Integration by Parts Trigonometric Integrals Trigonometric Substitution Integration of Rational Functions by.
Section 5.9 Approximate Integration Practice HW from Stewart Textbook (not to hand in) p. 421 # 3 – 15 odd.
Section 5.1/5.2: Areas and Distances – the Definite Integral Practice HW from Stewart Textbook (not to hand in) p. 352 # 3, 5, 9 p. 364 # 1, 3, 9-15 odd,
Komputasi Numerik: Integrasi dan Differensiasi Numerik Agus Naba Physics Dept., FMIPA-UB.
Please remember: When you me, do it to Please type “numerical-15” at the beginning of the subject line Do not reply to my gmail,
Introduction to Integration Methods. Types of Methods causal method employs values at prior computation instants. non-causal method if in addition to.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall 5.5 Trapezoidal Rule.
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
PHY 301: MATH AND NUM TECH Contents Chapter 10: Numerical Techniques I. Integration A.Intro B.Euler  Recall basic  Predictor-Corrector C. Runge-Kutta.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
This chapter is concerned with the problem in the form Chapter 6 focuses on how to find the numerical solutions of the given initial-value problems. Main.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Clicker Question 1 What is ? (Hint: u-sub) – A. ln(x – 2) + C – B. x – x 2 + C – C. x + ln(x – 2) + C – D. x + 2 ln(x – 2) + C – E. 1 / (x – 2) 2 + C.
Copyright © Cengage Learning. All rights reserved. 7 Techniques of Integration.
TESTS FOR CONVERGENCE AND DIVERGENCE Section 8.3b.
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Approximate Integration
Clicker Question 1 What is ? A. x tan(x2) + C
Boyce/DiPrima 9th ed, Ch 2.7: Numerical Approximations: Euler’s Method Elementary Differential Equations and Boundary Value Problems, 9th edition, by.
Copyright © Cengage Learning. All rights reserved.
Class Notes 18: Numerical Methods (1/2)
Class Notes 19: Numerical Methods (2/2)
TECHNIQUES OF INTEGRATION
Ch 8.6: Systems of First Order Equations
Sec 21: Analysis of the Euler Method
Elements of Numerical Integration
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

Ch 8.3: The Runge-Kutta Method Consider the initial value problem y' = f (t, y), y(t0) = y0, with solution (t). We have seen that the local truncation errors for the Euler, backward Euler, and improved Euler methods are proportional to h2, h2, and h3, respectively. In this section, we examine the Runge-Kutta method, whose local truncation error is proportional to h5. As with the improved Euler approach, this method better approximates the integral introduced in Ch 8.1, where we had

Runge-Kutta Method The Runge-Kutta formula approximates the integrand f (tn, (tn)) with a weighted average of its values at the two endpoints and at the midpoint. It is given by where Global truncation error is bounded by a constant times h4 for a finite interval, with local truncation error proportional to h5.

Simpson’s Rule The Runge-Kutta formula is where If f (t, y) depends only on t and not on y, then we have which is Simpson’s rule for numerical integration.

Programming Outline: Runge-Kutta Method Step 1. Define f (t,y) Step 2. Input initial values t0 and y0 Step 3. Input step size h and number of steps n Step 4. Output t0 and y0 Step 5. For j from 1 to n do Step 6. k1 = f (t, y) k2 = f (t + 0.5*h, y + 0.5*h*k1) k3 = f (t + 0.5*h, y + 0.5*h*k2) k4 = f (t + h, y + h*k3) y = y + (h/6)*(k1 + 2*k2 + 2*k3 + k4) t = t + h Step 7. Output t and y Step 8. End

Example 1: Runge-Kutta Method (1 of 2) Recall our initial value problem To calculate y1 in the first step of the Runge-Kutta method for h = 0.2, we start with Thus

Example 1: Numerical Results (2 of 2) The Runge-Kutta method (h = .05) and the improved Euler method (h = .025) both require a total of 160 evaluations of f. However, we see that the Runge-Kutta is far more accurate. The Runge-Kutta method (h = .2) requires 40 evaluations of f and the improved Euler method requires 160 evaluations of f, and yet the accuracy at t = 2 is similar.

Adaptive Runge-Kutta Methods The Runge-Kutta method with a fixed step size can suffer from widely varying local truncation errors. That is, a step size small enough to achieve satisfactory accuracy in some parts of the interval of interest may be smaller than necessary in other parts of the interval. Adaptive Runge-Kutta methods have been developed, resulting in a substantial gain in efficiency. Adaptive Runge-Kutta methods are a very powerful and efficient means of approximating numerically the solutions of a large class of initial value problems, and are widely available in commercial software packages.