1 / 8

Numerical Solutions of Differential Equations

Numerical Solutions of Differential Equations. Taylor Methods. Euler’s Method

yoland
Download Presentation

Numerical Solutions of Differential Equations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Solutions of Differential Equations Taylor Methods

  2. Euler’s Method We have previously seen Euler’s Method for estimating the solution of a differential equation. That is to say given the derivative as a function of x and y (i.e. f(x,y)) and an initial value y(x0)=y0 and a terminal value xn we can generate an estimate for the corresponding yn. They are related in the following way: The value x = (xn-x0)/n and the accuracy increases with n. Taylor Method of Order 1 Euler’s Method is one of a family of methods for solving differential equations developed by Taylor. We would call this a Taylor Method of order 1. The 1 refers to the fact that this method used the first derivative to generate the next estimate. In terms of geometry it says you are moving along a line (i.e. the tangent line) to get from one estimate to the next.

  3. Taylor Method of Order 2 In this method instead of moving from point to point along a line we move from point to point along a parabola. Not just any parabola but the parabola that most closely approximates the function y we are interested in. In intermediate calculus we discussed Taylor’s Theorem. This explained how to get a polynomial of varying degrees that would estimate any function at a point a. In particular a second degree polynomial (i.e. it graph is a parabola). How you do this estimate is given below. In order to be able to apply this we need to be able to resolve 2 questions: 1) How is the second or higher derivative found? 2) How is accuracy improved by increasing the number of subintervals?

  4. Computing Higher Order Derivatives The problem we are trying to solve we are given the first derivative expressed as a function of x and y. How can we get the second, third or any higher derivative from this piece of information? We use a concept from multivariable calculus and a tool called partial derivatives. The Problem: Given : find To the right is a tree that shows how the variables depend on each other. Remember y is a function of x (i.e. y is the dependent variable x is the independent variable). The delta symbol  indicates a partial derivative which means treat the indicated variable as the variable and all other variables as a constant. x y x

  5. Example: Find the second derivative if the first derivative is given to the right. Set f(x,y) = x2y and plug it into the formula below. Here we notice that: Notice you get a function ofxandyagain! Higher Derivatives Third, fourth, fifth, … etc derivatives can be computed with the same method. This has a recursive definition given to the right.

  6. Subintervals If we wish to apply Taylor’s Method to the general differential equation given to the right on only one subinterval we simply plug into the formula the following values: x0 = ay0 = f(x0)x1 = x Applying this to a subinterval with n parts to the partition this formula becomes: Where:

  7. Example: Apply the second order Taylor Method to estimate the solution to the differential equation to the right at x = 2 using 4 partitions. The recursive formula becomes: The estimate we have found for this value is 7.38842

  8. Higher Order Taylor Methods Taylor’s Method can be extended to any order Taylor approximation by the following recursive definition. This is the definition of a Taylor method of order n. Algorithm for Taylor’s Method f(x,y) (* expression for x and y *) x0 (* initial value for x *) y0 (* initial value for y *) xn (* terminal value for x *) n (* number of partitions of the interval *) deltax = (xn-x0)/n xi = x0 xprev = xi yi = y0 for(i=1, in, i++, xi = xi + deltax yi = yi + f(xprev,yi)*deltax+…+(1/(n!))(y(n)(xprev,yi)*deltax) xprev=xi Return yi

More Related