Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LAGRANGE INTERPOLATION POLYNOMIAL table [ [ Name: , Grade ( 5 ) ] , [ ID Number:, ] , [ Lab Section:, ] ]
LAGRANGE INTERPOLATION POLYNOMIAL
tableName:Grade ID Number:,Lab Section:,
Objectives
Knowing how to perform an interpolation with a Lagrange polynomial.
To understand the MATLAB implementation of the Lagrange Interpolation method.
To study the effect of extrapolation.
Algorithm
Suppose we formulate a linear interpolating polynomial as the weighted average of the two values that we are connecting by a straight line:
where the Ls are the weighting coefficients. It is logical that the first weighting coefficient is the straight line that is equal to at and at :
Similarly, the second coefficient is the straight line that is equal to at and at :
Substituting these coefficients into the first equation yields the straight line that connects the points:
where the nomenclature designates that this is a firstorder polynomial. This equation is referred to as the linear Lagrange interpolating polynomial.
The same strategy can be employed to fit a parabola through three points. For this case three parabolas would be used with each one passing through one of the points and equaling zero at the other two. Their sum would then represent the unique parabola that connects the three points. Such a secondorder Lagrange interpolating polynomial can be written as:
Notice how the first term is equal to at and is equal to zero at and The other terms work in a similar fashion.
Both the first and secondorder versions as well as higherorder Lagrange polynomials can be represented concisely as
where
where the number of data points and I designates the "product of
Practical Work
Preliminary Work to be done before lab session
Use a Lagrange interpolating polynomial to find the solution at based on the following values of xa and ya:
Lab Work
Given the following Algorithm of LAGRANGE Interpolation formula:
Step Start the Program
Step Input number of terms
Step Input the array ax
Step Input the array ay
Step for ;
Step
Step
Step for inr;
Step
Step End Loop
Step
Step End Loop
Step Print Output
Step End Program
Write a well commented MATLAB Program for the given Algorithm
Use your program to find the value of at based on the following values of and ya:
Assume you have the following function Plot the function at :: Then use the Lagrange algorithm to find the values of at the given values of if the given points to be used are:
;
;
Plot the results on the same graph to detect the interpolation and extrapolation from the graph. Hint: Use the command hold on to plot more than one function at the same graph
LAGRANGE INTERPOLATION POLYNOMIAI
tableName:Grade ID Number:,Lab Section:,
Objectives
Knowing how to perform an interpolation with a Lagrange polynomial,
To understand the MATLAB implementation of the Lagrange Interpolation method.
To study the effect of extrapolation.
Algorithm
Supp
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started