Computational Biology, Part 17 Biochemical Kinetics III Robert F. Murphy Copyright  1996, 1999, 2000, 2001. All rights reserved.

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

Section 7.2: Direction Fields and Euler’s Methods Practice HW from Stewart Textbook (not to hand in) p. 511 # 1-13, odd.
COMPUTER MODELS IN BIOLOGY Bernie Roitberg and Greg Baker.
PART 7 Ordinary Differential Equations ODEs
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
First-Order Differential Equations
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Computational Biology, Part 17 Biochemical Kinetics I Robert F. Murphy Copyright  1996, All rights reserved.
Initial-Value Problems
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.
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
The Midpoint Formula. The purpose of the midpoint formula The midpoint formula is used to find the midpoint or the halfway point of a line segment or.
Numerical Solutions of Differential Equations Taylor Methods.
Differential Equations and Boundary Value Problems
CISE301_Topic8L1KFUPM1 CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1.
Numerical Solution of Ordinary Differential Equation
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
PART 7 Ordinary Differential Equations ODEs
Copyright © Cengage Learning. All rights reserved.
A Numerical Technique for Building a Solution to a DE or system of DE’s.
Slope Fields and Euler’s Method. When taking an antiderivative that is not dealing with a definite integral, be sure to add the constant at the end. Given:find.
Ch 8.3: The Runge-Kutta Method
Wicomico High School Mrs. J. A. Austin AP Calculus 1 AB Third Marking Term.
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Aim: What Is Implicit Differentiation and How Does It Work?
Computational Biology, Part 15 Biochemical Kinetics I Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
1 §3.1 Implicit Differentiation The student will learn about implicit differentiation.
Chapter 8 Integration Techniques. 8.1 Integration by Parts.
Numerical Solutions of ODE
Copyright © Cengage Learning. All rights reserved. 14 Partial Derivatives.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Copyright © Cengage Learning. All rights reserved The Chain Rule.
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
Second-Order Differential
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
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.
Dr. Mujahed AlDhaifallah ( Term 342)
SECTION 4-2-B More area approximations. Approximating Area using the midpoints of rectangles.
Warm Up. Solving Differential Equations General and Particular solutions.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
9.1 Solving Differential Equations Mon Jan 04 Do Now Find the original function if F’(x) = 3x + 1 and f(0) = 2.
Ordinary Differential Equations
1 Differential Equations 6 Copyright © Cengage Learning. All rights reserved. 6.1 DE & Slope Fields BC Day 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Copyright © Cengage Learning. All rights reserved. 15 Multiple Integrals.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
1.1 Basic Concepts. Modeling
27. Sections 5.1/7.1 Approximating and Computing Area
SLOPE FIELDS & EULER’S METHOD
SLOPE FIELDS & EULER’S METHOD
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
2.5 Implicit Differentiation
Copyright © Cengage Learning. All rights reserved.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Part (a) Keep in mind that dy/dx is the SLOPE! We simply need to substitute x and y into the differential equation and represent each answer as a slope.
Section Euler’s Method
Chapter 27.
Copyright © Cengage Learning. All rights reserved.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Numerical solution of first-order ordinary differential equations
Copyright © Cengage Learning. All rights reserved.
Differential Equations
Choose the differential equation corresponding to this direction field
Differential Equations
Numerical solution of first-order ordinary differential equations 1. First order Runge-Kutta method (Euler’s method) Let’s start with the Taylor series.
Presentation transcript:

Computational Biology, Part 17 Biochemical Kinetics III Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.

General form of ordinary differential equations For a set of n unknown functions y i (for i=1 to n) we are given a set of n functions f i that specify the derivatives of each y i with respect to some independent variable x For a set of n unknown functions y i (for i=1 to n) we are given a set of n functions f i that specify the derivatives of each y i with respect to some independent variable x

Euler’s method The simplest numerical integration method is Euler’s method. It simply converts each differential to a difference The simplest numerical integration method is Euler’s method. It simply converts each differential to a difference and then calculates the value of  y i by multiplying the right hand side of each differential equation by the step size  x and then calculates the value of  y i by multiplying the right hand side of each differential equation by the step size  x

Euler’s method We can rewrite this as a recursion formula that allows us to calculate values of the functions y i at a series of x values. We introduce a second subscript j to indicate which x value we refer to (note that y i,j now refers to a value not a function). We can rewrite this as a recursion formula that allows us to calculate values of the functions y i at a series of x values. We introduce a second subscript j to indicate which x value we refer to (note that y i,j now refers to a value not a function).

Euler’s method Note the asymmetry of this method: the derivative (f i ) that is used to span the  x is calculated only for the x value at the beginning of the interval. In regions where f i is increasing with x, this leads to underestimation of  y, and, in regions where f i is decreasing with x, to overestimation of  y. Note the asymmetry of this method: the derivative (f i ) that is used to span the  x is calculated only for the x value at the beginning of the interval. In regions where f i is increasing with x, this leads to underestimation of  y, and, in regions where f i is decreasing with x, to overestimation of  y.

Euler’s method Consider dy/dx=6x+2. The analytical solution is y=3x 2 +2x. Consider dy/dx=6x+2. The analytical solution is y=3x 2 +2x. The graph shows the Euler’s method approximation for y and the analytical solution for y (along with dy/dx). The graph shows the Euler’s method approximation for y and the analytical solution for y (along with dy/dx). Note how the approximation always underestimates y since dy/dx is increasing

Midpoint method A better estimate would come from evaluating the f i at the midpoint of the  x interval. The problem: we know x at the midpoint but we don’t know the y i at the midpoint (yet). The solution is to use Euler’s method to estimate  y and then re- estimate  y using the derivatives evaluated halfway along the line segment encompassing the original  y. A better estimate would come from evaluating the f i at the midpoint of the  x interval. The problem: we know x at the midpoint but we don’t know the y i at the midpoint (yet). The solution is to use Euler’s method to estimate  y and then re- estimate  y using the derivatives evaluated halfway along the line segment encompassing the original  y.

Midpoint method (2nd order Runge-Kutte) This is called the midpoint method or the second-order Runge-Kutte method. This is called the midpoint method or the second-order Runge-Kutte method.

Midpoint method (2nd order Runge-Kutte) Again consider dy/dx=6x+2. Again consider dy/dx=6x+2. The graph shows the midpoint approximation for y and the analytical solution for y ( along with dy/dx at x and x+0.5 ). The graph shows the midpoint approximation for y and the analytical solution for y ( along with dy/dx at x and x+0.5 ). Note that the approximation and the analytical solution are identical in this case.

Midpoint method (2nd order Runge-Kutte) Now consider dy/dx=3y. The analytical solution is y=e 3x. Now consider dy/dx=3y. The analytical solution is y=e 3x. The graph shows the Euler, Midpoint and analytical solutions (along with derivatives). The graph shows the Euler, Midpoint and analytical solutions (along with derivatives). Note that the midpoint method is better than Euler’s method but it does not give results identical to the analytical solution since dy/dx now depends on y.

Fourth-order Runge-Kutta The midpoint method can be extended by considering other intermediate estimates. The most frequently used variation is the fourth-order Runge-Kutta method which considers one estimate at the initial point, two estimates at the midpoint, and one estimate at a trial endpoint. The midpoint method can be extended by considering other intermediate estimates. The most frequently used variation is the fourth-order Runge-Kutta method which considers one estimate at the initial point, two estimates at the midpoint, and one estimate at a trial endpoint.

Fourth-order Runge-Kutta Here are the formulas. Here are the formulas.