sage: f(x,y) = (x^2-y^2)/(x^2+y^2)^2
sage: integrate(integrate(abs(f(x,y)), x, 0, 1), y, 0, 1) -1/4*pi
sage: integrate(integrate(abs(f(x,y)), x, 0, 1,
algorithm='sympy'), y, 0, 1, algorithm='sympy')
+Infinity
There is still a lot of room for improvement. SymPy could be tried first
when integrating expressions containing an absolute value, for one. We
already _fall back_ to giac/sympy if maxima throws an error; but when it
simply returns garbage, the problem goes unnoticed.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/4a61a913-8e06-1247-63d4-4113ebaa870e%40orlitzky.com.
b)
sage: dgamma(x, a, b)=x^(a-1)*(1-x)^(b-1)/beta(a, b)
sage: with assuming(a>0, b>0): dgamma(x, a, b).integrate(x,0,1)
1
This is quasi-immediate. And of course so is :
sage: with assuming(a>0, b>0): dgamma(x, a+1, b+1).integrate(x,0,1)
1
But
sage: with assuming(a>0, b>0): dgamma(x, a+1, b+1).integrate(x,0,1, algorithm=”sympy”)
gamma(a + 1)hypergeometric((-b, a + 1), (a + 2,), 1)/(beta(a + 1, b + 1)gamma(a + 2))
This is slow ; furthermore, simplifying this expression to 1 isn't trivialin `sage`, the best way being `sympy.simplify`... Worse :
sage: with assuming(a>0, b>0): dgamma(x, a, b).integrate(x,0,1, algorithm=”sympy”)
```
never returns…
I wouldn’t (currently) switch default-to-maxima for default-to-sympy…
HTH,