I tried the integral in Mathematica, which indeed is unable to do it.
Fredrik
Indeed:
In [4]: d = (1+2*x+sqrt(x+log(x))*(1+3*x) +
x**2)/(x*(x+sqrt(x+log(x)))*sqrt(x+log(x)))
In [5]: d
Out[5]:
⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽ 2
1 + 2⋅x + ╲╱ x + log(x) ⋅(1 + 3⋅x) + x
───────────────────────────────────────
⎛ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎞ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
x⋅⎝x + ╲╱ x + log(x) ⎠⋅╲╱ x + log(x)
In [6]: integrate(d, x)
Out[6]:
⎛ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎞ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
2⋅log⎝x + ╲╱ x + log(x) ⎠ + 2⋅╲╱ x + log(x)
Wow. Big credit goes to Mateusz for this.
Ondrej
Indeed. And let's add a test for this.
On the other hand, SymPy is unable to do the integral
x/sqrt(x^4+10x^2-96x-71), also mentioned on the Wikipedia page.
Apparently Axiom (but no other systems) can do it.
Fredrik
http://code.google.com/p/sympy/issues/detail?id=1132
>
> On the other hand, SymPy is unable to do the integral
> x/sqrt(x^4+10x^2-96x-71), also mentioned on the Wikipedia page.
> Apparently Axiom (but no other systems) can do it.
Ondrej
> From http://en.wikipedia.org/wiki/Risch_algorithm, "The following is a
> more complex example, which no software (as of March 2008) is known to
> find an antiderivative for: [..."] But yesterday an anonymous user
> pointed out on the talk page that SymPy is actually able to calculate
> the integral. The user posted the interactive example here:
> http://dpaste.com/81951/
Indeed, interesting example. So we have another place were SymPy is
better than others :)
> On the other hand, SymPy is unable to do the integral
> x/sqrt(x^4+10x^2-96x-71), also mentioned on the Wikipedia page.
> Apparently Axiom (but no other systems) can do it.
Unfortunately heurisch() works poorly with integrals of this kind.
There are specialized algorithms to solve this problem.
It seems that our implementation of heuristic Risch algorithm can
handle really complicated integrals but also fails miserably on
trivial problems, e.g.:
In [16]: integrate(log(x)/x, x)
Out[16]:
⌠
⎮ log(x)
⎮ ────── dx
⎮ x
⌡
Mateusz
2008/10/3 Fredrik Johansson <fredrik....@gmail.com>: