M2160-1 2nd Homework Assignment. Due Feb. 3, 2006.
- Newton developed some series to compute pi. Here is one of them.
(See Petr Beckmann's A History of Pi, St. Martin's Press, 1971, p. 141.)
Simplify the math and write a computer program to print a table of the first 20
terms and the running totals (partial sums). Print out fifteen significant digits.
Print the actual value of pi and compare to your approximations.
6 + |
6 |
+ |
6 · 3 |
+ |
6 · 3 · 5 |
+ |
6 · 3 · 5 · 7 |
+ ... |
2 |
2 · 3 · 23 |
|
2 · 4 · 5 · 25 |
|
2 · 4 · 6 · 7 · 27 |
|
2 · 4 · 6 · 8 · 9 · 29 |
|
- In Calculus you learned that the Maclaurin series for cos(x) for an arbitrary angle x (in radians) is
|
x2 |
|
x4 |
|
x6 |
|
cos(x) = 1 - |
---- |
+ |
----- |
- |
----- |
+ ... |
|
2! |
|
4! |
|
6! |
|
Write a program which asks for an angle (in radians) and sums
the cosine series for this angle. Print a table of the first 20
terms, the running totals (partial sums) and an estimate of the
error made by the partial sum from the Taylor's remainder formula.
Print out fifteen significant digits.
Print the actual value of cosine and compare to your approximations.
E-mail your solutions to treiberg@math.utah.edu.