2) If we sum
1 / 1^2 + 1 / 2^2 + 1 / 3^2 + 1 / 4^2 + 1 / 5^2 + ...
+ 1 / n^2 + ... and continue indefinitely, the
result is pi^2 / 6 (let's call this pi6).
For practical purposes, we want to know which value of
n brings us close to pi6, i.e.,
for which n do we observe that
(1 / 1^2 + 1 / 2^2 + 1 / 3^2 + 1 / 4^2 + 1 / 5^2 + ...
+ 1 / n^2) > (pi^2 / 6 - delta) for the first time.
Write an S-Plus function that takes delta
as its input and returns n. You may assume
that only valid values for delta will be used as
input to this function. Test your function with
delta1 _ pi - 3
delta2 _ 0.01
delta3 _ 0.001
delta4 _ 0.0001
delta5 _ 0.00001
(5 Points)