Concept explainers
The objective of this problem is to compare second-order accurate forward, backward, and centered finite-difference approximations of the first derivative of a function to the actual value of the derivative. This will be done for
(a) Use calculus to determine the correct value of the derivative at
(b) To evaluate the centered finite-difference approximations, start with. Thus, for the first evaluation, the x values for the
(c) Repeat part (b) for the second-order forward and backward differences. (Note that these can be done at the same time that the centered difference is computed in the loop.)
(d) Plot the results of (b) and (c) versus x. Include the exact result on the plot for comparison.
Want to see the full answer?
Check out a sample textbook solutionChapter 23 Solutions
Numerical Methods for Engineers
Additional Math Textbook Solutions
Precalculus: A Unit Circle Approach (3rd Edition)
College Algebra Essentials (5th Edition)
Calculus for Business, Economics, Life Sciences, and Social Sciences (14th Edition)
College Algebra (7th Edition)
Probability And Statistical Inference (10th Edition)
APPLIED STAT.IN BUS.+ECONOMICS
- 1.3. The dots of Output 2 lie in pairs. Why? What property of esin(x) gives rise to this behavior?arrow_forward1.6. By manipulating Taylor series, determine the constant C for an error expansion of (1.3) of the form wj−u' (xj) ~ Ch¼u (5) (x;), where u (5) denotes the fifth derivative. Based on this value of C and on the formula for u(5) (x) with u(x) = esin(x), determine the leading term in the expansion for w; - u'(x;) for u(x) = esin(x). (You will have to find maxε[-T,T] |u(5) (x)| numerically.) Modify Program 1 so that it plots the dashed line corresponding to this leading term rather than just N-4. This adjusted dashed line should fit the data almost perfectly. Plot the difference between the two on a log-log scale and verify that it shrinks at the rate O(h6).arrow_forwardDefine sinc(x) = sin(x)/x, except with the singularity removed. Differentiate sinc(x) once and twice.arrow_forward
- 1.4. Run Program 1 to N = 216 instead of 212. What happens to the plot of error vs. N? Why? Use the MATLAB commands tic and toc to generate a plot of approximately how the computation time depends on N. Is the dependence linear, quadratic, or cubic?arrow_forwardShow that the function f(x) = sin(x)/x has a removable singularity. What are the left and right handed limits?arrow_forward18.9. Let denote the boundary of the rectangle whose vertices are -2-2i, 2-21, 2+i and -2+i in the positive direction. Evaluate each of the following integrals: (a). 之一 dz, (b). dz, (b). COS 2 coz dz, dz (z+1) (d). z 2 +2 dz, (e). (c). (2z+1)zdz, z+ 1 (f). £, · [e² sin = + (2² + 3)²] dz. (2+3)2arrow_forward
- 18.10. Let f be analytic inside and on the unit circle 7. Show that, for 0<|z|< 1, f(E) f(E) 2πif(z) = --- d.arrow_forward18.4. Let f be analytic within and on a positively oriented closed contoury, and the point zo is not on y. Show that L f(z) (-20)2 dz = '(2) dz. 2-20arrow_forward18.9. Let denote the boundary of the rectangle whose vertices are -2-2i, 2-21,2+i and -2+i in the positive direction. Evaluate each of the following integrals: (a). rdz, (b). dz (b). COS 2 coz dz, (z+1) (d). 之一 z 2 +2 dz, (e). dz (c). (2z + 1)2dz, (2z+1) 1 (f). £, · [e² sin = + (2² + 3)²] dz. z (22+3)2arrow_forward
- 18.8. (a). Let be the contour z = e-≤0≤ traversed in the า -dz = 2xi. positive direction. Show that, for any real constant a, Lex dzarrow_forwardf(z) 18.7. Let f(z) = (e² + e³)/2. Evaluate dz, where y is any simple closed curve enclosing 0.arrow_forward18. If m n compute the gcd (a² + 1, a² + 1) in terms of a. [Hint: Let A„ = a² + 1 and show that A„|(Am - 2) if m > n.]arrow_forward
- Trigonometry (MindTap Course List)TrigonometryISBN:9781337278461Author:Ron LarsonPublisher:Cengage LearningCollege AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning
- Algebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning