You can decide. I don’t particularly care either way on this one.

]]>If you think it should be pretty printed I can add it without any trouble.

]]>For timing, checkout kernprof/line_profiler. It’s pretty awesome. You just decorate the functions you want to profile with @profile (you don’t even have to import this; kernprof injects it into __builtins__), create a script with the problematic code, say problem.py, then run “kernprof.py -l problem.py”. Then run “python -m line_profiler problem.py.lprof”.

I wonder how long it takes Mathematica to compute these integrals. integrate(erf(x)*besselj(0,x)**2/sqrt(x), (x,0,oo)) requires extra time in WolframAlpha, but the 900 ms of your function doesn’t seem to be that slow. Maybe they have very strict time limits (and also, they are computing more than just the symbolic integral).

]]>Actually the wolfram alpha result could reasonably be obtained with the g-function algorithm. Indeed recall that slater-expansion often gives two results, which happen to be analytic continuations of each other. My code returns the simpler one. In this case these are the arcsine function. The other branch is a big mess with eulergammas and branch factors, but if we shop off all constants and are somewhat liberal with the branch factors, we get the wolfram alpha result.

I’ll add investigation of this to my todo-later list.

]]>Anyway, I think it’s good to have them. One positive side effect of your project is the addition of several new symbolic special functions to SymPy.

I’ve already created the release branch, and I think I might create a release candidate tonight, so let me know if I need to backport in any hyperexpand related fixes before the final release.

]]>WolframAlpha gives and Maple gives .

But don’t feel so bad: computing the logarithmic part is one of the hardest parts of the algebraic Risch algorithm.

]]>That’s great.

> By the way, Mateusz said that you should always try to verify your results against Mathematica.

I surely do that with every new and reasonably simple result, certainly if it goes into the tests. Admittedly when I get these horrible expressions I usually make no attempt at ascertening their correctness. Trying to get these into somewhat better shape is on my todo later list, but I don’t yet know where to start working on this (I haven’t investigated it at all so far).

]]>