Code on Python The following data are given: x= [1, 3, 5, 7]; y=[ln (1), In (3), In (5), In (7)] 1. a) Write the python program to interpolate the above data using the Newton's divide- difference method. b) Print out the divide difference cofficients. c) Estimate the logarithm of 2. Print out the true value, interpolating value and the true relative error in %. d) Show on a graph the true function ln(x), interpolating polynomial and data points.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.1: Assignment Operations
Problem 11E: (Debug) Determine and correct the errors in the following programs....
icon
Related questions
icon
Concept explainers
Question
Code on Python
The following data are given:
x= [1, 3, 5, 7]; y=[ln (1), ln (3), ln (5), In (7)]
1. a) Write the python program to interpolate the above data using the Newton's divide-
difference method.
b) Print out the divide difference cofficients.
c) Estimate the logarithm of 2. Print out the true value, interpolating value and the true
relative error in %.
d) Show on a graph the true function In(x), interpolating polynomial and data points.
Transcribed Image Text:Code on Python The following data are given: x= [1, 3, 5, 7]; y=[ln (1), ln (3), ln (5), In (7)] 1. a) Write the python program to interpolate the above data using the Newton's divide- difference method. b) Print out the divide difference cofficients. c) Estimate the logarithm of 2. Print out the true value, interpolating value and the true relative error in %. d) Show on a graph the true function In(x), interpolating polynomial and data points.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning