Problem 5 Write a function to compute the sum of a geometric

Problem #5. Write a function to compute the sum of a geometric series

1 + r + r2 + r3 +

Solution

The sum of geometric series here has the first term a=1 and common ratio r

Hence Sn = Sum of n terms

= , if |r|<1 =

= , if |r|>1=

--------------------------------------------

Note: If |r|<1, sum of infinite series converge to 1/1-r.

Problem #5. Write a function to compute the sum of a geometric series 1 + r + r2 + r3 +SolutionThe sum of geometric series here has the first term a=1 and commo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site