Mathematics 210  Spring term 2003  First assignment
This assignment requires you to submit several spreadsheets concerned
with numerical integration.
Be sure to sign all graphs.

Go to the MathSheet home page
and then to the applet page. Open a running
copy of the spreadsheet and return to this page.

Log in immediately: File/Log in. Your login id is your
Mathematics Department login name, and your password
is your student number. This allows you to save
and load spreadsheet files. You should save your work
frequently.

Question 1.
In the first column lay out values from 0 to 4 in 64
steps. In the second column lay out values of the function e^{x2}.
Make a graph of this function.
Save this sheet as m210.1.1.ms.

Question 2.
Estimate the area under the curve between 0
and 4 very rapidly
by the right rectangle rule.
You can check by eyeball whether you get a reasonable
estimate.
Fill in a bar graph to show your calculation visually  that is
to say, fillin some bars to show the area
given by the right rectangel rule.
Save this sheet as m210.1.2.ms.

Question 3.
Delete the part of your spreadsheet used to estimate areas.
Calculate and graph with essentially the same data the
area A(0, x) under that curve between 0
and x
(i.e. the integral of e^{x2}
from 0 to x) as a function of x for the same
range of values. But this time
by applying the trapezoid rule.
Save this sheet as m210.1.3.ms.
For this question, you will need to figure out how to plot the function
A(0,x), the area between 0 and x, by
one of the approximation rules. You will need
a separate column in the spreadsheet to do this.
Suppose you wanted to graph A(0,x) by the left rectangle
rule, for example. What you need to know
is that the area up to x+h
is equal to the area up to x
plus the area of the new rectangle between x and x+h, or
in other words that
A(0,x+h) = A(x) + h f(x) (approximately), and furthermore
that A(0,0) = 0. Thus you can get A(0,h), A(0,2h), etc.
up to the end. The cell starting the column
holds 0, and that holding A(0,x+h)
is thus the sum of the cell holding A(0,x)
plus something involving the cell holding f(x).
Something like this happens for the trapezoid rule, too,
except that the area h f(x) of a rectangle
is replaced by the area of the trapezoid with
ends at x and x+h.

Question 4.
Calculate the areas, on the same spreadsheet,
for 128 and 256 steps
as well as 64.
Each one of these should take up
a separate bunch of columns. Put these all on one spreadsheet,
taking up maybe 8 columns all in all.
Graph all
the area functions on one graph, each with a different colour.
Save this sheet as m210.1.4.ms.

Question 5.
Use the same spreadsheet.
Delete all the previous graphs.
Look at successive differences of the areas.
I.e. if A_{n} is the area
you get for n steps,
look at values of A_{2n}A_{n}.
Format these values to 16 decimal places.
Think.
Use these data alone to estimate A(0,4)
that you would get with 512 steps, then
1024 and 2048 steps. Put all
these differences and the estimates in a single column,
next to labels in the spreadsheet.
Save this sheet as m210.1.5.ms.

Question 6.
Look at the differences you got in the previous question.
Now make absolutely the best estimate you possibly can for
A(0,4). (Hint: what is 1 + 1/4 + 1/16 + ... ?)
Put this estimate in a labeled cell
as on the previous qusetion.
Save this sheet as m210.1.6.ms.
That's it!
If you find these questions confusing, please
write me.
