x=0,1,3,4 o=3,8,18,23 compute f(2) using Lagrange's Interpolation Formula from the following table correct up to 2 decimal places.
Answers
Answer:
Step-by-step explanation:
Most functions cannot be evaluated exactly:
√
x, ex
, ln x, trigonometric functions
since by using a computer we are limited to the use of elementary
arithmetic operations
+, −, ×, ÷
With these operations we can only evaluate polynomials and rational
functions (polynomial divided by polynomials).
4. Interpolation Math 1070
> 4. Interpolation and Approximation
Interpolation
Given points
x0, x1, . . . , xn
and corresponding values
y0, y1, . . . , yn
find a function f(x) such that
f(xi) = yi
, i = 0, . . . , n.
The interpolation function f is usually taken from a restricted class of
functions: polynomials.
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1 Polynomial Interpolation Theory
Interpolation of functions
f(x)
x0, x1, . . . , xn
f(x0), f(x1), . . . , f(xn)
Find a polynomial (or other special function) such that
p(xi) = f(xi), i = 0, . . . , n.
What is the error f(x) = p(x)?
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Linear interpolation
Given two sets of points (x0, y0) and (x1, y1) with x0 6= x1, draw a line
through them, i.e., the graph of the linear polynomial
x0 x1
y0 y1
`(x) = x − x1
x0 − x1
y0 +
x − x0
x1 − x0
y1
`(x) = (x1 − x)y0 + (x − x0)y1
x1 − x0
(5.1)
We say that `(x) interpolates the value yi at the point xi
, i = 0, 1, or
`(xi) = yi
, i = 0, 1
Figure: Linear interpolation
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Example
Let the data points be (1, 1) and (4,2). The polynomial P1(x) is given by
P1(x) = (4 − x) · 1 + (x − 1) · 2
3
(5.2)
The graph y = P1(x) and y =
√
x, from which the data points were taken.
Figure: y =
√
x and its linear interpolating polynomial (5.2)
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Example
Obtain an estimate of e
0.826 using the function values
e
0.82 ·= 2.270500, e0.83 ·= 2.293319
Denote x0 = 0.82, x1 = 0.83. The interpolating polynomial P1(x)
interpolating e
x
at x0 and x1 is
P1(x) = (0.83 − x) · 2.270500 + (x − 0.82) · 2.293319
0.01
(5.3)
and
P1(0.826) = 2.2841914
while the true value s
e
0.826 ·= 2.2841638
to eight significant digits.
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
Assume three data points (x0, y0),(x1, y1),(x2, y2), with x0, x1, x2 distinct.
We construct the quadratic polynomial passing through these points using
Lagrange’s folmula
P2(x) = y0L0(x) + y1L1(x) + y2L2(x) (5.4)
with Lagrange interpolation basis functions for quadratic interpolating
polynomial
L0(x) = (x−x1)(x−x2)
(x0−x1)(x0−x2)
L1(x) = (x−x0)(x−x2)
(x1−x0)(x1−x2)
L2(x) = (x−x0)(x−x1)
(x2−x0)(x2−x1)
(5.5)
Each Li(x) has degree 2 ⇒ P2(x) has degree ≤ 2. Moreover
Li(xj ) = 0, j 6= i
Li(xi) = 1 for 0 ≤ i, j ≤ 2 i.e., Li(xj ) = δi,j =
1, i = j
0, i 6= j
the Kronecker delta function.
P2(x) interpolates the data
P2(x) = yi
, i=0,1,2
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
Example
Construct P2(x) for the data points (0, −1),(1, −1),(2, 7). Then
P2(x)= (x−1)(x−2)
2
· (−1)+ x(x−2)
−1
· (−1)+ x(x−1)
2
· 7 (5.6)
Figure: The quadratic interpolating polynomial (5.6)
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
With linear interpolation: obvious that there is only one straight line
passing through two given data points.
With three data points: only one quadratic interpolating polynomial
whose graph passes through the points.
Indeed: assume ∃Q2(x), deg(Q2) ≤ 2 passing through
(xi
, yi), i = 0, 1, 2, then it is equal to P2(x). The polynomial
R(x) = P2(x) − Q2(x)
has deg(R) ≤ 2 and
R(xi) = P2(xi) − Q2(xi) = yi − yi = 0, for i = 0, 1, 2
So R(x) is a polynomial of degree ≤ 2 with three roots ⇒ R(x) ≡ 0
4. Interpolation M
Answer:
Not sure about this answer
Step-by-step explanation:
Answer
5.0/5
0
pratyushsharma697
Ace
541 answers
49.5K people helped
Answer:
Step-by-step explanation:
Most functions cannot be evaluated exactly:
√
x, ex
, ln x, trigonometric functions
since by using a computer we are limited to the use of elementary
arithmetic operations
+, −, ×, ÷
With these operations we can only evaluate polynomials and rational
functions (polynomial divided by polynomials).
4. Interpolation Math 1070
> 4. Interpolation and Approximation
Interpolation
Given points
x0, x1, . . . , xn
and corresponding values
y0, y1, . . . , yn
find a function f(x) such that
f(xi) = yi
, i = 0, . . . , n.
The interpolation function f is usually taken from a restricted class of
functions: polynomials.
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1 Polynomial Interpolation Theory
Interpolation of functions
f(x)
x0, x1, . . . , xn
f(x0), f(x1), . . . , f(xn)
Find a polynomial (or other special function) such that
p(xi) = f(xi), i = 0, . . . , n.
What is the error f(x) = p(x)?
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Linear interpolation
Given two sets of points (x0, y0) and (x1, y1) with x0 6= x1, draw a line
through them, i.e., the graph of the linear polynomial
x0 x1
y0 y1
`(x) = x − x1
x0 − x1
y0 +
x − x0
x1 − x0
y1
`(x) = (x1 − x)y0 + (x − x0)y1
x1 − x0
(5.1)
We say that `(x) interpolates the value yi at the point xi
, i = 0, 1, or
`(xi) = yi
, i = 0, 1
Figure: Linear interpolation
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Example
Let the data points be (1, 1) and (4,2). The polynomial P1(x) is given by
P1(x) = (4 − x) · 1 + (x − 1) · 2
3
(5.2)
The graph y = P1(x) and y =
√
x, from which the data points were taken.
Figure: y =
√
x and its linear interpolating polynomial (5.2)
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.1 Linear interpolation
Example
Obtain an estimate of e
0.826 using the function values
e
0.82 ·= 2.270500, e0.83 ·= 2.293319
Denote x0 = 0.82, x1 = 0.83. The interpolating polynomial P1(x)
interpolating e
x
at x0 and x1 is
P1(x) = (0.83 − x) · 2.270500 + (x − 0.82) · 2.293319
0.01
(5.3)
and
P1(0.826) = 2.2841914
while the true value s
e
0.826 ·= 2.2841638
to eight significant digits.
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
Assume three data points (x0, y0),(x1, y1),(x2, y2), with x0, x1, x2 distinct.
We construct the quadratic polynomial passing through these points using
Lagrange’s folmula
P2(x) = y0L0(x) + y1L1(x) + y2L2(x) (5.4)
with Lagrange interpolation basis functions for quadratic interpolating
polynomial
L0(x) = (x−x1)(x−x2)
(x0−x1)(x0−x2)
L1(x) = (x−x0)(x−x2)
(x1−x0)(x1−x2)
L2(x) = (x−x0)(x−x1)
(x2−x0)(x2−x1)
(5.5)
Each Li(x) has degree 2 ⇒ P2(x) has degree ≤ 2. Moreover
Li(xj ) = 0, j 6= i
Li(xi) = 1 for 0 ≤ i, j ≤ 2 i.e., Li(xj ) = δi,j =
1, i = j
0, i 6= j
the Kronecker delta function.
P2(x) interpolates the data
P2(x) = yi
, i=0,1,2
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
Example
Construct P2(x) for the data points (0, −1),(1, −1),(2, 7). Then
P2(x)= (x−1)(x−2)
2
· (−1)+ x(x−2)
−1
· (−1)+ x(x−1)
2
· 7 (5.6)
Figure: The quadratic interpolating polynomial (5.6)
4. Interpolation Math 1070
> 4. Interpolation and Approximation > 4.1.2 Quadratic Interpolation
With linear interpolation: obvious that there is only one straight line
passing through two given data points.
With three data points: only one quadratic interpolating polynomial
whose graph passes through the points.
Indeed: assume ∃Q2(x), deg(Q2) ≤ 2 passing through
(xi
, yi), i = 0, 1, 2, then it is equal to P2(x). The polynomial
R(x) = P2(x) − Q2(x)
has deg(R) ≤ 2 and
R(xi) = P2(xi) − Q2(xi) = yi − yi = 0, for i = 0, 1, 2
So R(x) is a polynomial of degree ≤ 2 with three roots ⇒ R(x) ≡ 0
4. Interpolation M