Given two integers N and X. The task is to find the sum of tan(x) series up to N terms.
The series :
x + x3/3 + 2x5/15 + 17x7/315 + 62x9/2835……..
Input : N = 6, X = 1
Output :The value from the expansion is 1.55137626113259
Input : N = 4, X = 2
Output :The value from the expansion is 1.52063492063426
The expansion of tan(x) is shown here. Compute the each term using a simple loops and get the required answer.
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 N terms in the expansion of Arcsin(x)
- Find the sum of the series 1+11+111+1111+..... upto n terms
- Sum of the series 0.7, 0.77, 0.777, ... upto n terms
- Sum of series 2/3 - 4/5 + 6/7 - 8/9 + ------- upto n terms
- Sum of the series 1 / 1 + (1 + 2) / (1 * 2) + (1 + 2 + 3) / (1 * 2 * 3) + - - - - - - upto n terms.
- Find the sum of series 0.X + 0.XX + 0.XXX +... upto k terms
- Find sum of the series 1+22+333+4444+...... upto n terms
- Find sum of the series ?3 + ?12 +......... upto N terms
- Find the sum of series 3, -6, 12, -24 . . . upto N terms
- Program to find the sum of the series 23+ 45+ 75+..... upto N terms
- Find Sum of Series 1^2 - 2^2 + 3^2 - 4^2 ..... upto n terms
- Sum of Fibonacci numbers at even indexes upto N terms
- Sum of the series (1*2) + (2*3) + (3*4) + ...... upto n terms
- Sum of P terms of an AP if Mth and Nth terms are given
- Number of quadruples where the first three terms are in AP and last three terms are in GP
- Program to calculate the value of sin(x) and cos(x) using Expansion
- Middle term in the binomial expansion series
- Program to print binomial expansion series
- Find the ln(X) and log10X with the help of expansion
- Program to get the Sum of series: 1 - x^2/2! + x^4/4! -.... upto nth term
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.