a0,an,n,bn=var('a0,an,n,bn')
a0=1/(2*pi)*integral(x^2,-pi,pi)
print 'a0=',a0
an=1/(pi)*integral(x^2*cos(n*x),-pi,pi)
print 'an=',an
bn=1/(pi)*integral(x^2*sin(n*x),-pi,pi)
print 'bn=',bn

SageDays/Kreyszig-10-17 (last edited 2010-08-12 11:21:28 by Aashita)