Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 24P

Develop a well-structured program to compute the Maclaurin series expansion for the cosine function as described in Prob. 4.2. 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 these parameters.

• Include default values of ( es ) es ( = 0.000001 )  and maxit ( = 100 ) in the event that they are not specified by the user.

• Return the estimate of cos ( x ) , the approximate relative error, the number of iterations, and the true relative error (that you can calculate based on the built-in cosine function).

Blurred answer
Knowledge Booster
Background pattern image
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
Power Series; Author: Professor Dave Explains;https://www.youtube.com/watch?v=OxVBT83x8oc;License: Standard YouTube License, CC-BY
Power Series & Intervals of Convergence; Author: Dr. Trefor Bazett;https://www.youtube.com/watch?v=XHoRBh4hQNU;License: Standard YouTube License, CC-BY