Question: a.) Write a C++ program that calculates the value of the series sin x and cos x, sin 2x or cos 2x where the user

a.) Write a C++ program that calculates the value of the series sin x and cos x, sin 2x or cos 2x where the user enters the value of x (in degrees) and n the number of terms in the series. For example, if n= 5, the program should calculate the sum of 5 terms in the series for a given values of x. The program should use switch statements to determine the choice sin x AND cos x, sin 2x OR cos 2x. (Note: you may have to convert degrees to radians for sin and cos functions.)
b.) Draw a detailed flow chart on how this program is designed, indicating the necessary inputs, outputs and thealgorithm you have used.
Problem 1: The series expansion for cos, and sin, functions and trigonometric identities are as follows (r in radians) 6 20 Points cos x = 1-2, + sin(2x) = 2 sinx cosx cos(2x) cos2 -sin2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
