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
Students have asked these similar questions
7. Show that for R sufficiently large, the polynomial P(z) in Example 3, Sec. 5, satisfies the inequality |P(z)| R. Suggestion: Observe that there is a positive number R such that the modulus of each quotient in inequality (9), Sec. 5, is less than |an|/n when |z| > R.
9. Establish the identity 1- 1+z+z² + 2n+1 ... +z" = 1- z (z1) and then use it to derive Lagrange's trigonometric identity: 1 1+ cos cos 20 +... + cos no = + 2 sin[(2n+1)0/2] 2 sin(0/2) (0 < 0 < 2л). Suggestion: As for the first identity, write S = 1+z+z² +...+z" and consider the difference S - zS. To derive the second identity, write z = eie in the first one.
8. Prove that two nonzero complex numbers z₁ and Z2 have the same moduli if and only if there are complex numbers c₁ and c₂ such that Z₁ = c₁C2 and Z2 = c1c2. Suggestion: Note that (i≤ exp (101+0) exp (01-02) and [see Exercise 2(b)] 2 02 Ꮎ - = = exp(i01) exp(101+0) exp (i 01 - 02 ) = exp(102). i 2 2
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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
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