Given a value of cos(Θ) and a variable . The task is to find the value of cos(nΘ) using propety of trignomertric functions.
Note: n <= 15.
Input : cos(Θ) = 0.5, n = 10 Output : -0.5 Input :cos(Θ) = 0.5, n = 3 Output : -0.995523
Using De-Moivre’s theorem, we have:
Now, as the value of both sin(Θ) and cos(Θ) is known. Put the values in above equation to get the answer.
Below is the implementation of the above idea:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Program to find sum of 1 + x/2! + x^2/3! +...+x^n/(n+1)!
- Program to find value of 1^k + 2^k + 3^k + ... + n^k
- Program to find the last two digits of x^y
- 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!
- Program to find LCM of 2 numbers without using GCD
- Program to find greater value between a^n and b^n
- Program to find the value of sin(nΘ)
- Program to find sum of series 1*2*3 + 2*3*4+ 3*4*5 + . . . + n*(n+1)*(n+2)
- Program to find sum of the given sequence
- Program to find the value of tan(nΘ)
- Program to find sum of series 1 + 2 + 2 + 3 + 3 + 3 + . . . + n
- Program to find HCF iteratively
- Program to find the sum of a Series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n
- Program to find Sum of the series 1*3 + 3*5 + ....
- Program to find the Depreciation of Value
- Program to find last two digits of 2^n
- Program to find the sum of a Series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n)
- Program to find the sum of the series (1/a + 2/a^2 + 3/a^3 + ... + n/a^n)
- Program to find the sum of the series 1 + x + x^2+ x^3+ .. + x^n
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.