computation of an integral    
   How to compute the integral from a>0 to infinity of (x-a)^(-1/2)*x^(-3/4) ?
integrate(1/((x-a)^(1/2)*x^(3/4)),x,a,oo);
leads to : unsigned oo times smaller number not defined
Thanks
FWIW :
sage: var("a")
a
sage: foo=1/((x-a)^(1/2)*x^(3/4))
sage: foo.integrate((x, 0, oo))
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[ Snip... ]
ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(a>0)', see `assume?` for more details)
Is a positive, negative or zero?` arguments fails
Well...
sage: with assuming(real(a)<0): gee=foo.integrate((x, 0, oo)) ; gee
beta(1/4, 1/4)/(-a)^(1/4)
sage: gee.simplify_factorial()
gamma(1/4)^2/(sqrt(pi)*(-a)^(1/4))
Following Sage's suggestion gives us an usable result for a<0 (and fails for a>=0, BTW).
Let's try someting else. Adding algorithm="sympy" to `integrate arguments fails, because the result cannot (yet) be translated back to Sage. Try it manually :
sage: import sympy
sage: sympy.integrate(*map(sympy.sympify, (foo, (x, 0, oo))))
Piecewise((-a*exp(3*I*pi/4)*gamma(1/4)**2/(sqrt(pi)*polar_lift(a)**(5/4)), (Abs(arg(a) + pi) < pi) | (Ne(1/a, 0) & (Abs(arg(a) + pi) < pi) & Ne(Abs(arg(a) + pi), pi))), (Integral(1/(x**(3/4)*sqrt(-a + x)), (x, 0, oo)), True))
which ultimately means $ \frac{a e^{\frac{3 i \pi}{4}} \Gamma^{2}\left(\frac{1}{4}\right)}{\sqrt{\pi} \operatorname{polar_lift}^{\frac{5}{4}}{\left(a \right)}} $ if abs(arg+pi)<pi, the latter reducing to real(a)<0 in I'm not confused.
Sympy fails to simplify the complicated expressions it uses (and cannot be translated to sage). But, FWIW :
sage: foo._mathematica_().Integrate((x, 0, oo))
ConditionalExpression[Gamma[1/4]^2/((-a)^(1/4)*Sqrt[Pi]), Re[a] < 0]
The real situation is therefore a tad moree complex than described.
Sage's can find an explicit form of the integral under a condition which it cannot find.
Sympy cannot find simplified expressions of its solution.
Mathematica agrees with Sage's integratin and seems to agree to Sympy's condition.
HTH,
Asked: 2024-03-21 14:43:55 +0100
Seen: 397 times
Last updated: Mar 22 '24
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
            
Are you using an old version of sage ? On a recent one, the result is
which means that none of our integration engines can find a closed expression.
I am using the online version SageMath 9.1 at http://127.0.0.1:8888/notebooks... The value of the integral is a^(-1/4)*B(1/2,1/4) (with B the beta function, and a>0). The link with the beta function is straightforward by a change of variable.
sage 9.1 is very obsolete, but recent sage cannot do this integral
I may be wrong but it seems Sage 9.1 is the only version available on Jupyter.
Sage 10.3 (just released) runs without problem on Linux and on Windows>=10 nder WSL2. The recommended way to intall it is still compliing the source tarball (or, better, the
gittree), but large progress have been made towards using Conda.