Question: Problem 2 : Make an array of 5 zeros, and then start with a value of h = 1 . You want to find approximations

Problem 2: Make an array of 5 zeros, and then start with a value of h=1. You want to find approximations for the derivative of cos(x) near x=2. Make a for loop; after
each itteration, reduce the value of h by half. Store your values in the array you created, and print out all the values when you are done.
Problem 3: Print the graphs of sin(x) and cos(x) on the same graph with -2x2. Include a legend with labels for each. You will need to choose appropriate sizings
for the window, and spacing for the values of x.
Problem 4: Recall that you can find the Maclaurin series approximation with 4 terms for f(x)=ex as
ex~~1+x+x22+x36
Make a function called mac4 that returns this approximation. Then calculate the true error Et for 0x3; you will need to choose an adeequite spacing. Store these errors
in an array, then graph out the errors as a function of x.
]:
Problem 2 : Make an array of 5 zeros, and then

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!