Algorithm for integration of mixed functions

76 views
Skip to first unread message

Tolga Y.

unread,
Feb 19, 2015, 6:43:20 AM2/19/15
to sy...@googlegroups.com
Hello everyone,

this website claims that Sympy is the only CAS known to be able to integrate

f = (x**2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x))))

Can someone tell me, what algorithm is used to integrate f?
(f is not purely transcendental, so I wounder whether the Risch algorithm for mixed functions is implemented or not)

Kalevi Suominen

unread,
Feb 19, 2015, 1:57:53 PM2/19/15
to sy...@googlegroups.com


Sympy currently uses the parallel Risch algorithm for this function.
The full Risch algorithm for functions with nonrational algebraic terms is not implemented.

Aaron Meurer

unread,
Feb 19, 2015, 5:18:25 PM2/19/15
to sy...@googlegroups.com
The algorithm is an implementation of Manual Bronstein's poor man's
integrator (which is, as Kalevi notes, the parallel Risch algorithm).
See http://www-sop.inria.fr/cafe/Manuel.Bronstein/pmint/. If someone
has a copy of Maple, I'd be interested to see if the original pmint
can do this integral. If you want to learn more about the algorithm, I
believe it is very similar to the one described in the last chapter of
his book.

The parallel Risch algorithm can compute algebraic integrals, but it's
somewhat luck based, as the ability to do so depends on how the
algebraic expressions happen to be represented in the system
(algebraic functions don't have unique representations, e.g., sqrt(x)
= x/sqrt(x)). I wouldn't be surprised if SymPy changed the way it
autosimplified x/sqrt(x) if it broke many integrals and made some
other integrals start working. Hence the inability to compute an
answer is far from a proof of nonelementaryness, but answers sometimes
can be found and verified to be correct.

And by the way, the example itself comes from Bronstein's paper,
"Symbolic Integration Tutorial" (or at least I assume it does, unless
Bronstein and Wikipedia both took it from some third source).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/8182f914-e2c1-4f6b-845c-60823a077d0c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Aaron Meurer

unread,
Feb 19, 2015, 5:22:03 PM2/19/15
to sy...@googlegroups.com
Oh, and to answer this, no, neither the pure algebraic case nor the
mixed functions case are implemented (and even the transcendental case
is only partially implemented).

Aaron Meurer

>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/ca0a0bd2-9d47-4233-b552-8a723fe167fc%40googlegroups.com.

Tim Lahey

unread,
Feb 19, 2015, 9:20:29 PM2/19/15
to sy...@googlegroups.com
If I get some time, I'll try pmint in Maple with the integral.

Cheers,

Tim.
> https://groups.google.com/d/msgid/sympy/CAKgW%3D6JeKHZ9Hmyzk%3D-oUUW6nJ6uQWDcnc_DxHfLQxWKOfXZ%3Dw%40mail.gmail.com.

AMiT Kumar

unread,
Feb 19, 2015, 10:30:15 PM2/19/15
to sy...@googlegroups.com

On Friday, February 20, 2015 at 3:48:25 AM UTC+5:30, Aaron Meurer wrote:
 If someone has a copy of Maple, I'd be interested to see if the original pmint
can do this integral.

Maple can't Integrate this, here is the result from Maple 18 :

> int((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x)

int((x^2+2*x+1+(3*x+1)*sqrt(x+ln(x)))/(x*sqrt(x+ln(x))*(x+sqrt(x+ln(x)))), x)



Nor Mathematica 10:

In [6]: Integrate[(x ** 2 + 2*x + 1 + (3*x + 1)*sqrt (x + log (x)))/(x*
    sqrt (x + log (x))*(x + sqrt (x + log (x)))), x]

Out[6]: Integrate[(1 + 2*x + sqrt*(1 + 3*x)*(x + log*x) + x**2)/
    (x*(x + log*x)*(x + sqrt*(x + log*x))), x]/sqrt


AMiT Kumar
3rd Year Undergrad
Delhi Technological University

Vinzent Steinberg

unread,
Feb 21, 2015, 5:07:49 AM2/21/15
to sy...@googlegroups.com
On Friday, February 20, 2015 at 4:30:15 AM UTC+1, AMiT Kumar wrote:

On Friday, February 20, 2015 at 3:48:25 AM UTC+5:30, Aaron Meurer wrote:
 If someone has a copy of Maple, I'd be interested to see if the original pmint
can do this integral.

Maple can't Integrate this, here is the result from Maple 18 :

> int((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x)

int((x^2+2*x+1+(3*x+1)*sqrt(x+ln(x)))/(x*sqrt(x+ln(x))*(x+sqrt(x+ln(x)))), x)


I think what Aaron meant was to try Bronstein's algorithm as implemented in Maple (`pmint`), see [1].

Vinzent


[1] http://www-sop.inria.fr/cafe/Manuel.Bronstein/pmint/
Reply all
Reply to author
Forward
0 new messages