Given an infinite series and a value x, the task is to find its sum. Below is the infinite series
1^2*x^0 + 2^2*x^1 + 3^2*x^2 + 4^2*x^3 +……. upto infinity, where x belongs to (-1, 1)
Input: x = 0.5 Output: 12 Input: x = 0.9 Output: 1900
Though the given series is not an Arithmetico-Geometric series, however, the differences and so on, forms an AP. So, we can use the Method of Differences.
Hence, the sum will be (1+x)/(1-x)^3.
Below is the implementation of above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Sum of series M/1 + (M+P)/2 + (M+2*P)/4 + (M+3*P)/8......up to infinite
- Find if the given number is present in the infinite sequence or not
- Sum of sum-series of first N Natural numbers
- Sum of series formed by difference between product and sum of N natural numbers
- Program to find sum of series 1 + 1/2 + 1/3 + 1/4 + .. + 1/n
- Find the sum of all the terms in the n-th row of the given series
- Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!
- Program to find Sum of a Series a^1/1! + a^2/2! + a^3/3! + a^4/4! +…….+ a^n/n!
- Find the sum of the series 1+11+111+1111+..... upto n terms
- Program to find the sum of a Series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n)
- Program to find sum of series 1*2*3 + 2*3*4+ 3*4*5 + . . . + n*(n+1)*(n+2)
- Program to find the sum of a Series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n
- Program to find sum of series 1 + 2 + 2 + 3 + 3 + 3 + . . . + n
- Find sum of Series with n-th term as n^2 - (n-1)^2
- Program to find Sum of the series 1*3 + 3*5 + ....
- Find the sum of series 0.X + 0.XX + 0.XXX +... upto k terms
- Find the sum of series 3, 7, 13, 21, 31....
- Find the sum of n terms of the series 1,8,27,64 ....
- Find sum of the series 1-2+3-4+5-6+7.......
- Find sum of the series 1+22+333+4444+...... upto n terms
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.