This has something to do with simplifications made by sin because m is in 
integer. Rerun the below with m = Symbol('m') instead of m = Symbol('m', 
integer=True).  My computer is in the shop right now, so I cannot verify this 
against Maple.  

Aaron Meurer
On Jan 12, 2010, at 6:42 AM, [email protected] wrote:

> i just found sympy and it looks incredible.
> 
> i have an error, which might be my mistake (either mathematically, or
> programatically) but i am getting unexpected behavoir on an integral.
> 
> here is my code
> 
> x = Symbol('x')
> m = Symbol('m', integer=True)
> 
> g = sin(pi*x/a)
> gg = sin(pi*m*x/a)
> 
> Integral(g*gg,(x,0,a))   # this looks correct
> Integral(g*gg,(x,0,a)).subs({m:1})   # this looks correct
> Integral(g*gg,(x,0,a)).subs({m:1}).doit()     #this looks correct
> Integral(g*gg,(x,0,a)).doit()     # i get 0, why? where did dependence
> on m go?
> -- 
> 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.
> 
> 

-- 
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