Biochemical Kinetics III: Numerical Methods for ODE Integration, Slides of Computational Biology

The general form of ordinary differential equations and introduces euler's method and the midpoint method as numerical integration techniques. Euler's method is the simplest method that converts differential equations into differences and calculates the value of δy by multiplying the right-hand side of each differential equation by the step size δx. The midpoint method, on the other hand, evaluates the derivatives at the midpoint of the δx interval and uses euler's method to estimate δy. The document also compares the results of these methods with the analytical solutions for specific examples.

Typology: Slides

2010/2011

Uploaded on 11/02/2011

blueeyes_11
blueeyes_11 🇺🇸

4.7

(18)

261 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computational Biology, Part 17
Biochemical Kinetics III
Robert F. Murphy
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Biochemical Kinetics III: Numerical Methods for ODE Integration and more Slides Computational Biology in PDF only on Docsity!

Computational Biology, Part 17

Biochemical Kinetics III

Robert F. Murphy

General form of ordinary

differential equations

 For a set of n unknown functions yi (for i = to n ) we are given a set of n functions fi  that specify the derivatives of each yi with respect to some independent variable x

dyi ( x )

dx

 f i ( x , y 1 , ..., yn ) for i  1, ..., n

Euler’s method

 We can rewrite this as a recursion formula that allows us to calculate values of the functions yi at a series of x values. We introduce a second subscript j to indicate which x value we refer to (note that yi,j now refers to a value not a function). yi , j  1  yi , j   xf (^) i ( x (^) j , y 1, j , ..., yn , j ) x (^) j  1  x (^) j   x

Euler’s method

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

Midpoint method

 A better estimate would come from evaluating the fi  at the midpoint of the  x interval. The problem: we know x at the midpoint but we don’t know the yi 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.

y (^) j   xf (^) ( x (^) j , y (^) j )

y (^) j  0.5   xf ( x (^) j

x 2

, y (^) j

y (^) j 2

y (^) j  1  y (^) j   y (^) j  0.

Midpoint method (2nd order

Runge-Kutte)

 Now consider dy/dx =3 y. The analytical solution is y =e^3 x.  The graph shows the Euler, Midpoint and analytical solutions (along with derivatives). Three methods for dy/dx =3 y

(^100) 2030

4050

6070

8090

100

0 0.5 (^) x 1 1.

y

0

50

100

150

200

250 y (2°RK)^300 y (Analy t)y (Euler) dy /dx(x)dy /dx(x+Dx/2)

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.