View the step-by-step solution to:

Question

# How would you start this code? ATTACHMENT PREVIEW Download attachment Screen Shot 2019-10-13 at 11.37.50 PM.png 1. In HW 07 you wrote a program to calculate the sin (x)&quot; using the Maclaurin arcsine series. For HW 08 you are to write a program that uses the Maclaurin cosine series to find cos (x): cos(x) = (-1)n (2n)! In ( n, x ) n=0 (-1)n (2n)! While the Maclaurin cosine series converges very rapidly for x \$ 7, the number of terms required increases rapidly for x &gt; I. Excel encounters problems with determining the factorial of numbers larger than 50 because of the limits of how exponentials are stored in memory; however, since the cosine function is a periodic function, cos(x) = -cos (x + 7) and cos(x) = cos (x + 2x). By taking this periodicity into account in your program, you only have to converge the Taylor series for x &lt; n, since the cos(n) = -1. a. Write a program to converge the Maclaurin cosine series and test it for values of x &lt; 2n. b. Modify your program so that if x &gt; 2x it calculates the cos(x) by finding cos (x) = cos (Modulus (x, 2n)) where Modulus (a, b) is the remainder of a/b. VBA has a modulus operator with the syntax = a MOD b. You should experiment with the MOD operator to be sure you understand how it functions. c. Modify your program so that if it &lt; &gt; &lt; 2x it calculates the cos (x) by finding cos (x) = -cos (x - I). d. Add error handling code to your program to trap any errors that result when the user enters a non-numeric value for x. e. Modify your program to allow the user to output both the cos (x) and the number of terms required in the Maclaurin series and the value of the last term evaluated by converting it into an array function. This requires converting your Maclaurin cosine function into an array function. See the example from the lecture. 2. Add comments to your programs to explain the different sections of the program and what they do.

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents