Question: Declare two variables: X is the argument, and h is the required accuracy Print out as many terms of the Maclaurin series approximation for Sine(x)
Declare two variables: X is the argument, and h is the required accuracy
Print out as many terms of the Maclaurin series approximation for Sine(x) as you need for the required accuracy, but NO MORE and NO LESS.(15 terms id say).
Also print out Sine(X) BUT do not use the value of Sine(X) to determine the accuracy of the approximation.
If you test the program with X=1 and h=0.0002 you should get output that looks like this: X=1 and h=0.0002 The value of Sin(x) is: 0.8414709848078965 term1= 1; sum = 1 term2= -0.16666666666666666; sum = 0.8333333333333334 term3= 0.008333333333333333; sum = 0.8416666666666667 accuracy: 0.0001984126984126984
PLEASE USE NOTEPADD++ OR TEXTEDIT TO CONVERT THE CODE INTO HTML FILE. (DO NOT USE JAVA.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
