I need help with this question please, I am taking numerical methods course. Problem 4 (25 points)
Fantastic news! We've Found the answer you've been seeking!
Question:
I need help with this question please, I am taking numerical methods course.
Transcribed Image Text:
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) 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)
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
The adjusted trial balance for Sweet Home Catering, Inc., is presented below. Prepare the income statement and statement of retained earnings for Sweet Home Catering, Inc., for the month ended March...
-
A researcher would like to determine whether people really can tell the difference between bottled water and tap water. Participants are asked to taste two unlabeled glasses of water, one bottled and...
-
An object of mass m starts from rest and slides a distance d down a frictionless incline of angle &. While sliding, it contacts an unstressed spring of negligible mass as shown in Figure P8.10. The...
-
As of 2023, 20 countries in Europe had adopted the euro as their common currency. These countries are called the euro zone. According to an article on bloomberg.com, in 2023, the euro-area economy...
-
Company uses a standard cost system and sets predetermined overhead rates on the basis of direct labor-hours. The following data are taken from the companys budget for the current year: The standard...
-
61. The solubility product of CuS, AgS and HgS are 10 37, 104 and 1054 respectively. The solubility of these sulphides will be in the order (1) HgS> AgS > Cus (2) AgS>HgS > CuS (3) CuS AgS > HgS (4)...
-
Outline three (3) observations of the student's learning behaviour and needs that can be used to inform support planning. For each observation, describe what you observed and identify how this...
-
In Problems 23-34, find the value of each annuity at the end of the indicated number of years. Assume that the interest is compounded with the same frequency as the deposits. Amount of Deposit m 29....
-
In Problems 20-52: a. State the type; and \(\mathbf{b}\). Answer the question. What is the monthly payment for a home costing \(\$ 425,000\) with a \(20 \%\) down payment and the balance financed for...
-
Find the monthly payment for the loans in Problems 33-44. Furniture financed at \(\$ 3,456\) for 36 months at \(23 \%\)
-
Use a calculator to evaluate the present value of an annuity formula \[P=m\left[\frac{1-\left(1+\frac{r}{n}ight)^{-n t}}{\frac{r}{n}}ight]\] for the values of the variables \(m, r\), and \(t\)...
-
Find the requested values in Problems 5-10. \(S_{5}\) when \(s_{n}=15-3 n\)
-
A steel cylinder falls through a vertical pipe due to the influence of gravity. The inside surface of the pipe is coated with an oil film. The pipe inner diameter (D) is 100.5 mm. D- Pipe The...
-
When you weigh yourself on good old terra firma (solid ground), your weight is 142 lb. In an elevator your apparent weight is 121 lb. What are the direction and magnitude of the elevator's...
-
During a golf match, a certain number of points are awarded for each eagle and a different number for each birdie. No points are awarded for par, and a certain number of points are deducted for each...
-
Create two row vectors: a = [3 9 -0.5 3 6. 1 5. -0.8 4] b = [12 -0.8 6 2 5 3 -7.4] (a) Use the two vectors in a MATLAB command to create a 3 4 matrix such that the first row consists of elements 3...
-
The vander Waals equation gives a relationship between the pressure p (atm), volume V, (L), and temperature T (K) for a real gas: p = nRT/V n2a/V2 where n is the number of moles, R = 0.08206 (L...
-
On May 8, 1984, Hannah Motsi graduated from Louisiana State University. She set to work opening a coffee shop in Baton Rouge called HannaH and found a perfect location in a new development. Using a...
-
How does the firms WACC (with taxes) change with leverage?
-
Assume that Microsoft has no debt, a total market value of $2 trillion, and a marginal tax rate of 21%. If it permanently changes its leverage from no debt by taking on new debt in the amount of 13%...
Study smarter with the SolutionInn App