EulersMethodLabSolution

EulersMethodLabSolution - Math 306 Lab 1 Eulers Method...

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 Eulers 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 Eulers 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 Eulers 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 Eulers 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 Eulers 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

Page1 / 4

EulersMethodLabSolution - Math 306 Lab 1 Eulers Method...

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