Euler s Method for Approximating Solution Curves

Similar documents
Direction Fields; Euler s Method

Increasing/Decreasing Behavior

Objectives. Materials

4.7 Approximate Integration

3.7. Vertex and tangent

Increasing/Decreasing Behavior

2.9 Linear Approximations and Differentials

Euler s Method with Python

4 Visualization and. Approximation

4.3, Math 1410 Name: And now for something completely different... Well, not really.

SHOW ALL NEEDED WORK IN YOUR NOTEBOOK.

Differentiation. The Derivative and the Tangent Line Problem 10/9/2014. Copyright Cengage Learning. All rights reserved.

Objectives. Materials

Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives

MTH 122 Calculus II Essex County College Division of Mathematics and Physics 1 Lecture Notes #11 Sakai Web Project Material

we wish to minimize this function; to make life easier, we may minimize

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

Exam 1 Review. MATH Intuitive Calculus Fall Name:. Show your reasoning. Use standard notation correctly.

THE TANGENT PLANE 6.1 INTRODUCTION TO THE TANGENT PLANE CHAPTER 6:

d f(g(t), h(t)) = x dt + f ( y dt = 0. Notice that we can rewrite the relationship on the left hand side of the equality using the dot product: ( f

MATH 19520/51 Class 6

Topic 2.3: Tangent Planes, Differentiability, and Linear Approximations. Textbook: Section 14.4

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) =

MEI GeoGebra Tasks for AS Pure

Linear and quadratic Taylor polynomials for functions of several variables.

First of all, we need to know what it means for a parameterize curve to be differentiable. FACT:

Tangent Lines and Linear Approximations Solutions

c x y f() f (x) Determine the Determine the Approximate c : Replacin on the AP exam: under-approximation

1 extrema notebook. November 25, 2012

Derivatives and Graphs of Functions

Announcements. Topics: To Do:

9.1 Linear Inequalities in Two Variables Date: 2. Decide whether to use a solid line or dotted line:

Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives

5.5 Newton s Approximation Method

MEI Desmos Tasks for AS Pure

(Part - 1) P. Sam Johnson. April 14, Numerical Solution of. Ordinary Differential Equations. (Part - 1) Sam Johnson. NIT Karnataka.

Social Science/Commerce Calculus I: Assignment #6 - Solutions Page 1/14

14.6 Directional Derivatives and the Gradient Vector

THE TANGENT PLANE 6.1 INTRODUCTION TO THE TANGENT PLANE CHAPTER 6:

Tangent line problems

, etc. Let s work with the last one. We can graph a few points determined by this equation.

Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter

Objective. m y 1 y = x 1 x 2

1

B. Examples Set up the integral(s) needed to find the area of the region bounded by

C3 Numerical methods

Problem #3 Daily Lessons and Assessments for AP* Calculus AB, A Complete Course Page Mark Sparks 2012

Background for Surface Integration

AP Calculus AB Unit 2 Assessment

Objectives. Materials

Differentiability and Tangent Planes October 2013

3.9 LINEAR APPROXIMATION AND THE DERIVATIVE

Derivatives. Day 8 - Tangents and Linearizations

2.1 Derivatives and Rates of Change

Solved Examples. Parabola with vertex as origin and symmetrical about x-axis. We will find the area above the x-axis and double the area.


Application 2.4 Implementing Euler's Method

During the timed portion for Part A, you may work only on the problems in Part A.

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

notes13.1inclass May 01, 2015

We have already studied equations of the line. There are several forms:

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

Mar. 20 Math 2335 sec 001 Spring 2014

The Fundamental Theorem of Calculus Using the Rule of Three

Section 4.3: How Derivatives Affect the Shape of the Graph

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

Math 1314 Lesson 2: An Introduction to Geogebra (GGB) Course Overview

MTH245 Unit 2 Module1 Piecewise Linear Functions

Math 2250 Lab #3: Landing on Target

We have already studied equations of the line. There are several forms:

2 Unit Bridging Course Day 2 Linear functions I: Gradients

Whole Group: Basics of Graphing on your TI Calculator

Section 1: Section 2: Section 3: Section 4:

STATISTICS MEAN Know the TOTAL # of points MEDIAN MIDDLE ($) Arrange the scores in order MODE most frequent. RANGE DIFFERENCE in high and low scores

A simple problem that has a solution that is far deeper than expected!

Drawing curves automatically: procedures as arguments

MA 113 Calculus I Fall 2015 Exam 2 Tuesday, 20 October Multiple Choice Answers. Question

MA 114 Worksheet #17: Average value of a function

Part I. Problems in this section are mostly short answer and multiple choice. Little partial credit will be given. 5 points each.

Name: Date: 1. Match the equation with its graph. Page 1

1 MATH 253 LECTURE NOTES for FRIDAY SEPT. 23,1988: edited March 26, 2013.

GAP CLOSING. Grade 9. Facilitator s Guide

THS Step By Step Calculus Chapter 3

What you will learn today

over The idea is to construct an algorithm to solve the IVP ODE (8.1)

2.4. Rates of Change and Tangent Lines. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier

Calculators ARE NOT Permitted On This Portion Of The Exam 28 Questions - 55 Minutes

Notice that the height of each rectangle is and the width of each rectangle is.

Functions. Edexcel GCE. Core Mathematics C3

Approximate First and Second Derivatives

AP Calculus. Extreme Values: Graphically. Slide 1 / 163 Slide 2 / 163. Slide 4 / 163. Slide 3 / 163. Slide 5 / 163. Slide 6 / 163

Math 21a Homework 22 Solutions Spring, 2014

Digitizer Leapfrogging

Exercises for a Numerical Methods Course

REVIEW I MATH 254 Calculus IV. Exam I (Friday, April 29) will cover sections

AB Calculus: Extreme Values of a Function

Lab 3: Sampling Distributions

Section 4.1 Max and Min Values

AP Calculus. Slide 1 / 213 Slide 2 / 213. Slide 3 / 213. Slide 4 / 213. Slide 4 (Answer) / 213 Slide 5 / 213. Derivatives. Derivatives Exploration

Transcription:

Euler s Method for Approximating Solution Curves As you may have begun to suspect at this point, time constraints will allow us to learn only a few of the many known methods for solving differential equations. In other words, while this class will give you the ability to solve many equations, there will be many more that you cannot solve. In fact, even if you were familiar with every known solution method, there would still be differential equations that you would be unable to solve because of the limitations of integration techniques. For example, since we cannot evaluate the integral e x2 dx, we cannot solve the equation dx = ex2. For this reason, it is helpful to have numerical methods for approximating solutions; in this and the next two sections, we will learn several such numerical techniques. Our first technique is Euler s Method. Before discussing the method in general, let s illustrate the ideas behind the method using a simple example. As a first example of implementing a numerical solution technique, let s begin with the initial value problem y = 1 + y, y(0) = 1. Of course, we don t really need a numerical method to solve this equation; since it is separable, it is quite easy to solve without approximation. Let s go ahead and find a solution curve using the methods we are alrea comfortable with, so that we can compare the exact solution to a numerical approximation. Rewriting the equation as 1 + y = dx, it is clear that we can solve by integrating both sides. Since 1 + y = dx, and our solution is given by 1 + y = ln 1 + y, dx = x + C, ln 1 + y = x + C or y = e x e C 1. We can solve for C using the initial condition y(0) = 1: 1 = y(0) = e 0 e C 1 = e C 1 1

so that e C = 2. Thus the solution curve is y = 2e x 1, graphed below (and in the sequel) in red: Solution curve to the differential equation y = 1 + y. Now pretend for a moment that we did not know how to solve the initial value problem y = 1 + y, y(0) = 1, but still wished to understand what the solution curve looks like. At this point, we have very little information to go on: we know that the curve must pass through the point (1, 0), and we know that the slope of a tangent line to the curve at any point (x, y) is y = 1 + y. From this data, we need to extrapolate the shape of the curve. To make the jump from our bit of data to a guess at the curve s shape, we will go back to an idea that we have seen several times in calculus: near the point of tangency, a tangent lines value is an excellent approximation to the value of the curve, as illustrated in the graph below: The curve y = 2e x 1 and its tangent line at (0, 1). The solution curve (which we are pretending we don t alrea know!) and its tangent line at (0, 1) are very close together near the point (0, 1). For example, compare the curve and its tangent line at x = 1/2: 2

The points are quite close in height, so we could certainly use the tangent s height at x = 1/2 to approximate the solution curve s height at x = 1/2. Now this is a particularly useful idea since we have everything we need to determine the approximating point on the tangent line since we have a point on the tangent line (the point (0, 1)!), and since we know the slope of the curve at the point (0, 1) (again, since y = y + 1, the slope is y = 2), filling in the formula y y 0 = m(x x 0 ) or y = m(x x 0 ) + y 0 for a tangent line is simple. The tangent line has equation y = 2x + 1, and y(1/2) = 2, so the point highlighted above on the tangent line is (1/2, 2). The point (1/2, 2) now becomes the first approximation on our approximation curve. For later use, we will think of y = 1 + y as f(x, y) = 1 + y, and instead of writing y, we will write f(x, y). Let s keep track of the data that we ve collected; specifically, we should write down the points that we are using as approximations for the curves value, as well as the data that we need to continue the calculations: i f(x i, y i ) x i y i 1 1/2 2 The x and y columns give the coordinates of points of our approximation. In the first row, we have the point (x 0, y 0 ) = (0, 1), which we know to be on the curve. In the second row, the point (x 1, y 1 ) = (1/2, 2) appears as our first approximation. So far, we have approximated the red curve with the small blue line segment below: 3

Let s add another point to our approximation using the same process. We are assuming that the solution curve y passes through the point (x 1, y 1 ) = (1/2, 2). As before, we will begin by drawing a tangent line to the curve using the fact that y = f(x, y) gives us slopes of tangent lines: Again, the tangent line at this point should be close to the value for the actual solution y. As before, let s move away from this point in the x direction by our step size, h = 1/2, and determine the tangent line s height at x = 1 = 2h, as indicated in the graph below: We will use the point marked above on the tangent line as an approximation for the actual point (1, y(1)) on the curve. 4

Since the slope m of a tangent line to the curve at the point (x 1, y 1 ) is just f(x 1, y 1 ), we might wish to rewrite the formula y = m(x x 1 ) + y 1 for this line as y = f(x, y)(x x 1 ) + y 1 with x 1 = 1/2, y 1 = 2, and f(x 1, y 1 ) = 1+2 = 3. We want to calculate the height y 2 of this tangent line at x = x 2 = 1, which is Continuing our table, we add the third row: i f(x n, y n ) x i y i 1 3 1/2 2 2 1 7/2 y 2 = 3(x 2 1/2) + 2 = 3(1 1/2) + 2 = 7/2. The table now indicates that the second approximation point on our curve is (x 2, y 2 ) = (1, 7/2). Adding this third point to the graph yields the following approximation curve, graphed in blue: Now this process is going to get tedious, but a clear pattern is emerging. To get the fourth row of data, we will need to fill in x 3 and y 3. Using the same step size h = 1/2, we see that x 3 = 3/2 = 3h. To get y 3, we again revert to the formula for a line and note that the line is tangent to the curve at (x 2, y 2 ) = (1, 7/2), with slope f(x 2, y 2 ) = 9/2; so the equation for this line is y = f(x 2, y 2 )(x 1) + y 2 = 9/2(x 1/2) + 7/2; calculating the height y 3 of the line at x = x 3 gives us Continuing the table, we have: i f(x n, y n ) x i y i 1 3 1/2 2 2 9/2 1 7/2 3 3/2 23/4 y 3 = 9/2(x 3 1/2) + 7/2 = 9/2(1 1/2) + 7/2 = 23/4. 5

Again, the table now tells us that the third approximation point on our approximation curve is (x 3, y 3 ) = (3/2, 23/4). Adding this point to the approximation curve, we get the graph below: We should now be able to calculate the fourth point on our approximation curve without too much effort; using the pattern established above, we have y 4 = f(x 3, y 3 )(x 4 x 3 ) + y 3 = 27 4 (2 3/2) + 23 4 = 73 8 The approximation point (x 4, y 4 ) = (2, 73/8) is added below: We can follow the same pattern to generate any number of point on the approximation curve. The nth approximation point can be found on the nth line below: 6

i f(x n, y n ) x i y i 1 3 1/2 2 2 9/2 1 7/2 3 27/4 3/2 23/4 4 81/8 2 73/8. n 1 + y n n 2 f(x n, y n )h + y n 1 I used Mathematica to generate the graph below, which iterates the process described above for a total of 12 approximations: Our approximating curve is better than nothing (assuming that we were unable to solve the original equation), but it is clear from the graph that it truly is an approximation. This naturally leads to the question: How can we make the approximation better? One possibility is to make our step size smaller. The less we move away from the point of tangency, the better the tangent line is at approximating the curve. The table below computes the Euler s method approximation points with step size h = 1/10 (significantly smaller than our previous step size of 1/2): i f(x n, y n ) x i y i 1 11/5 1/10 6/5 2 121/50 1/5 71/50 3 1331/500 3/10 831/500 4 14641/5000 2/5 9641/5000. n 1 + y n n 10 f(x n, y n )h + y n 1 Compare the graph of the approximation curve generated with h = 1/10 to the actual solution: 7

Approximation to solution curve, smaller step size. It is clear that a smaller step size produced a much better approximation curve. We summarize Euler s method for approximating a solution curve to the initial value problem y = f(x, y), y(x 0 ) = y 0 below: Choose step size h Iterate the process of choosing points on the approximation curve: 1. Calculate the (n + 1)st approximation on the approximation curve using the formula y n+1 = y n + h f(x n, y n ), x n+1 = x 0 + (n + 1)h. 2. Connect the points (x n, y n ) and (x n+1, y n+1 ) with a line segment. As noted above, Euler s method produces an approximation to the actual solution curve of a given differential equation. Since the approximation curve is not the actual solution curve, we say that Euler s method produces an error. For example, in our first set of calculations for the approximation to the solution of the initial value problem y = 1 + y, y(0) = 1, we ended up with the following approximation curve after 20 applications of Euler s method: 8

Compare this to the actual solution curve, graphed below in red: The error produced after 10 steps is marked above, and is quite significant. The following theorem tells us how much error to expect Euler s method to produce, based on the chosen step size: Theorem 1. Suppose that the initial value problem dx = f(x, y), y(x 0) = y 0 has a unique solution y(x) on the closed interval [a, b] with a = x 0, and assume that y(x) has a continuous second derivative on [a, b]. Suppose that the Euler s method approximations to the actual values y1, y2, y3,..., y k y(x 1 ), y(x 2 ), y(x 3 ),... y(x k ), are computed using step size h. Then there is a constant C so that y n y(x n ) Ch for each n, that is the nth approximation y n is no farther than Ch from the actual value y(x n ). The theorem simply states that, under certain circumstances, there is a constant C so that the total error in the nth step of Euler s method is no more than Ch, i.e. a constant multiple of the step size. This confirms our previous suspicion that step size also reduces the error. 9