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 18, Problem 22P

A useful application of Lagrange interpolation is called a table look-up. As the name implies, this involves “looking-up” an intermediate value from a table. To develop such an algorithm, the table of x and f ( x ) values are first stored in a pair of one-dimensional arrays. These values are then passed to a function along with the x value you wish to evaluate. The function then performs two tasks. First, it loops down through the table until it finds the interval within which the unknown lies. Then it applies a technique like Lagrange interpolation to determine the proper f ( x ) value. Develop such a function using a cubic Lagrange polynomial to perform the interpolation. For intermediate intervals, this is a nice choice because the unknown will be located in the interval in the middle of the four points necessary to generate the cubic. For the first and last intervals, use a quadratic Lagrange polynomial. Also have your code detect when the user requests a value outside the range of x's. For such cases, the function should display an error message. Test your program for f ( x ) = ln x using data from x = 1 , 2 , ... , 10 .

Blurred answer

Chapter 18 Solutions

Numerical Methods for Engineers

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.
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
College Algebra
Algebra
ISBN:9781938168383
Author:Jay Abramson
Publisher:OpenStax
Text book image
Glencoe Algebra 1, Student Edition, 9780079039897...
Algebra
ISBN:9780079039897
Author:Carter
Publisher:McGraw Hill
Algebraic Complexity with Less Relations; Author: The University of Chicago;https://www.youtube.com/watch?v=ZOKM1JPz650;License: Standard Youtube License
Strassen's Matrix Multiplication - Divide and Conquer - Analysis of Algorithm; Author: Ekeeda;https://www.youtube.com/watch?v=UnpySHwAJsQ;License: Standard YouTube License, CC-BY
Trigonometric Equations with Complex Numbers | Complex Analysis #6; Author: TheMathCoach;https://www.youtube.com/watch?v=zdD8Dab1T2Y;License: Standard YouTube License, CC-BY