Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The hyperbolic cosine of the argument z given in radians can be calculated by the series 8 2n I cosh(x) = 1+ (2n)! n=1
The hyperbolic cosine of the argument z given in radians can be calculated by the series 8 2n I cosh(x) = 1+ (2n)! n=1 2! + 6! (1) a) Write a Matlab function myCosh that takes as input and the number of terms N to use to estimate cosh (z), i.c., N cosh(x)=1+ 2n (2n)! " (2) and returns the estimate for cosh(x) together with the corresponding true relative error. You may use the Matlab function factorial () to calculate the factorial in the formula. For the true value of cosh(x) use Matlab's build-in function cosh(x). Do not print out any results to screen or do any plotting within the function. b) Calculate and report with at least 15 digits the estimate for cosh(20) and the true relative error for i) N = 5, ii) N = 20, iii) N = 30. 1 c) In a semilogarithmic plot (use semilogy()), plot the absolute of the true relative error vs. N for N = 1... 10. d) Explain why the absolute of the true relative error does not decrease for N > 32.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started