Integrating gamma_incomplete



Hi Dieter,

I came up with this gm.mac file.

/* gm.mac */
matchdeclare([a,s],freeof(x),x,true,[m,n],nonnegintegerp)$
block(
	[simp:false],
	tellsimp('integrate(gamma_incomplete(s, a*x^n), x),x*gamma_incomplete(s, a*x^n) - (x*gamma_incomplete(1/n + s, 
a*x^n))/(a*x^n)^(1/n)),
	tellsimp('integrate(gamma_incomplete(s, a*x^n)*x^m, x),x*gamma_incomplete(s, a*x^n)*x^m/(m+1)
	- (x*gamma_incomplete((m+1)/n + s, a*x^n))/((m+1)*a^(m+1)*(x^n)^(1/n)))
)$
remove([a,s,x,m,n],matchdeclare)$
declare(integrate,linear);
assume(x>0);
/* eof */

If you load this then you can do any (repeated any number of times or just once) integral of x^n*gamma_incomplete(s, 
b*x^m) where n and m are nonnegative integers and b is positive.  I personally don't know if x<0 has meaning or 
usefulness in the applications.  So this is good enough for me.  It would be nice if Maxima could do this without this 
file.  I verified the results with diff and they seem to be right.

HTH,

Rich


--------------------------------------------------
From: "Dieter Kaiser" <drdieterkaiser at web.de>
Sent: Saturday, March 06, 2010 7:49 AM
To: "Richard Hennessy" <rich.hennessy at verizon.net>
Cc: "Maxima List" <maxima at math.utexas.edu>
Subject: Re: [Maxima] Integrating gamma_incomplete

> Am Freitag, den 05.03.2010, 22:07 -0500 schrieb Richard Hennessy:
>> I noticed Maxima can only integrate gamma_incomplete a couple times.
>> Mathematica can do it as many times as you want.  Is this a weakness
>> in integrate()?
>
> Maxima can only integrate the direct function gamma_incomplete, but not
> the case when a power is involved. Therefore, we get:
>
> (%i2) integrate(gamma_incomplete(a,x),x);
> (%o2) gamma_incomplete(a,x)*x-gamma_incomplete(a+1,x)
>
> We get a noun form, when we repeat the integration:
>
> (%i3) integrate(%,x);
> (%o3) 'integrate(gamma_incomplete(a,x)*x,x)
>       -gamma_incomplete(a+1,x)*x+gamma_incomplete(a+2,x)
>
> I have already proposed an extension on the mailing list
> http://www.math.utexas.edu/pipermail/maxima/2010/020534.html to add the
> integrals of the type x^v*gamma_incomplete(a,x). With this extension we
> will get:
>
> (%i5) integrate(gamma_incomplete(a,x),x);
> (%o5) gamma_incomplete(a,x)*x-gamma_incomplete(a+1,x)
>
> (%i6) integrate(%,x);
> (%o6) (gamma_incomplete(a,x)*x^2-gamma_incomplete(a+2,x))/2
>       -gamma_incomplete(a+1,x)*x+gamma_incomplete(a+2,x)
>
> (%i7) integrate(%,x);
> (%o7) ((gamma_incomplete(a,x)*x^3-gamma_incomplete(a+3,x))/3
>       -gamma_incomplete(a+2,x)*x+gamma_incomplete(a+3,x))
>       /2
>       -(gamma_incomplete(a+1,x)*x^2-gamma_incomplete(a+3,x))/2
>       +gamma_incomplete(a+2,x)*x-gamma_incomplete(a+3,x)
>
> All integrals are solved by Maxima.
>
> Dieter Kaiser
>
>
>