Question: c++ need help with writing this program 2. Create a TrigFunctions.h and TrigFunctions.cpp to provide implementations of the trigonometric functions Sin(x), Geofrey, Tentend Cor. You

c++

need help with writing this programc++ need help with writing this program 2. Create a TrigFunctions.h and

2. Create a TrigFunctions.h and TrigFunctions.cpp to provide implementations of the trigonometric functions Sin(x), Geofrey, Tentend Cor. You should compute Sin(x) using the summation: 21-1 sin(x) = (-1)(n-1) x3 x5 x x (2n-1)!=* - 3+577+9! ---- In addition you should implement com using the summation 2n 24 26 cocin (2n You can.compute Lanx) - Sin Cosland Cotu Coctail/Sinfon). In TrigFunctions.cpp you should declare a variable p to be accessible by all functions in the file that defines the upper bound on the summation. This value should be set using a function SetP declared in TrigFunctions.h. Main should simply set p to 10, and then test your functions by calling each over the range of 0.0 to 3.1 by 0.1, comparing each to the corresponding function provided in math.h (sin, cos, tan, and use cos/sin for cot). Use "#include " to get the math functions as shown in recitation. Plot your results for Sin and.Cos in Excel and compare them to results obtained from the C++ functions sin and cos

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!