krozy

0 Reputation

2 Badges

12 years, 313 days

MaplePrimes Activity


These are questions asked by krozy

 Write a function to compute the n-th partial sum of the alternating series

"1-1/(4)+1/(9)-1/(16)+...+(-1)^(n-1) * 1/(n^(2))"
Specifically, the procedure takes n as input, and returns the sum of the first n terms.
 
So I am kind of lost- I've tried 5 different procs but keep getting more confused. Here is current one:
 
 
prob := proc (N) 
local a, u, n, q; 

Investigate the limit of: (1-cos(x))/x as x goes to 0.

 

More specifically, define: f(x)=(1-cos(x))/x

and demonstrate that the limit as x approaches 0 f(x)=0 as follows:

 

Write a function that takes a as input, and calculates an integer N as the output so that |f(1/N)|, using a while loop.

Specifically, compute f(1), f(1/2), f(1/3)..... until |f(1/N)|< a and return N.

Page 1 of 1