Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do all parts in Python 3. Interpolation (a) Write a program to read in a two column table from a file and per- form

image text in transcribedimage text in transcribedPlease do all parts in Python

3. Interpolation (a) Write a program to read in a two column table from a file and per- form linear interpolation at an arbitrary point. You may assume that the data is evenly spaced in the independent variable (this makes it easier to determine which points to use for interpolation). (b) Use the program on the following input data: y -1. 0.03846154 -0.5 0.13793103 0. 1. 0.5 0.13793103 1. 0.03846154 and provide a linear estimate of y at x = 0.75. (c) Write a program using Nevilles algorithm to fit a 4th order poly- nomial to the above data and provide an estimate of y at x = 0.75. (See notes on Neville's algorithm, Ch3 in Numerical Recipes book, or e.g. Wikepedia for help.) a 1 = (d) The actual function tabulated above is y (1+25x2): Compare the actual value at x = : 0.75 with the linear interpolation and the 4th order polynomial interpolation, and comment on why one is more accurate than the other. While polynomial interpolation is a reasonable way to proceed when there are a limited number of points as above, when there are a large number of points it can have strange behavior (especially at the end points, called Runge's phenomenon'. As a result, the most popular way to interpolate is with cubic splines

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago