The code I have written to integrate is giving wrong results.I get the c_0,c_1,...c_4 to be zeros! What am I doing wrong? I am using simply 0.7.6 on a mac.
from numpy import *
from matplotlib.pyplot import *
from sympy import *
x = Symbol('x')
f = 1.0*sin(np.pi * x)
phi_0 = 1.0
phi_1 = 1.0*x
phi_2 = 1./2*(3*x**2-1)
phi_3 = 1./2*(5*x**3-3*x)
phi_4 = 1./8*(35*x**4-30*x**2+3)
c_0 = integrate(f*phi_0, (x, -1.0, 1.0))
c_1 = integrate(f*phi_1, (x, -1.0, 1.0))
c_2 = integrate(f*phi_2, (x, -1.0, 1.0))
c_3 = integrate(f*phi_3, (x, -1.0, 1.0))
c_4 = integrate(f*phi_4, (x, -1.0, 1.0))
print c_0
print c_1
print c_2
print c_3
print c_4