Question: C+ programming 20% PRO Purchase T IS e Left Highlight T Strikeout Typewriter Note U Underline Comment e Right Quick PDF Scan Sign Convert Protect
20% PRO Purchase T IS e Left Highlight T Strikeout Typewriter Note U Underline Comment e Right Quick PDF Scan Sign Convert Protect Activate Try Editing Product Info Upgrade to Business Write a program that uses the Maclaurin series to determine the trigonometric functions sin() and cos() result of an angle x. Additionally, tan() must also be determined using past results from sin() and cos(). The program must fulfil these requirements: Angle x must be in radians. The precision of the result should be at least 4 decimal places. Calculation must stop when the result is within 1e-7 of the actual value. The functions sin(), cos(), tan() in math.h ARE NOT allowed to be used! Maclaurin series is used to determine trigonometric results. Let the maximum number of iterations be N -100. sinx (-1)*x2k+1 (2k + 1): k=0 COS X (-1)*x2 (2k)! kao sinx an = COS X Examples: Choose function (1) sine(x) or [2] cosine(x) or (3] tangent(x): 1 Enter angle x in radians: 0.8 sine(0.80) = 0.717356 Choose function (1) Sine(x) or (2) cosine(x) or [3] tangent(x): 2 Enter angle x in radians: 1.3 cosine{ 1.30) = 0.267499 Choose function (1) sine(x) or (2) cosine(x) or [3] tangent(x): 3 Enter angle x in radians: 0.64 tangent (8.64) = 0.744544
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
