>
> One small appendix, maxima 5.30 does quite well for this example too:
>
> (%i3) integrate(cosh(a*x^2+c)/x, x);
> 2 c 2 - c
> - gamma_incomplete(0, - a x ) %e - gamma_incomplete(0, a x ) %e
> (%o3) -------------------------------------------------------------------
> 4
It is relatively easy to fool Maxima:
(%i58)
integrate(((2*a*x^3+2*a*x^2)*sinh(a*x^2+c)+(x^2+x+1)*cosh(a*x^2+c))/(x^3+2*x^2+x),
x);
2
/ c 2 c c c a x
[ (2 a %e x + (3 a %e + %e ) x + a %e ) %e
(%o58) I ----------------------------------------------- dx
] 4 3 2
/ 2 a x + 6 a x + 6 a x + 2 a x
2
/ 2 - a x
[ (2 a x + (3 a - 1) x + a) %e
+ I ------------------------------------------------ dx
] c 4 c 3 c 2 c
/ 2 a %e x + 6 a %e x + 6 a %e x + 2 a %e x
2 2
2 c 2 c 2 c a x - a x
(2 a %e x + 2 a %e + %e ) %e + (2 a x + 2 a - 1) %e
+ ---------------------------------------------------------------------
c 2 c c
4 a %e x + 8 a %e x + 4 a %e
In FriCAS:
(9) ->
integrate(((2*a*x^3+2*a*x^2)*sinh(a*x^2+c)+(x^2+x+1)*cosh(a*x^2+c))/(x^3+2*x^2+x),
x)
(9)
2 2 2
((x + 1)Ei(a x ) + (- x - 1)Ei(- a x ))sinh(c) + 4cosh(a x + c)
+
2 2
((x + 1)Ei(a x ) + (x + 1)Ei(- a x ))cosh(c)
/
4x + 4
Type: Union(Expression(Integer),...)
As you see I just added an elementary term (which Maxima can handle alone!)
and got function unitegrable by Maxima.
> Oh, and maxima can do the cos case:
>
> (%i13) integrate(cos(a*x^5+c)/x, x);
> 5
> (%o13) ((%i expintegral_e(1, %i (a x + c) - %i c)
> 5
> - %i expintegral_e(1, %i c - %i (a x + c))) sin(c)
> 5
> + (- expintegral_e(1, %i (a x + c) - %i c)
> 5
> - expintegral_e(1, %i c - %i (a x + c))) cos(c))/10
>
In FriCAS:
(12) -> integrate(cos(a*x^5+c)/x + exp(x), x)
5 x 5 5
- 2Si(a x )sin(c) + 10%e + (Ci(a x ) + Ci(- a x ))cos(c)
(12) ---------------------------------------------------------
10
Type: Union(Expression(Integer),...)
ATM I have to add extra exp term to trigger use of the new routine.
>
> Don't ask me by which algorithm ...
>
AFAIK what Maxima is doing is mostly smoke and mirrors. More precisely,
they have routine which matches single term to various special
functions. Something like our pattern matcher, but much bigger
and smarter. But in order to handle integrals having many terms
they need to split them. Maxima integrator uses rather simple
minded tactic, basicaly it seem to split according to plus/minus
signs in expression. In simple cases it works very well.
I was amazed to see Maxima doing some complicated example.
But then I realized that spliting at powers reduced it to
sum of terms which were not hard to do separately. After
shift such naive splitting did no longer work and Maxima
failed.
BTW: I recently noticed that Maxima fails on relatively simple
elementary functions:
(%i62) integrate((x^3-x^2-3*x+1)*exp(1/(x^2-1))/(x^3-x^2-x+1), x);
1
------
2
/ 3 2 x - 1
[ (x - x - 3 x + 1) %e
(%o62) I ---------------------------- dx
] 3 2
/ x - x - x + 1
In FriCAS:
(14) -> integrate((x^3-x^2-3*x+1)*exp(1/(x^2-1))/(x^3-x^2-x+1), x)
1
------
2
x - 1
(14) (x + 1)%e
Type: Union(Expression(Integer),...)
This clearly shows that Maxima has nothing like modern "Risch"
algorithm (the example is one of the simplest possible examples
of SPDE algorithm due to Rothstein).
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.