Math 321.001: LAB 1

Euler's Method Lab


This lab is due Friday,September 30, 2016 in class. Late labs will not be graded. You may use any technology that you have available: excel, Wolfram Alpha, Matlab, etc. I recommend excel because you can easily use it to produce tables and graphs that you can then paste into a word docuement.  You will be graded on exactly what is asked for in the instructions below. You need not turn in any additional data, graphs, paragraphs, etc. You should submit only what is called for, and in the order the questions are asked. Remember that you will be graded on your use of English, including spelling, punctuation, logic, as well as the mathematics.

Group Work Rules: This lab should be completed by a group of 3 to 5 students.  Turn in one copy of the completed assignment with the names of all group members.  After the graded assignment is returned, copies should be made so that each group member has a copy to keep.


Introduction. In this lab, you will need to use two numbers, A and B. These numbers are derived as follows.  Choose the student id number for one member of the group. The number A is the last nonzero number in that student ID, while the number B is the next to the last nonzero number in the ID. For example, if the student ID is 1454809, then A = 9 and B = 8. 

We have seen in class how to use Euler's Method to approximate the solutions of differential equations. We have also seen that Euler's method usually increases in accuracy if more steps are used (equivalently, if Delta t is chosen smaller). In this lab you will investigate how the accuracy of Euler's method changes as the step size becomes smaller.

Answer each of the following questions in order


0. Give the names of each student in the group.  State clearly the values of  A and B used by your group.

1. Consider the initial value problem

dy/dt = -2t+1

y(0) = A

where the constant A is determined as described above. Find the exact solution y(t) to this initial value problem and determine the value y(1). Be sure to check that your answer here is correct and show this computation explicitly. If your answer here is wrong, the rest of this lab makes no sense and grading will stop at this point.

2. Use Euler's method with a step size of Delta t = 0.1 to approximate y(1). That is, using Euler's Method, compute in succession

t0, y0, t1, y1, ..., t10, y10

where

t0 = 0, y0 = A and t10 = 1

so that y10 is an approximation of y(1). List in table form the values you find for t0, y0, ..., t10, y10. Highlight your approximate value for y(1) using this step size. What is the error here (the difference between your approximate value and the actual value of y(1))?

3. Repeat question 2 with a step size of Delta t = 0.05, i.e., with twice as many steps.

4. Repeat question 2 with a step size of Delta t = 0.01, i.e., with ten times as many steps as in question 2. You need not present all of the data here; just give the approximation to y(1) that you find using this step size and the error.

5. In a brief essay (no more than one page), discuss the improvement of the accuracy of Euler's Method as you make the step size smaller by a factor of 1/2 and 1/10. How does this affect your approximation of y(1)? By how much does your approximation improve percentage-wise?

6. Now consider a second initial value problem

dy/dt = 2y -1

y(0) = 1+B/10

where the constant B is determined from the student ID again as above. Remember to use B/10, not just B. Now repeat questions 2-5 for this initial value problem. Remember to check first that your exact solution of this initial value problem is absolutely correct (using this value). Otherwise, grading stops at this step.

So that everyone starts at the same place, consider the value

e2 = 7.389
to be accurate (it isn't, but it's close enough for our purposes).

Your results to the second part will not be as "clean" as in the first part. In your essay, give a qualitative description of how your results from the first and second parts of the lab compare.  Do they show a similar improvement of Euler's method with decreasing step size?