Home Online Manual
Top
Back: uressolve
Forward: var
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.160 vandermonde

Syntax:
vandermonde ( ideal_expression, ideal_expression, int_expression )
Type:
poly
Purpose:
vandermonde(p,v,d) computes the (unique) polynomial of degree d with prescribed values v[1],...,v[N] at the points p$^0,\dots,$ p$^{N-1}$, N=(d+1)$^n$, $n$ the number of ring variables.

The returned polynomial is $\sum
c_{\alpha_1\ldots\alpha_n}\cdot x_1^{\alpha_1} \cdot \dots \cdot
x_n^{\alpha_n}$, where the coefficients $c_{\alpha_1\ldots\alpha_n}$ are the solution of the (transposed) Vandermonde system of linear equations

\begin{displaymath}\sum_{\alpha_1+\ldots+\alpha_n\leq d} c_{\alpha_1\ldots\alpha...
...\tt p}_n^{(k-1)\alpha_n} =
{\tt v}[k], \quad k=1,\dots,{\tt N}.\end{displaymath}

Note:
the ground field has to be the field of rational numbers. Moreover, ncols(p)==$n$, the number of variables in the basering, and all the given generators have to be numbers different from 0,1 or -1. Finally, ncols(v)==(d+1)$^n$, and all given generators have to be numbers.
Example:
 
ring r=0,(x,y),dp;
// determine f with deg(f)=2 and with given values v of f
// at 9 points: (2,3)^0=(1,1),...,(2,3)^8=(2^8,3^8)
// valuation point: (2,3)
ideal p=2,3;
ideal v=1,2,3,4,5,6,7,8,9;
poly ip=vandermonde(p,v,2);
ip[1..5];  //  the 5 first terms of ip:
==> -1/9797760x2y2-595/85536x2y+55/396576xy2+935/384x2-1309/3240xy
// compute value of ip at the point 2^8,3^8, result must be 9
subst(subst(ip,x,2^8),y,3^8);
==> 9