Sie sind auf Seite 1von 8

Multiple-Choice Test

Lagrange Method
Interpolation
COMPLETE SOLUTION SET
1. Given n+1 data pairs, a unique polynomial of degree ______________ passes through the
n  1 data points.
(A) n  1
(B) n
(C) n or less
(D) n  1 or less

Solution
The correct answer is (C).

A unique polynomial of degree n or less passes through n  1 data points. Assume two
polynomials Pn  x  and Qn  x  go through n  1 data points,
x0 , y 0 , x1 , y1 ,, xn , y n 
Then
Rn  x   Pn  x   Qn x 
Since Pn  x  and Qn  x  pass through all the n  1 data points,
Pn  xi   Qn  xi , i  0,  , n
Hence
Rn  xi   Pn ( xi )  Qn  xi   0, i  0,  , n
The nth order polynomial Rn  x  has n  1 zeros. A polynomial of order n can have n  1 zeros
only if it is identical to a zero polynomial, that is,
Rn  x   0
Hence
Pn  x   Qn  x 
How can one show that if a second order polynomial has three zeros, then it is zero everywhere?
If R2  x   a 0  a1 x  a 2 x 2 , then if it has three zeros at x1 , x 2 , and x3 , then
R2  x1   a 0  a1 x1  a 2 x12  0
R2  x 2   a 0  a1 x 2  a 2 x 22  0
R2  x3   a 0  a1 x3  a 2 x32  0
Which in matrix form gives
1 x1 x12   a 0  0
 
1 x 2 x 22   a1   0
1 x3 x32  a 2  0

The final solution a1  a 2  a3  0 exists if the coefficient matrix is invertible. The determinant
of the coefficient matrix can be found symbolically with the forward elimination steps of naïve
Gauss elimination to give
1 x1 x12 
 
det 1 x 2 x 22   x 2 x32  x 22 x3  x1 x32  x12 x3  x1 x 22  x12 x 2
1 x3 x32 
 
 ( x1  x 2 )( x 2  x3 )( x3  x1 )
Since
x1  x 2  x3
the determinant is non-zero. Hence, the coefficient matrix is invertible. Therefore,
a1  a 2  a3  0 is the only solution, that is, R2  x   0.
2. Given the two points a, f a , b, f b  , the linear Lagrange polynomial f 1  x  that passes
through these two points is given by
xb xa
(A) f1  x   f a   f b 
a b ab
(B) f 1  x   f a   f b 
x x
ba ba
f b   f a 
(C) f 1 x   f a   b  a 
ba
xb xa
(D) f1  x   f a   f b 
a b ba

Solution
The correct answer is (D).
n
f n ( x)   Li ( x) f ( xi )
i 0
1
f 1 ( x)   Li ( x) f ( xi )
i 0

 L0  x  f  x 0   L1  x  f  x1 
 L0  x  f a   L1  x  f b 

n x  xj
Li ( x)  
j 0 xi  x j
j i
1 x  xj
L0 ( x)  
j 0 x0  x j
j 0

x  x1

x0  x1
xb

ab
1 x  xj
L1 ( x)  
j 0 x1  x j
j 1

x  x0

x1  x0
xa

ba
f1 ( x)  L0  x  f a   L1  x  f b 
x b xa
 f a   f b 
ab ba
3. The Lagrange polynomial that passes through the 3 data points is given by
x 15 18 22
y 24 37 25
f 2  x   L0  x 24  L1  x 37   L2  x 25
The value of L1  x  at x  16 is
(A) –0.071430
(B) 0.50000
(C) 0.57143
(D) 4.3333

Solution
The correct answer is (B).

n xxj
Li ( x )  
j 0 xi  x j
j i

2 xxj
L1 ( x)  
j 0 x1  x j
j 1

 x  x0  x  x2 
   
 x1  x0  x1  x2 
 16  15  16  22 
  
 18  15  18  22 
 1   6 
   
 3   4 
 0.50000
4. The following data of the velocity of a body is given as a function of time.
Time (s) 10 15 18 22 24
Velocity (m/s) 22 24 37 25 123
A quadratic Lagrange interpolant is found using three data points, t  15 , 18 and 22. From
this information, at what of the times given in seconds is the velocity of the body 26 m/s during
the time interval of t  15 to t  22 seconds.
(A) 20.173
(B) 21.858
(C) 21.667
(D) 22.020

Solution
The correct answer is (B).

n
vn (t )   Li (t )v(ti )
i 0

where
t0  15, vt0   24

t1  18, vt1   37

t 2  22, vt 2   25

gives
n t tj
Li (t )  
j 0 ti  t j
j i

2 t tj
L0 (t )  
j 0 t0  t j
j 0

 t  t1  t  t 2 
   
 t 0  t1  t 0  t 2 
2 t tj
L1 (t )  
j 0 t1  t j
j 1

 t  t0  t  t 2 
   
 t1  t 0  t1  t 2 
2 t tj
L2 (t )  
j 0 t2  t j
j2
 t  t0  t  t1 
   
 t2  t0  t 2  t1 
 t  t1  t  t 2   t  t 0  t  t 2   t  t 0  t  t1 
v2 (t )    v(t0 )    v(t1 )    v(t 2 )
 t0  t1  t0  t 2   t1  t 0  t1  t 2   t 2  t 0  t 2  t1 
 t  18  t  22   t  15  t  22   t  15  t  18 
  v(15)    v(18)    v (22)
 15  18  15  22   18  15  18  22   22  15  22  18 
 t  18  t  22   t  15  t  22   t  15  t  18 
26      24      37      25
 15  18  15  22   18  15  18  22   22  15  22  18 
 t  18  t  22   t  15  t  22   t  15  t  18 
26      24      37      25
  3   7   3   4   7  4 
 t 2  40t  396   t 2  37t  330   t 2  33t  270 
26     24     37     25
 21    12   28 
  
26  1.1429t 2  45.714t  452.57   3.0833t 2  114.08t  1017.5 

 0.89286t  29.464t  241.07
2

26  1.0476t  38.905t  323.86
2

0  1.0476t 2  38.905t  349.86


 38.905  38.9052  4  1.0476  349.86
t
2  1.0476
 21.858 and 15.278
5. The path that a robot is following on a x-y plane is found by interpolating four data points as

x 2 4.5 5.5 7
y 7.5 7.5 6 5
y  x   0.15238 x  2.2571x  9.6048 x  3.9000
3 2

The length of the path from x  2 to x  7 is


(A) 7.5  7.52  4.5  22  6  7.52  5.5  4.52  5  62  7  5.52
7
(B) 
2
1  (0.15238 x 3  2.2571x 2  9.6048 x  3.9000) 2 dx
7
(C) 
2
1  (0.45714 x 2  4.5142 x  9.6048) 2 dx
7
(D)  (0.15238 x 3  2.2571x 2  9.6048 x  3.9000)dx
2

Solution
The correct answer is (C).

The length S of the curve y  x  from a to b is given by


2
 dy 
b
S 1    dx
a  dx 
where
a2
b7
giving
2
 dy 
7
S   1    dx
2  dx 
y  x   0.15238 x 3  2.2571x 2  9.6048 x  3.9000
dy
 0.45714 x 2  4.5142 x  9.6048
dx
Thus,

 
7
S   1  0.45714 x 2  4.5142 x  9.6048 dx
2

2
6. The following data of the velocity of a body is given as a function of time.
Time (s) 0 15 18 22 24
Velocity (m/s) 22 24 37 25 123
If you were going to use quadratic interpolation to find the value of the velocity at t  14.9
seconds, what three data points of time would you choose for interpolation?
(A) 0, 15, 18
(B) 15, 18, 22
(C) 0, 15, 22
(D) 0, 18, 24

Solution
The correct answer is (A).

We need to choose the three points closest to t  14.9 s that also bracket t  14.9 s . Although the
data points in choice (B) are closest to 14.9, they do not bracket it. This would be performing
extrapolation, not interpolation. Choices (C) and (D) both bracket t  14.9 s but they are not the
closest three data points.
Time (s) Velocity (m/s) How far is t  14.9 s
0 22 14.9  0  14.9
15 24 14.9  15  0.1
18 37 14.9  18  3.1
22 25 14.9  22  7.1
24 123 14.9  24  9.1

Das könnte Ihnen auch gefallen