Question: The cosine function can be evaluated by the following infinite series: Write an algorithm to implement this formula so that it computes and prints out

The cosine function can be evaluated by the following infinite series:

cos.x =1- 2! 6! 4! +..

Write an algorithm to implement this formula so that it computes and prints out the values of cos x as each term in the series is added. In other words, compute and print in sequence the values for

cos x = 1

cos x = 1 ? x2/2!

cos x = 1 ? x2/2! + x4/x!

Up to the order term n of your choosing. For each of the preceding, compute and display the percent relative error as % error = true ? series approximation/true x 100%

cos.x =1- 2! 6! 4! +..

Step by Step Solution

3.47 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The development of the algorithm hinges on recognizing that the series approxima... View full answer

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

Document Format (1 attachment)

Word file Icon

45-M-N-A-M-E-A (24).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!