PHY 301: MATH AND NUM TECH Contents Chapter 10: Numerical Techniques I. Integration A.Intro B.Euler  Recall basic  Predictor-Corrector C. Runge-Kutta.

Slides:



Advertisements
Similar presentations
Formal Computational Skills
Advertisements

Ordinary Differential Equations
Chapter 6 Differential Equations
Section 7.2: Direction Fields and Euler’s Methods Practice HW from Stewart Textbook (not to hand in) p. 511 # 1-13, odd.
Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
CSE Differentiation Roger Crawfis. May 19, 2015OSU/CIS 5412 Numerical Differentiation The mathematical definition: Can also be thought of as the.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Lecture 3: Integration. Integration of discrete functions
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Initial-Value Problems
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
8-1 Chapter 8 Differential Equations An equation that defines a relationship between an unknown function and one or more of its derivatives is referred.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Differential Equations and Boundary Value Problems
A Numerical Technique for Building a Solution to a DE or system of DE’s.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Integrals 5.
Ch 8.3: The Runge-Kutta Method
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Math 3120 Differential Equations with Boundary Value Problems Chapter 2: First-Order Differential Equations Section 2-6: A Numerical Method.
Computational Biology, Part 17 Biochemical Kinetics III Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
First, a little review: Consider: then: or It doesn’t matter whether the constant was 3 or -5, since when we take the derivative the constant disappears.
Scientific Computing Multi-Step and Predictor-Corrector Methods.
12 INFINITE SEQUENCES AND SERIES. In general, it is difficult to find the exact sum of a series.  We were able to accomplish this for geometric series.
Numerical Analysis – Differential Equation
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
§3.6 Newton’s Method. The student will learn about
Copyright © Cengage Learning. All rights reserved.
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.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Ordinary Differential Equations
Chapter 6 Integration Section 4 The Definite Integral.
Taylor series are used to estimate the value of functions (at least theoretically - now days we can usually use the calculator or computer to calculate.
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.
Effective Hamiltonian Operations Condensing Physics to Conserve Over Time Joseph Knips.
Runge Kutta schemes Taylor series method Numeric solutions of ordinary differential equations.
Euler’s Method If we have a formula for the derivative of a function and we know the value of the function at one point, Euler’s method lets us build an.
Copyright © Cengage Learning. All rights reserved Applications of Taylor Polynomials.
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Part 7 - Chapter 25.
Ordinary Differential Equations
ECE 576 – Power System Dynamics and Stability
Class Notes 18: Numerical Methods (1/2)
Numerical Solutions of Ordinary Differential Equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Class Notes 19: Numerical Methods (2/2)
CSE Differentiation Roger Crawfis.
Ch 8.6: Systems of First Order Equations
Chapter 23.
Euler’s Method If we have a formula for the derivative of a function and we know the value of the function at one point, Euler’s method lets us build an.
Part 7 - Chapter 25.
Numerical Analysis Lecture 37.
Numerical Analysis Lecture 38.
MATH 175: NUMERICAL ANALYSIS II
Numerical Integration
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
Differential equations
MATH 1910 Chapter 3 Section 8 Newton’s Method.
Numerical Analysis Lecture 36.
Section 4 The Definite Integral
Presentation transcript:

PHY 301: MATH AND NUM TECH Contents Chapter 10: Numerical Techniques I. Integration A.Intro B.Euler  Recall basic  Predictor-Corrector C. Runge-Kutta 2

PHY 301: MATH AND NUM TECH I. Numerical integration I. NUMERICAL INTEGRATION: A. Intro

PHY 301: MATH AND NUM TECH I. Numerical integration I. NUMERICAL INTEGRATION: B. Euler Methods B2. Predictor-Corrector Euler Method It is a refinement on the above. The problem with the above is that the value of the slope of the tangent to the graph at t n, is not a good estimate of the tangent in the interval t n, t n+1. Given that x n is accurate, x n+1 would be just as good if we could know the tangent of the cord from x n to x n+1 (see picture below). Although we can’t because we don’t know x n+1 (since it is obviously what we are trying to estimate) we can come up with an approximation for the value of that slope: Discretize it: The error made at each step is of order h 2. Calling x n the approximate value of x aftern iterations of the formula above we get: We start from our standard 1 st order diff eq: B1. Basic Euler Method

PHY 301: MATH AND NUM TECH I. Numerical integration I. NUMERICAL INTEGRATION: B. Euler Methods: B2. Predictor- Corrector (cont’d)

PHY 301: MATH AND NUM TECH I. Numerical integration I. NUMERICAL INTEGRATION: C. Runge-Kutta Methods Runge Kutta Methods. Derivation of RK2 Since we can formally integrate to: or Since we assume that we got to step n with, our problem is to figure out the integral of the function of f(x,t). The idea of RK of order L is to cut up the interval [t n,t n+1 ] in L pieces and do a Taylor series expansion of f(x,t) around the boundaries of the L pieces. f(x,t) is then approximated in terms of a weighted average of these expansions. Let see in details how it works for RK2. Thus for RK2 we cut the step interval [t n,t n+1 ] in 2 and then approximate [t n,t n+1 ] by a Taylor series expansion around the middle of that interval at t n+1/2 =t n +h/2 where h= t n+1 -t n is the step size for the integration. Thus we get: Now we insert the above into our formal integration formula:

PHY 301: MATH AND NUM TECH I. Numerical integration Computing the second term, remembering that: and that: Which is a little messy of a calculation but ends up being zero from the fact that we integrate a function which is odd with respect to its midpoint. Since that second term thus integrates to zero we are left with: The only problem is that we don’t know and thus use yet again a Taylor series expansion, but this time around t n to figure it out at t n+1/2 = t n +h/2: Which is accurate to order h 2 included! So by just doubling the number of steps to compute x n+1/2 and x n+1 versus only xn we have squared the accuracy of our computation from h to h 2 : This is why RK is so powerful. And what allowed us the result, is the expansion around the midpoint point that gave us a vanishing h 2 term. RK4 involves 2 more lines of code at t n +h/4 and t n +3h/4 but is accurate to h 4 which is why RK4 is used so often for numerical integration. Now notice that using this in the boxed result, gives us again accuracy to order h 2 included for the second term because f is multiplied by h in that result. So our final result is: