You are on page 1of 14

Chapter 4

Polynomial Interpolation

In this chapter, we consider the important problem of approximating a function f (x), whose values at a set of
distinct points x0 , x1 , x2 , . . . , xn are known, by a polynomial P (x) such that P (xi ) = f (xi ), i = 0, 1, 2, . . . , n.
Such a polynomial is known as an interpolating polynomial. An approximation of this function is desirable
if f (x) is difficult to evaluate or manipulate like the error function
! x
2 2
erf(x) = √ e−t dt,
π 0

for example. Note that polynomials are easily evaluated, differentiated or integrated. Another purpose of
such an approximation is that a very long table of function values f (xi ) may be replaced by a short table
and a compact interpolation subroutine.

4.1 Linear Interpolation


Let f (x) be given at two distinct points xi and xi+1 . Now, given f (xi ) = fi and f (xi+1 ) = fi+1 , we wish
to determine the interpolating polynomial P1 (x) of degree 1 (i.e., a straight line) that approximates f (x) on
the interval [xi , xi+1 ].
Let P1 (x) = αx + β. From the conditions P1 (xi ) = fi and P1 (xi+1 ) = fi+1 we obtain the two equations

αxi + β = fi
αxi+1 + β = fi+1 ,

i.e., " #" # " #


xi 1 α fi
= .
xi+1 1 β fi+1
This system is clearly nonsingular since xi "= xi+1 , and it has a unique solution:

fi+1 − fi fi xi+1 − fi+1 xi


α= β= .
xi+1 − xi xi+1 − xi

Therefore, " #
fi+1 − fi
P1 (x) = fi + (x − xi ).
xi+1 − xi

Example 4.1 Using linear interpolation, approximate sin 6.5◦ from a table which gives
(a) sin 6◦ = 0.10453; sin 7◦ = 0.12187.
(b) sin 0◦ = 0; sin 10◦ = 0.17365.
Chap. 4. Polynomial Interpolation CS414 Class Notes 57

Solution
$ %
(a) P1 (6.5) = 0.10453 + 0.12187−0.10453
7−6 ≈ 0.11320.

(b) P1 (6.5) = 0 + 10 (6.5)


0.17365
≈ 0.11287.
The first answer is correct to 5 decimals whereas the second answer is correct only to 2 decimals! !

Conclusion: Linear interpolation is suitable only over small intervals.

4.2 Polynomial Interpolation


Since linear interpolation is not adequate unless the given points are closely spaced, we consider higher order
interpolating polynomials. Let f (x) be given at the selected sample of (n + 1) points: x0 < x1 < · · · < xn ,
i.e., we have (n + 1) pairs (xi , fi ), i = 0, 1, 2, . . . , n. The objective now is to find the lowest degree polynomial
that passes through this selected sample of points.

f(x)
Pn(x)

f(x)

x0 x1 x2 x3 ... xn

Figure 4.1: Interpolating the function f (x) by a polynomial of degree n, Pn (x).

Consider the nth degree polynomial

Pn (x) = a0 + a1 x + a2 x2 + · · · + an xn .

We wish to determine the coefficients aj , j = 0, 1, . . . , n, such that

Pn (xj ) = f (xj ), j = 0, 1, 2, . . . , n.

These (n + 1) conditions yield the linear system


a0 + a1 x0 + a2 x20 + · · · + an xn0 = f0
a0 + a1 x1 + a2 x21 + · · · + an xn1 = f1
a0 + a1 x2 + a2 x22 + · · · + an xn2 = f2
.. .. .. .. ..
. . . . .
a0 + a1 xn + a2 x2n + · · · + an xnn = fn

or V a = f , where aT = (a0 , a1 , . . . , an ), f T = (f0 , f1 , . . . , fn ), and V is an (n + 1) × (n + 1) matrix given by


 
1 x0 x20 · · · xn0
 1 x1 x21 · · · xn1 
 
 n 
V =  1 x2 x2 · · · x2  .
2
 .. .. .. .. 
 . . . . 
1 xn x2n · · · xnn
Chap. 4. Polynomial Interpolation CS414 Class Notes 58

The matrix V is known as the Vandermonde matrix. It is nonsingular with nonzero determinant
n−1
,
det(V ) = (xi − xj ).
j=0
i>j

For n = 3, for example,

det(V ) = (x1 − x0 )(x2 − x0 )(x3 − x0 )(x2 − x1 )(x3 − x1 )(x3 − x2 )

Hence a can be uniquely determined as a = V −1 f . Another proof of the uniqueness of the interpolating
polynomial can be given as follows.

Theorem 4.1 Uniqueness of interpolating polynomial. Given a set of points x0 < x1 < · · · < xn ,
there exists only one polynomial that interpolates a function at those points.
Proof Let P (x) and Q(x) be two interpolating polynomials of degree at most n, for the same set of points
x0 < x1 < · · · < xn . Also, let
R(x) = P (x) − Q(x).
Then R(x) is also a polynomial of degree at most n. Since

P (xi ) = Q(xi ) = fi ,

we have, R(xi ) = 0 for i = 0, 1, . . . , n. In other words R(x) has (n + 1) roots. From the Fundamental
Theorem of Algebra however, R(x) cannot have more than n roots. A contradiction! Thus, R(x) ≡ 0, and
P (x) ≡ Q(x). !

Example 4.2 Given the following table for the function f (x), obtain the lowest degree interpolating
polynomial.

xk –1 2 4
fk –1 –4 4

Solution Since the number of nodes = 3 = n + 1, therefore n = 2. Let

P2 (x) = a0 + a1 x + a2 x2 ,

that satisfies the following conditions at the points x0 = 1; x1 = 2, x2 = 4:

P (−1) = −1; P (2) = −4; P (4) = 4.


    
1 −1 1 a0 −1
 1 2 4   a1  =  −4  .
1 4 16 a2 4
Using Gaussian elimination with partial pivoting, we compute the solution
   
a0 −4
a =  a1  =  −2  ,
a2 1

Therefore, the interpolating polynomial is given by

P2 (x) = −4 − 2x + x2 .

We can use this approximation to estimate the root of f (x) that lies in the interval [2, 4]:

2 + 4 + 16 √
γ= = 1 + 5.
2
Chap. 4. Polynomial Interpolation CS414 Class Notes 59

!
An important remark is in order. One, in general, should not determine the interpolating polynomial by
solving the Vandermonde linear system. These systems are surprisingly ill-conditioned for n no larger than
10. For example, for 0 < x0 < x1 < · · · < xn = 1 uniformly distributed in [0,1], large n yields a Vandermonde
matrix with almost linearly dependent columns, and the Vandermonde system becomes almost singular.
A more satisfactory form of the interpolating polynomial is due to Lagrange,

Pn (x) = f (x0 )L0 (x) + f (x1 )L1 (x) + · · · + f (xn )Ln (x).

Here Lj (x), for 0 ≤ j ≤ n, are polynomials of degree n called fundamental polynomials or Lagrange polyno-
mials. From the (n + 1) conditions

Pn (xi ) = f (xi ), 0 ≤ i ≤ n,

we see that -
0 i "= j
Lj (xi ) =
1 i=j
The above property is certainly satisfied if we choose

(x − x0 )(x − x1 ) · · · (x − xj−1 )(x − xj+1 ) · · · (x − xn )


Lj (x) =
(xj − x0 )(xj − x1 ) · · · (xj − xj−1 )(xj − xj+1 ) · · · (xj − xn )

i.e.,
,n
(x − xi )
Lj (x) = .
i=0
(xj − xi )
i#=j

The fact that Lj (x) is unique follows from the uniqueness of the interpolation polynomial.
Recall that there is one and only one polynomial of degree n or less that interpolates f (x) at the (n + 1)
nodes x0 < x1 < · · · < xn . Thus, for this given set of nodes, both forms yield the same polynomial!

Vandermonde Approach.
n
.
Pn (x) = ai xi Va=f
i=0

Operation count: It can be shown that the Vandermonde system V a = f can be solved in O(n 2 ) arithmetic
operations rather than O(n3 ) operations because of the special form of the Vandermonde matrix.

Lagrange Approach.
n  
,
n n  (x − xi )  n
. .  i=0  .
Pn (x) = fj Lj (x) = gj  =
 (x − xj )  gj · νj
j=0 j=0   j=0

where
f (xj )
gj = n .
,
(xj − xi )
i=0
i#=j

Operation count: The Lagrange form avoids solving the ill-conditioned Vandermonde linear, systems, and
evaluates the polynomials
,n
1
νj = (x − xi )
(x − xj ) i=0
Chap. 4. Polynomial Interpolation CS414 Class Notes 60

for a given x. The cost of these operations for each j = 0, 1, 2, . . . , n are:


n
,
u(x) = (x − xi ) → (2n + 1) ops
i=0
u(x)
νj = → (n + 1) ops
(x − xj )
fj
gj = n → 2n(n + 1) ops (evaluated once only)
,
(xj − xi )
i=0
i#=j

Now, the cost for evaluating the polynomial


n
.
Pn (x) = gj νj → (2n + 1) ops
j=0

Therefore, the total number of operations are 5n + 3 once gj ’s are evaluated.

4.3 Error in Polynomial Interpolation


Let en (x) be the error in polynomial interpolation given by

en (x) = f (x) − Pn (x).

Since Pn (xi ) = f (xi ), we have


en (xi ) = 0 x0 < x1 < · · · < xn .
In other words en (x) is a function with at least (n + 1) roots. Hence, we can write

f(x)
Pn(x)

f(x)

x0 x1 x2 x3 ... xn

Figure 4.2: Computing the error in polynomial interpolation.

en (x) = (x − x0 )(x − x1 ) · · · (x − xn )h(x) = π(x) · h(x)

where h(x) is a function of x. Let us define

g(z) = en (z) − π(z)h(x)

where x "= xj , for 0 ≤ j ≤ n. Thus,

g(x) = 0,
g(xj ) = 0, 0 ≤ j ≤ n,
Chap. 4. Polynomial Interpolation CS414 Class Notes 61

i.e., g(z) has (n+2) distinct roots. Assuming that f (x) has at least n+1 continuous derivatives, the (n+1)th
derivative of g(z), i.e.,
d(n+1)
g(z) ≡ g (n+1) (z)
dz (n+1)
has at least one root x∗ . Hence,

x0 x2 x4
g(z)
x1 x3

g! ( z )

g!! ( z )

g!!! ( z )

iv
g (z)
x*

Figure 4.3: The (n + 1)th derivative of a function g(x) with n + 2 roots (n = 3) must have at least one root.

g (n+1) (z) = e(n+1)


n (z) − h(x)π (n+1) (z),

where π (n+1) (z) = (n + 1)! Moreover, since en (z) = f (z) − Pn (z), therefore,

e(n+1)
n (z) = f (n+1) (z) − Pn(n+1) (z)
(n+1)
in which the last term Pn (z) is zero. Using the above equations, we have

g (n+1) (z) = f (n+1) (z) − h(x)(n + 1)!

We had shown earlier that g (n+1) (z) has at least one root x∗ in the interval containing x and xj , j = 0, . . . , n.
This implies that g (n+1) (x∗ ) = 0, and therefore,

f (n+1) (x∗ )
h(x) =
(n + 1)!

Consequently, we have the following representation of the error in polynomial interpolation

f (n+1) (x∗ )
en (x) = f (x) − Pn (x) = (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!
where x∗ is in the interval containing x and xj , j = 0, . . . , n.
Chap. 4. Polynomial Interpolation CS414 Class Notes 62

Example 4.3 Obtain the Lagrange interpolating polynomial from the data

π 1 π 3 π
sin 0 = 0, sin = , sin = , sin = 1,
6 2 3 2 2
and use it to evaluate sin 12
π
and sin π4
Solution The interpolating polynomial is given by

P3 (x) = f0 L0 (x) + f1 L1 (x) + f2 L2 (x) + f3 L3 (x)



1 3
= L1 (x) + L2 (x) + L3 (x)
2 2
At x = 12 ,
π
$ π % 5 π − 06 5 π − π 6 5 π − π 6 15
L1 = 512π 6 512 36 5 12 26
=
12 6 − 0 π
6 − π
3
π
6 − π
2
16
$π% 5 6 5 6 5 6
π
− 0 12 π
−π π −π 5
L2 = 512π 6 5 π π66 5 π12 π 26 = −
12 3 −0 3 − 6 3 − 2
16
$ π % 5 π − 06 5 π − π 6 5 π − π 6 1
L3 = 512π 6 512 66 5 12 36
=
12 2 −0
π π
2 − 6
π π
2 − 3
16
Therefore, $π%
P3= 0.26062.
12
Since sin 12
π
= 0.25882, we have |error| = 0.0018.
At x = π4 , $π % $π % $π%
L1 = 0.5625, L2 = 0.5625, L3 = 0.0625.
4 4 4
Therefore $π %
P3 = 0.70589.
4
Since sin π4 = 0.70711, we have |error| = 0.00122.
Let us estimate the error en (x) at x = π4 :
$π % $π %$π π % $ π π % $ π π % f (4) (x∗ )
e3 = −0 − − −
4 4 4 6 4 3 4 2 4!
Since f (x) = sin x; f (4) (x) = sin x, and thus,

|f (4) (x)| ≤ 1.

Therefore, 7 $ π %7 π π π π 1
7 7
7e3 7≤ · · · · = 1.76 × 10−3 .
4 4 12 12 4 4!
Similarly, en (x) at x = π
12 is bounded by
7 $ π %7 π π π 5π 1
7 7
7e3 7≤ · · · · = 2.94 × 10−3 .
12 12 12 4 12 4!
!
Chap. 4. Polynomial Interpolation CS414 Class Notes 63

4.4 Runge’s Function and Equidistant Interpolation


In this section, we discuss a problem that arises when one constructs a global interpolation polynomial on a
fairly large number of equally spaced nodes. Consider the problem of approximating the following function
on the interval [−1, 1]
1
f (x) =
1 + 25x2
using the interpolation polynomial Pn (x) on the equidistant nodes

2j
xj = −1 + , j = 0, 1, . . . , n.
n
Figure ?? shows how the polynomials P4 (x), P8 (x), P12 (x), and P16 (x) approximate f (x) on [−1, 1]. We see
n= 4 n= 8
1 1

0.8
0.8

0.6

0.6
0.4

0.2
0.4

0.2
−0.2

−0.4
0

−0.6

−0.2
−0.8

−0.4 −1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

n = 12 n = 16
1 2

0.5 0

0
−2

−0.5

−4
−1

−1.5 −6

−2
−8

−2.5
−10
−3

−12
−3.5

−4 −14
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

Figure 4.4: Equal spaced interpolation of Runge’s function.

that as n increases, the interpolation error in the central portion of the interval diminishes, while increasing
rapidly near the ends of the interval. Such behavior is typical in equidistant interpolation with polynomials
of high degree. This is known as Runge’s phenomenon, and the function f (x) is known as Runge’s function.
If the (n + 1) interpolation nodes are not chosen equally spaced, but rather placed near the ends of the
interval at the roots of the so called Chebyshev polynomial of degree (n + 1), the problem with Runge’s
function disappears (see Fig. ??). The roots of the Chebyshev polynomial of degree (n + 1) are given by
" #
k + 21
xk = − cos π , k = 0, 1, . . . , n.
n+1
Chap. 4. Polynomial Interpolation CS414 Class Notes 64

n= 4 n= 8
1.2 1.2

1 1

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0

−0.2 −0.2
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
n = 12 n = 16
1 1

0.9 0.9

0.8 0.8

0.7 0.7

0.6 0.6

0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0 0
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

Figure 4.5: Chebyshev interpolation of Runge’s function.

4.5 The Newton Representation


The Lagrange form for the interpolating polynomial is not suitable for practical computations. The Newton
form of the interpolating polynomial proves to be much more convenient. Let us obtain a different form of
the lowest degree interpolating polynomial at the distinct interpolation nodes given by

x0 < x1 < x2 < · · · < xn−1

where f (xj ) = fj , j = 0, 1, . . . , n − 1. Let the interpolating polynomial be

Pn (x) = c0 + c1 (x − x0 ) + c2 (x − x0 )(x − x1 ) +
c3 (x − x0 )(x − x1 )(x − x2 ) + · · · +
cn (x − x0 )(x − x1 ) · · · (x − xn−1 ).

Using the n conditions


Pn (xj ) = fj , j = 0, 1, . . . , n − 1,
we can construct a system of equations in the unknown cj . For n = 3, for example, this yields a system of
linear equations of the form Lc = f , where L is given by,
 
1 0 0 0
 1 (x1 − x0 ) 0 0 
L=  1 (x2 − x0 ) (x2 − x0 )(x2 − x1 )
.
0 
1 (x3 − x0 ) (x3 − x0 )(x3 − x1 ) (x3 − x0 )(x3 − x1 )(x3 − x2 )
Chap. 4. Polynomial Interpolation CS414 Class Notes 65

Note that the evaluation of L for n nodes requires O(n2 ) arithmetic operations. Assuming that the nodes
are equidistant, i.e., xi+1 − xi = h, the system Lc = f is given by
    
1 0 0 0 c0 f0
 1 h 0 0     f1 
   c1  =  .
 1 2h 2h2 0   c2   f2 
1 3h 6h2 6h3 c3 f3

Step 1.

c0 = f0
(1)
f1 = (f1 − f0 )/h
(1)
f2 = (f2 − f0 )/2h
(1)
f3 = (f3 − f0 )/3h.

Then we have the system order 3:


    (1) 
1 0 0 c1 f
 1     1(1) 
h 0 c2 =  f2  .
1 2h 2h2 c3 f3
(1)

Step 2.
(1)
c1 = f1
(2) (1) (1)
f2 = (f2 − f1 )/h
(2) (1) (1)
f3 = (f3 − f1 )/2h

Then we get the system of order 2:


" #" # 8 9
(2)
1 0 c2 f2
= .
1 h c3 (2)
f3

Step 3.
(2)
c2 = f2
(3) (2) (2)
f3 = (f3 − f2 )/h

Step 4.
(3)
c3 = f 3

MATLAB
function c = InterpolateNewton(x,f)
% x: interpolating nodes
% f: function values at x
% c: coef. of Newton’s form of interpolating polynomial
n = length(x);
for k = 1:n-1
f(k+1:n) = (f(k+1:n)-f(k))./(x(k+1:n)-x(k));
end
c = y;
Chap. 4. Polynomial Interpolation CS414 Class Notes 66

4.6 Spline Interpolation


Draftsmen used to draw smooth curves through data points by using splines. These are thin flexible strips of
plastic or wood which were laid on paper and held with weights so as to pass through the required data points
(or nodes). The weights are constructed in such a way that the spline is free to slip. As a result, the flexible
spline straightens out as much as it can subject to passing over these points. Theory of elasticity suggests




x1 x2 x3 x4

Figure 4.6: Spline interpolation.

that this mechanical spline is given by a cubic polynomial (degree 3 polynomial) in each subinterval [xi , xi+1 ],
i = 1, 2, . . . , n − 1, with adjacent cubics joint continuously with continuous first and second derivatives. Let

s(x) = a0 + a1 x + a2 x2 + a3 x3 ,

be the form of each cubic spline. Since we have (n − 1) subintervals [xi , xi+1 ], 1 ≤ i ≤ n − 1, then we have
4(n − 1) unknowns; (4 parameters for each subinterval: x0 ,a1 ,a2 , and a3 ). Suppose si (x) denotes the cubic
spline the ith interval. The conditions to be satisfied by these cubic splines are:
1. Continuity at each interior node:

si−1 (xi ) = si (xi ), i = 2, 3, . . . , n − 1.

2. Continuity of first derivative at each interior node:

s%i−1 (xi ) = s%i (xi ), i = 2, 3, . . . , n − 1.

3. Continuity of second derivative at each interior node:

s%%i−1 (xi ) = s%%i (xi ), i = 2, 3, . . . , n − 1.

4. Interpolation of function at each node:

s(xj ) = f (xj ), j = 1, 2, . . . , n.

These provide 3(n − 2) + n = 4n − 6 conditions; however, in order to completely specify the cubic splines,
we still need 2 additional conditions. These are conditions specified at the end points x1 and xn . For the
“mechanical” or “natural” spline we set

s%% (x1 ) = s%% (xn ) = 0.


Chap. 4. Polynomial Interpolation CS414 Class Notes 67

Let the nodes xj , j = 1, 2, . . . , n, be equidistant, i.e.,

xj+1 − xj = h

and let,
1 %%
σj = s (xj )
6
i.e.,
s%%i−1 (xi ) = s%%i (xi ) = 6σi
for all i satisfying condition ??. Since

s(x) = a0 + a1 x + a2 x2 + a3 x3 ,

we have

s% (x) = a1 + 2a2 x + 3a3 x2


s%% (x) = 2a2 + 6a3 x,

i.e., s%% (x) is a straight line. Thus, s%%i (x) takes the following form (see Fig. ??):

xi+1 − x (x − xi )
s%%i (x) = (6σi ) + (6σi+1 ), i = 1, 2, . . . , n − 1.
h h

s'' i ( x ) 6σi+1

6σi

xi x xi+1

Figure 4.7: Computing spline within an interval.

Integrating once, we have

−6σi (xi+1 − x)2 6σi+1 (x − xi )2


s%i (x) = · + · + β1
h 2 h 2
and integrating once more, we have
σi σi+1
si (x) = (xi+1 − x)3 + (x − xi )3 + β1 x + β2
h h
where β1 and β2 are constants. Clearly we can write si (x) as follows,
σi σi+1
si (x) = (xi+1 − x)3 + (x − xi )3 + γ1 (x − xi ) + γ2 (xi+1 − x).
h h
Using conditions ?? and ??,

si (xi ) = fi ⇒ fi = σi h2 + γ2 h
si (xi+1 ) = fi+1 ⇒ fi+1 = σi+1 h2 + γ1 h
Chap. 4. Polynomial Interpolation CS414 Class Notes 68

Therefore,
fi+1
γ1 = − σi+1 h,
h
fi
γ2 = − σi h,
h
and
" #
σi σi+1 fi+1
si (x) = (xi+1 − x) +
3
(x − xi ) +
3
− σi+1 h (x − xi )
h h h
" #
fi
+ − σi h (xi+1 − x)
h
" #
−3σi 3σi+1 fi+1
s%i (x) = (xi+1 − x) +
2
(x − xi ) +
2
− σi+1 h
h h h
" #
fi
− − σi h .
h
Using condition ??, i.e., s%i (xi ) = s%i−1 (xi ), we get
" # " #
fi+1 − fi fi − fi−1
−3σi h + − h(σi+1 − σi ) = 3σi h + − h(σi − σi−1 )
h h
or
∆i − ∆i−1
σi+1 + 4σi + σi−1 = i = 2, 3, . . . , n − 1,
h
where
fi+1 − fi
∆i = .
h
Using the additional conditions σ1 = σn = 0, we have
4σ2 + σ3 = (∆2 − ∆1 )/h
σi−1 + 4σi + σi+1 = (∆i − ∆i−1 )/h i = 3, 4, . . . , n − 2
σn−2 + 4σn−1 = (∆n−1 − ∆n−2 )/h.
Now, assigning
∆j − ∆j−1 fj+1 − 2fj + fj−1
gj = = ,
h h2
we have the linear system
    
4 1 σ2 g2
 1 4 1  σ3   g3 
    
 .. .. ..  ..   .. 
 . . .  . = . .
    
 1 4 1   σn−2   gn−2 
1 4 σn−1 gn−1
The tridiagonal system above, denoted by [1, 4, 1], may be factored as follows:
  µ 1

1 1
 λ1 1  µ 2 1 
  ..


 λ2 1  .
  µ3 
 . .. . ..  
  ..
.


1
λn−3 1 µn−2
The following conditions must be satisfied:
µ1 = 4, λi µi = 1, λi + µi+1 = 4
The algorithm for computing L
$ and U is given below.
Chap. 4. Polynomial Interpolation CS414 Class Notes 69

Triangular decomposition for system [1,4,1]


µ1 = 4
for i = 1, 2, . . . , n − 3
λi = µ−1
i
µi+1 = 4 − λi
end;

Once L
$ and U are obtained, the above system is solved as shown in Chapter ??.

You might also like