DOC PREVIEW
MIT 18 034 - Higher Order Taylor Methods

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

MIT OpenCourseWarehttp://ocw.mit.edu 18.034 Honors Differential Equations Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.1 Higher Order Taylor Methods Marcelo Julio Alvisio & Lisa Marie Danz May 16, 2007 Introduction Differential equations are one of the building blo cks in science or engineering. Scientists aim to obtain numerical solutions to differential equations whenever explicit solutions do not exist or when they are too hard to find. These numerical solutions are approximated though a variety of methods, some of which we set out to explore in this project. We require two conditions when computing differential equations numerically. First, we require that the solution is continuous with initial value. Otherwise, numerical error introduced in the representation of the number in computer systems would produce results very far from the actual solution. Second, we require that the solution changes continuously with respect to the differential equation itself. Otherwise, we cannot expect the method that approximates the differential equation to give accurate results. The most common methods for computing differential equations numerically include Euler’s method, Higher Order Taylor method and Runge-Kutta meth-ods. In this project, we concentrate on the “Higher Order Taylor Method.” This method employs the Taylor polynomial of the solution to the equation. It approximates the zeroth order term by using the previous step’s value (which is the initial condition for the first step), and the subsequent terms of the Taylor expansion by using the differential equation. We call it Higher Order Taylor Method, the “lower” order method being Euler’s Method. Under certain conditions, the Higher Order Taylor Method limits the error to O(hn), where n is the order used. We will present s everal examples to test this idea. We will look into two main parameters as a measure of the effectiveness of the method, namely accuracy and efficiency. 12 Theory of the Higher Order Taylor Method Definition 2.1 Consider the differential equation given by y�(t) = f(t, y), y(a) = c. Then for b > a, the nth order Taylor approximation to y(b) with K steps is given by yK , where {yi} is defined recursively as: t0 = a y0 = y(a) = c ti+1 = ti + h h2 ∂f hn ∂n−1f yi+1 = yi + hf(ti, yi) + (ti, yi) + ... + (ti, yi)2 ∂t n! ∂tn−1 with h = (b − a)/K. It makes sense to formulate such a definition in view of the Taylor series expan-sion that is used when y(t) is known explicitly. All we have done is use f(t, y) for y�(t), ft(t, y) for y��(t), and so forth. The next task is to estimate the error that this approximation introduces. We know by Taylor’s Theorem that, for any solution that admits a Taylor expansion at the point ti, we have h2 hn h(n+1) y(ti+1) = y(ti) + hy�(ti) + y��(ti) + ... + y(n)(ti) + y(n+1)(σ)2 n! (n + 1)! where σ is between ti and ti+1 Using y� = f(t, y), this translates to h2 ∂f hn ∂(n−1)f h(n+1) ∂(n)f y(ti+1) = y(ti)+hf(ti, yi)+ (ti, yi)+...+ (ti, yi)+ (σ, y(σ))2 ∂t n! ∂t(n−1) (n + 1)! ∂t(n) Therefore, the local error, that is to say, the error introduced at each step if the values calculated previously were exact, is given by: 1 ∂(n)f Ei = (hn+1) (σ, y(σ))(n + 1)! ∂tn which means that 1 ∂(n)f max (hn+1) (σ, y(σ))Ei ≤ σ ∈[a,b] (n + 1)! ∂tn 23 We can say Ei = O(hn+1). Now, since the number of steps from a to b is proportional to 1/h, we multiply the error per step by the number of steps to find a total error E = O(hn). In Practice: Examples We will consider differential equations that we can solve explicitly to obtain an equation for y(t) such that y�(t) = f(t, y). This way, we can calculate the actual error by subtracting the exact value for y(b) from the value that the Higher Order Taylor method predicts for it. To approximate values in the following examples, the derivatives of f(t, y) were computed by hand. MATLAB then performed the iteration and arrived at the approximation. Notice that the definitions given in the previous section could also have been adapted for varying step size h. However, for ease of computation we have kept the step size constant. In our computations, we have chosen step size of (b − a)/2k, which resulted in K = 2k evenly spaced points in the interval. Example 3.1 We consider the differential equation 1 + t y�(t) = f(t, y) = 1 + y with initial condition y(1) = 2. It is clear that y(t) = √t2 + 2t + 6 − 1 solves this equation. Thus we calculate the error for y(2) by subtracting the approximation of y(2) from y(2), which is the exact value. Recall that we are using h = 2−k because (b − a) = 1. The following table displays the errors calculated. k = 1 k = 2 k = 3 k = 4 order = 1 .0333 .0158 .0077 .0038 order = 2 −.0038 −.0009 −.0002 −.0001 order = 3 .0003269 .0000383 .0000046 .0000006 For the first order case (also known as Euler’s method ), we expect the error to be proportional to h, where h is the length of the intervals tested. This means that, when k increases by 1, we expect the error to be h alved (approximately). Observing the values in the table confirms this expectation. For the second order case, we expect the error to be proportional to h2, so we expect the error to be divided by 4 as we move to the right on the table. For third order, we expect the error to be proportional to h3, so we expect the error to be divided by 8 as we move to the right. Again, this seems to be the case. 3In figure 1, the graph on the left show the approximations of y(t) plotted against t by using Euler’s method. Each line corresponds to one row of the table above, that is, to different step sizes h = 1/2, 1/4, 1/8 and 1/16. The graphs on the right show the error plotted against t, so the errors at t = 2 are those given in the table. Here again, each line corresponds to a different step size h = 1/2, 1/4, 1/8 and 1/16, Obviously, the lines with error closer to zero correspond to higher values of k. Figure 1: Euler’s Method: numerical computation of the solution with step size (on the left) and the corresponding error (on the right). Similarly, we have produced the same


View Full Document

MIT 18 034 - Higher Order Taylor Methods

Documents in this Course
Exam 3

Exam 3

9 pages

Exam 1

Exam 1

6 pages

Load more
Download Higher Order Taylor Methods
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Higher Order Taylor Methods and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Higher Order Taylor Methods 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?