# Algorithm

1 1 β¦ 1
Given π(π1 , π2 ,β¦ , ππ ) = (π1 π2 β¦ ππ )
β¦ β¦ β¦ β¦

Where π
(1βπ)π+π  (π  = 1, π) are the kth roots of q distinct complex numbers ππ β  0 (π = 1, π), that is

π(1βπ)π+1 π = ππ , π‘ = 1, π

π΄π = {ππ πβ1 }π = 1, π; π = 1, π ππΌ

(π = 1, π) as in (1.4)

π§1 π’1
π§ = [β¦],π’ = [β¦]
π§π π’π

Compute π§ π = ππ π’ π , π = 1, π

π§ = π£πππ‘(π), π = π£πππ‘(π) (ππ¦ πππ€π )

Compute π = π΄π π

This means that the product Vu may computed by executing the product π΄π π with a computational cost ππππ€
= 2ππ 2 + 2π 2 π instead of π = 2π2 = 2π 2 π2 . Without considering the lower cost 2π 2 π of the
computation of π§ = π·π’ (generally k<<q), an approximated speed-up factor πΆ/πΆπππ€ = π is obtained.

β6) = (π₯0 . π¦1 ) and (4. (2. (4. Substituting in our π₯ and π¦ values.2) = (π₯1 .12) = (π₯2 . our augmented matrix is 12 1 1 β6 (22 2 1 2 ) 42 4 1 12 Then. Find the interpolating polynomial passing through the three points (1. π₯02 π₯0 1 π2 π¦0 (π₯1 π₯1 1) β ( 1 ) = (π¦1 ) 2 π π₯22 π₯2 1 π0 π¦2 In order to solve the system. Solution : For our polynomial. β6). and solve for the coefficients using Gaussian elimination. the interpolating polynomial is π(π₯) = βπ₯ 2 + 11π₯ β 16 Using Maple . π¦0 ). So.Example of Vandermonde Matrix 1. 1 1 1 β6 1 1 1 β6 1 1 0 10 1 0 0 β1 (4 2 1 2 ) β (0 β2 β3 26 ) β ( 0 2 0 β22) β ( 0 1 0 11 ) 16 4 1 12 0 β12 β15 108 0 0 1 β16 0 0 1 β16 Our coefficients are π2 = β1. π1 = 11 and π0 = β16.2). we can expect degree 2 polynomial. we will use an augmented matrix based on the Vandermonde matrix. using Gaussian elimination.12) using the vandermonde matrix. weβll take (1. (2. π¦2 ) Since we have 3 points.

1).52 β 3.-39). (1.2). Find the polynomial which interpolates the points (2.5. the interpolating polynomial is a cubic of the form π(π₯) = π1 π₯ 3 + π2 π₯ 2 + π3 π₯ + π4 . Using Matlab Algorithm and solution using matlab 3. 36).2). 7)π and therefore the interpolating polynomial is π(π₯) = 0. (3. 6. (3.5π₯ + 7.6).2.5. Because there are three points. 3.3). (5. 36)π . This gives the result π = (0. the interpolating polynomial is a quadratic of the form π(π₯) = π1 π₯ 2 + π2 π₯ + π3 Thus we define the Vandermonde matrix and solve the system ππ = π¦ where π¦ = (β39. (0. β3. Because there are four points. Find the polynomial which interpolates the points (-2.

hewover. Solution : We could approach this equation in one of two ways: first we could interpolate the points (0. we could also interpolate a polynomial of the form π(π₯) = π1 π₯ 2 + π2 π₯ Thus we define the Vandermonde matrix and solve the system ππ = π¦ where π¦ = (4. This gives the result π = (2. 3. 36)π . 3)π . (2.0).12)π . Find an interpolating polynomial. 5. This gives the result π = (2. The voltages associated with various offsets of a device were sampled as (2.4) and (3.4). and therefore the interpolating polynomial is π(π₯) = 2π₯ 2 β 4π₯ 2 + 5π₯ + 3 4.12). β4.12). β2)π and therefore the interpolating polynomial is π(π₯) = 2π₯ 2 β 2π₯ . (3. The device is known to have zero voltage when the offset is zero. 6. Thus we define the Vandermonde matrix and solve the system ππ = π¦ where π¦ = (β39.

(-1.6). Plot the polynomial and the points and comment. 0. Using Matlab 5. 0.2). 3. We may use the vander function as follows : .5. 1. 4. (0.7. (0.5). (2. Use Matlab to find the polynomial which interpolates the points (-3.3.2.5).5.5).

Note that the points look more quadratic in nature than quintic ?in the topic on least squares. we will see how we can fit a quadratic function to this. -0.03525 sin(π₯) + 0.97516π₯ + 0.64266π₯ 2 + 0.2). The quintic polynomial passing through the points specified in this example. Find the interpolating function of the form π(π₯) = π1 sin(π₯) + π2 cos(π₯) Which passes through the points (0. This figure shows the points and the interpolating polynomial.12578π₯ 3 + 0. the interpolating function is π(π₯) = 0.7) and (1.72182 cos(π₯) Using Matlab . the interpolating polynomial is of the form π(π₯) = β0. Therefore. Solution : The genralized Vandermonde matrix may be found using Matlab : Thus.9.03181π₯ 4 β 0. 6.3.25327. 0.

7.0). Find the cubic polynomial whixh interpolates the points (β2. β74).1).7). 4 1 Answer : π(π₯) = 3 π₯ + 3 Using Maple 8. (3.3) and (5. (1. 21). Find the linear polynomial which interpolates the points (2. Answer : π(π₯) = β3π₯ 3 + 2π₯ + 1 . (0.

(0.99000π₯ 4 β 4. 0.1.13341 . (6. Find the cubic polynomial which interpolates the points (1.51).15).35). (2.2).57.5). (4.82168 π₯ 5 β 0. (β1. (2. 14).48945π₯ 2 β 0.54270π₯ 3 + 6.3. Use Matlab to find the polynomial which interpolates the points (1. (β0.7).64121π₯ + 0.11). Using Maple 9.98). 1. 0.2.36. Answer : π(π₯) = 2π₯ + 3 Using Maple 10. β0. (0. 0.33.52) Answer : π(π₯) = 0.

Must the π₯ values be ordered from smallest to largest for the Vandermonde method to work ? (try this in Matlab with one of the examples. it must not.) No. Using Matlab 11. the soultion is still the same. Solution of Question 1 with the x values be ordered from smallest to larger . Because when we try to solve the question 1 using Maple with the x values not be ordered from smallest to largest.

Matlab The vander routine automatically generates a Vandermonde matrix: . For example. while very straight forward for polynomials can also be easily applied to fitting any type of functions. Solution of Question 1 with the x values not be ordered from smallest to larger Application in Engineering The Vandermonde technique. so long as they satisfy some basic conditions. it may be useful to interpolate exponential or sinusoidal functions.

[0.x=0.6. 1.This can be generalized: suppose you wanted to interpolate the function π(π₯) = π1 π βπ₯ + π2 : Maple Finding an interpolating polynomial with Maple may be done with the Polynomial interpolation routine: CurveFitting[PolynomialInterpolation]([[0. [0.4. enter : ?CurveFitting ?CurveFitting. For more help on the CurveFitting package. plot(%.1).3. x). 2. 1.5]].5].7].PolynomialInterpolation .