0% found this document useful (0 votes)
137 views5 pages

Lab 9: Interpolation: Using The Polynomial Interpolation

This document discusses polynomial interpolation and interpolation by specifying the degree of a function in Mathematica. It provides the commands for each type of interpolation and illustrates them using examples. Polynomial interpolation uses InterpolatingPolynomial to find a smooth function that passes through all data points. Specifying the degree interpolation works between data points using Interpolation and specifying the interpolation order. The document shows how to interpolate data, plot the results, and use interpolation to find function values at new points.

Uploaded by

nidhalsaada
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views5 pages

Lab 9: Interpolation: Using The Polynomial Interpolation

This document discusses polynomial interpolation and interpolation by specifying the degree of a function in Mathematica. It provides the commands for each type of interpolation and illustrates them using examples. Polynomial interpolation uses InterpolatingPolynomial to find a smooth function that passes through all data points. Specifying the degree interpolation works between data points using Interpolation and specifying the interpolation order. The document shows how to interpolate data, plot the results, and use interpolation to find function values at new points.

Uploaded by

nidhalsaada
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Lab 9: Interpolation

Objective: to find a function that satisfy all the data points


Procedure: We have two types of interpolation in mathematica:
1- Polynomial interpolation which give us a smooth function that pass through all
data points. This type of interpolation can be done using this command:
(InterpolatingPolynomial[data1,x])
2- Interpolation by specifying the degree of the function. This type of
interpolation works between data points. This type of interpolation can be
done using this command:
(f3=Interpolation[data3,InterpolationOrdern])where
nistheorderofthepolynomialrequired
The procedure for each built-in function is illustrated using the following examples.
Example :Interpolate the following data:
data1={{1,1},{2,4},{3,7},{4,4},{5,1},{6,4},{7,9},{8,4}}

Using the polynomial interpolation


Step by step solution:
Step 1:First try to plot the data to see the trend of this data as follows:

This is the command of


plotting data. Notes the
capital letter at the
beginning

Step 2:Interpolat this data using the InterpolatingPolynomial command as


follows:

This is the
InterpolatingPolynomial

command. Notes the


capital letters

Notes here the curve


pass all the points in a
smooth manner

Using the interpolation


Step 1:Name your data with any name and then use the interpolation command as
follows:

The
interpolation
command
This is the order
of the function
between points
( the default is

Step 2:plot the interpolation , data points and the polynomialinterpolation curves to
see the difference between all curves as follows:

Interpolatingpolynomi
al curve

Interpolation
curve

This is the way to get a


value of the function at
any point

Applications: F(x ,y) is given below for x = 0.1,...,0.6 and y = 1.2, 1.4, 1.6:
x y 1.2 y 1.4 y 1.6
0.1
29
30
31
0.2
57
59
60
0.3
83
86
87
0.4
106
109
111
0.5
126
130
132
0.6
143
147
150

Use Interpolation command to find f(0.33,1.33)

You might also like