Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 programimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

1. In what ways has flexible working revolutionised employment?

Answered: 1 week ago