EulersMethodLabSolution

EulersMethodLabSolution - Math 306 – Lab 1 Euler’s...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Math 306 – Lab 1 Euler’s Method Printed Name: Keith E. Emmert 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 The Solution to the Euler’s Method Lab Consider the initial value problem dy dx = 4 1 + x 2 , y (0) = 0 . A) To find the solution, simply integrate. Thus, we have y ( x ) = Z 4 1 + x 2 dx = 4tan- 1 ( x ) + C. However, using our initial condition of y (0) = 0, we obtain 0 = y (0) = C. Hence, our solution is y ( x ) = 4tan- 1 ( x ) . B) To why π = y (1), where y ( x ) is the solution to the IVP, simply compute y (1) = 4tan- 1 (1) = 4 π 4 = π. C) To find the position, n , in the list of approximations ˆ y that approximates y (1), you need to use the formula n = 1 h + 1 , where h is the step size used in Euler’s Method. Thus, if your y-coordinates are in the list yList, then yList[[n]] gives you the n th element of that list. If you have a list of ordered pairs, then xyList[[n]][[2]] gives you the second ( y-coordinate) of the n th ordered pair. In Table 1, we list several approximations for π . Table 1: Table of approximations of π generated from Euler’s Method. π 3.14159 h Approximation 1 4 0.5 3.6 0.1 3.23993 0.01 3.15158 0.001 3.14259 0.0001 3.14169 D) The direction field is shown in Figure 1. E) Four plots comparing Euler’s Method to NDSolve are shown in Figure 2. In Figure 2(a) I used h = 1, Figure 2(b) I used h = 0 . 5, Figure 2(c) I used h = 0 . 1, and Figure 2(d) I used...
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.

Page1 / 4

EulersMethodLabSolution - Math 306 – Lab 1 Euler’s...

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