Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this question please, I am taking numerical methods course. Problem 4 (25 points) The hyperbolic cosine of the argument x given

I need help with this question please, I am taking numerical methods course.

image

Problem 4 (25 points) The hyperbolic cosine of the argument x given in radians can be calculated by the series - n=1 cosh(x) = 1 + x2n (2n)! x 7:6 = 1+ + + 2! 4! 6! (1) a) Write a Matlab function myCosh that takes as input x and the number of terms N to use to estimate cosh (x), i.e., N +.... 2n (2n)! n=1 and outputs 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). cosh(x) 1+ " b) Use the function to calculate the estimate for cosh (20) and the true relative error for i) N = 5, ii) N = 20, iii) N = 30. c) In a semilogarithmic plot (use semilogy()), plot the absolute of the relative error vs. N for N = 1... 40. d) Explain why the absolute of the relative error does not decrease for N > 32. Problem 4 required submission: Softcopy printout of well commented function you included in your Gradescope submission Softcopy printout of the results of calling your function for b) i)- iii) using format long Annotated semilogarithmic plot of absolute relative error us. N for N = 1... 40. Explanation why the absolute of the relative error does not decrease for N > 32. Upload of your Matlab functions and scripts to the Homework 1 link on Canvas (2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Databases questions

Question

Convert 0.203 m/min to meters/second.

Answered: 1 week ago

Question

What is an (a) overfit model? (b) underfit model?

Answered: 1 week ago