This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Math 306 – Lab 1 Euler’s Method Printed Name: Please carefully work all of the following problem(s). You must SHOW YOUR WORK to receive ANY credit! You can work together, but must write up your own solutions. You must include your commented Mathematica code! Read Section 2.4. 1 Euler’s Method This lab will investigate Euler’s Method for approximating the solutions to differential equations. As an example, the simple differential equation dy dx = e x 2 , y (0) = 1 . has a unique solution – namely y ( x ) = 1+ Z x e u 2 du . Unfortunately, there is no elementary way to perform this integration. Instead, we shall try to approximate the solution. Consider the general IVP dy dx = f ( x,y ) , y ( x 1 ) = y 1 . The idea is • We pick an initial point, say ( x 1 ,y 1 ) • The slope through the point ( x 1 ,y 1 ) is given by f ( x 1 ,y 1 ). We move a small distance along the slope segment through this point to the next point ( x 2 ,y 2 ). Note that y 2 is an approximation to y ( x 2 ). • At the point ( x 2 ,y 2 ), we have a new slope given by f ( x 2 ,y 2 ). We now move a small distance along the slope segment through ( x 2 ,y 2 ) to the next point ( x 3 ,y 3 ). Again, y 3 ≈ y ( x 3 ). • Etc. A more mathematical version of this process is: • Choose a step size, say h > 0. • Your first point is ( x 1 ,y 1 ). • Your next point is ( x 2 ,y 2 ), where x 2 = x 1 + h and y 2 = y 1 + h · f ( x 1 ,y 1 ). • Your next point is ( x 3 ,y 3 ), where x 3 = x 2 + h and y 3 = y 2 + h · f ( x 2 ,y 2 ). • Etc. • Your n + 1 st point is ( x n 1 ,y n 1 ), where x n 1 = x n + h and y n 1 = y n + h · f ( x n ,y n ). Hence, the numbers y 1 ,y 2 ,...,y n ,... form an approximate solution to y ( x ). Now, return to the IVP dy dx = e x 2 y (0) = 1 . • Choose a step size: h = 1. • ( x 1 ,y 1 ) = (0 , 1). • The slope through this point is f (0 , 1) = 1. So... x 2 = x 1 + h = 0 + 1 = 1 y 2 = y 1 + h · f ( x 1 ,y 1 ) = 1 + 1 · 1 = 2 ....
View
Full
Document
This note was uploaded on 01/13/2012 for the course MATH 306 taught by Professor Keithemmert during the Spring '11 term at Tarleton.
 Spring '11
 KeithEmmert
 Math

Click to edit the document details