L14 - Fall 2003 Math 308/501502 Numerical Methods 1.4...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2003 Math 308/501–502 Numerical Methods 1.4 Euler’s Method Fri, 24/Oct c ± 2003, Art Belmonte Summary Geometrical idea Euler’s method numerically approximates the solution of y 0 = f ( t , y ), y ( a ) = y 0 by following tangent lines at discrete points. Think of tangent line segments that form the background of a dfield7 plot. Figures in Section 1.4 are illustrative in this regard. The numerical algorithm Let [ a , b ] be the interval over which an approximation to the solution is desired. (Thus t = a and t = b are the initial and final values of the independent variable, respectively.) Partition this interval into N subintervals each of length h = ( b - a )/ N , called the step size .Le t t 0 = a and define t k + 1 = t k + h , for k = 0 , 1 ,..., N - 1 . Notice that t N = b and the other t k so-defined are the interior endpoints of the subintervals. These collectively are the discrete values of the independent variable. The initial value of the dependent variable is given by the initial condition, y ( a ) = y ( t 0 ) = y 0 . The other discrete dependent variable values are computed iteratively as follows. for k = 0to N - 1 t k + 1 = t k + h y k + 1 = y k + hf ( t k , y k ) Euler’s method is a single-step numerical solver since it depends only on data obtained from the preceding step. It is a fixed-step solver since the lengths of the subintervals of [ a , b ] are all equal. The error in the approximation In general, as the step size decreases, so does the error in the approximation. This error consists of two parts, round-off error and truncation error . MATLAB does floating point computations in double precision, so round-off error is usually not an issue. The truncation error results from the fact that we are following the tangent line at a given point in the plane rather than a solution curve itself. Moreover, there is a truncation error at each step of the iteration as well as a propagated truncation error due to errors from previous steps. The truncation error at each step is proportional to h 2 .However , due to propagated truncation error (which can grow exponentially over time), the maximum total error of the approximation at t = b satisfies the following error bound. maximum error M L ± e L ( b - a ) - 1 ² h Here L = max ( t , y ) R ³ ³ ³ ³ f y ³ ³ ³ ³ and M = 1 2 max ( t , y ) R ³ ³ ³ ³ f t + f f y ³ ³ ³ ³ where R is a rectangle containing the solution curve. The fact that h occurs to the first power in the error bound is the reason that we say that Euler’s method is a first-order method. Systems Euler’s method carries over directly to systems of first-order equations. We simply write the algorithm in terms of vectors. Let u 0 = f ( t , u ), u ( t 0 ) = u 0 where u = [ u 1 , u 2 u n ] T is an n -dimensional column vector. With the t k defined as above, we have for k = N - 1 t k + 1 = t k + h u k + 1 = u k + h f ( t k , u k ) Hand Examples We’ll do one problem by hand. Numerical methods are best done with a computer, so make sure you study the MATLAB examples below carefully!
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/29/2008 for the course MATH 308 taught by Professor Comech during the Spring '08 term at Texas A&M.

Page1 / 6

L14 - Fall 2003 Math 308/501502 Numerical Methods 1.4...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online