Hi,

I am new in sympy. I would like to calculate the integration of
cos(nx)*cos(mx) on the interval [0,2pi].
I expected the following result : I=0 if n!=m and I!=0 if m=n but the
result is only 0 without distinction between the values of m and n.

I used that piece of code in ipython

from sympy import  *
x=Symbol('x')
n=Symbol('n',integer=True)
m=Symbol('m',integer=True)
f1=cos(n*x)
f2=cos(m*x)
f3=f1*f2
I=integrate(f3,(x,0,2*pi))
pprint(I)
0

Did I do something wrong ? What is the good way to obtain the correct
answer ?

Best Regards,

Régis




-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to