updating version
[sympy.git] / examples / vandermonde.py
blob215098d699d54adea5d7cb74f7c705781808e543
1 import sys
2 sys.path.append("..")
3 from sympy import sqrt, symbols, eye
5 w, x, y, z = symbols("wxyz")
6 L = [x,y,z]
7 V = eye(len(L))
8 for i in range(len(L)):
9 for j in range(len(L)):
10 V[i,j] = L[i]**j
11 det = 1
12 for i in range(len(L)):
13 det *= L[i]-L[i-1]
15 print "matrix"
16 print V
17 print "det:"
18 print V.det().expand()
19 print "correct result"
20 print det
21 print det.expand()