The problem with this method is that looking at all combinations
becomes *very* inefficient for Muls with many terms. For example:
In [41]: %timeit integrate2(diff(x*sqrt(sin(x))), x)
1
2
1
2
1
2
1
2
1 loops, best of 3: 5.2 s per loop
At the end of the day, you'll get even worse performance than the
currently used heurisch, with a much lower success rate. That isn't
to say that it isn't possible to make it more efficient, though.
For computing symbolic integration by parts, I think some logic in the
ODE module can be used, in particular, the exact ODE solver. For
example:
In [34]: print dsolve(diff(f(x)*x), simplify=False, hint='1st_exact')
x*f(x) == C1
It's possible to recognize exact equations of any order, though
solvers for them have not been implemented yet. But in general, if
you are trying to integrate an expression with a symbolic f(x),
converting it to a problem for dsolve() will give you better luck than
integrate() (but of course, we really should "integrate" the two).
Aaron Meurer
On Thu, Jul 12, 2012 at 5:05 PM, pallab <
palla...@gmail.com> wrote:
> <code>
> <\code>
>
>
> On Wednesday, July 11, 2012 1:23:01 PM UTC-4, pallab wrote:
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/sympy/-/kqWwCQXDF1YJ.
>
> To post to this group, send email to
sy...@googlegroups.com.
> To unsubscribe from this group, send email to
>
sympy+un...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/sympy?hl=en.