Comment #1 on issue 1304 by akshaysrinivasan: Integrate sqrt(x**2 + y**2)  
fails
http://code.google.com/p/sympy/issues/detail?id=1304

I traced this problem into heurisch(). Here's are the lines where it goes  
wrong:

g=(x**2+y**2)**1/2
.....
elif g.is_Pow: ##Line 186
     if g.exp.is_Rational and g.exp.q == 2:
         M = g.base.match(a*x**2 + b)
        if M is not None and M[b].is_positive:
             if M[a].is_positive:

M[b].is_positive returns a AttributeError. The documentation mentions that  
by default
a symbol is assumed to be Real, but trying
>>> x.is_Real
False

This IMHO can be fixed by adding a statement which checks if b is positive.

In any case, shouldn't the solution be valid even for negative values of b?





--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to