Question: P3 - Sin(x) sin(x) can be approximately calculated using the following formula, where n! is factorial(n) - for example 3l-3*2*1 6 (the function in previous

P3 - Sin(x) sin(x) can be approximately calculated using the following formula, where n! is factorial(n) - for example 3l-3*2*1 6 (the function in previous problem). 2n+1 3for all z The more terms we use in the series, the higher will be accuracy of the calculations. By using infinite terms in the series we will have the exact value Hint 1: For n! simply use (copy and paste) the factorialEunc (n) from previous problem Hint 2: This problems is similar to the "pi series" problem in the homework problems. A simple for loop is needed. Much easier that it looks Write a program that gets x and calculates sin(x) using 10, 100, 1000 and 10,000 terms Your C++ code for this HW -- Copy and paste your code here Page 4 Then run the program and calculate and display the result for x=pi/6 Sample Run Result Copy and paste the result here (e.g. the screen shot of the result you get by running the code)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
