Question: Problem 3: (You need to do this problem in Matlab first, then copy your scripts and results as your solution) (1) Write a Matlab function

 Problem 3: (You need to do this problem in Matlab first,

Problem 3: (You need to do this problem in Matlab first, then copy your scripts and results as your solution) (1) Write a Matlab function M-file to compute the Maclaurin series expansion for the cosine function as described in Problem 3. The function should have the following features: Iterate until the relative error falls below a stopping criterion (es) or exceeds a maximum number of iterations (maxit). Allow the user to specify values for x, es, and maxit. Return the estimate of cos(x), the approximate percent relative error, the number of iterations. (2) What are your estimate of cos(x), the approximate percent relative error, and the number of iterations with the input as x=2/3, the stopping criterion resulting in at least 2 significant digits, and maxit=100 by running your script in Matlab? Do these results agree with what you got from problem 2

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 Databases Questions!