[GiNaC-list] Integration

Chris Dams C.Dams at science.ru.nl
Tue Feb 8 10:07:03 CET 2005


Dear Jason,

On Mon, 7 Feb 2005, Jason Dusek wrote:

> Hi, I read that someone has recently added symbolic integration to
> GiNaC. Can it do this integrand:
>
>     (x - 1)/(x*sqrt(x^3 + 1)
>
> or
>
>     q / ||r|| dV

Being the "someone" that "has recently added symbolic integration to
GiNaC", I can tell you that the first problem cannot be done by GiNaC
currently and probably also not in any near future, unless you want to do
it numerically. The second one can, if you realize that dV is 4*Pi*r^2*dr
if the integrant is spherically symmetric. Let's ask ginsh:

> eval_integ(integral(r,a,b,4*Pi*q*r));
4*(-1/2*a^2+1/2*b^2)*Pi*q

This is because (hint: the manual) only polynomials can be symbolically
integrated. I myself was primarily interested in making series expansions
of expressions containing integrals and also got at some point bored with
typing the more or less same custom integration routine for more or less
every problem I encountered.

> Is it good enough for use, or should I wait a bit?

For the purposes just mentioned it should be fine.

Best wishes,
Chris




More information about the GiNaC-list mailing list