From: sitiroy Roy on
Hi,

I am trying to integrate a generalized exponential integral E_nu(z)
where my nu=0.7 and z=-0.5

Can I do it in MATLAB?

or is there any package by which I can do it?

roy
From: Roger Stafford on
"sitiroy Roy" <sitiroy(a)gmail.com> wrote in message <i41dst$2st$1(a)fred.mathworks.com>...
> Hi,
>
> I am trying to integrate a generalized exponential integral E_nu(z)
> where my nu=0.7 and z=-0.5
>
> Can I do it in MATLAB?
>
> or is there any package by which I can do it?
>
> roy
- - - - - - - - -
I believe E_p(x) can be evaluated in terms of the incomplete gamma function and matlab has that function for real values of x.

E_p(x) = int(exp('-x*t)/t^p','t',1,inf)
= x^(p-1)*int('exp(-s)/s^p','s',x,inf)

where the substitution s = x*t is made. This latter integral can be found from matlab's gammainc with the 'upper' option. (Remember, though, that gammainc is normalized.)

It wasn't clear whether you wanted to evaluate E_nu(z) or integrate it. Your use of the letter z suggests you want it with complex values, but the value -0.5 you assigned it is real. I believe matlab's incomplete gamma function can only use real arguments.

Roger Stafford
From: sitiroy Roy on
Hi Roger,

I tried that already, but MATLAB is giving me that in gammainc(1-nu, A), A should be real and non-negative.

A=-0.5 is real but negative, so the ERROR

I just needed to evaluate it. I had a anaother function, whose integral is given in terms of the exponential intergarl.

thanks FOR THE RESPONSE

ROY


Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i41isa$ksb$1(a)fred.mathworks.com>...
> "sitiroy Roy" <sitiroy(a)gmail.com> wrote in message <i41dst$2st$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I am trying to integrate a generalized exponential integral E_nu(z)
> > where my nu=0.7 and z=-0.5
> >
> > Can I do it in MATLAB?
> >
> > or is there any package by which I can do it?
> >
> > roy
> - - - - - - - - -
> I believe E_p(x) can be evaluated in terms of the incomplete gamma function and matlab has that function for real values of x.
>
> E_p(x) = int(exp('-x*t)/t^p','t',1,inf)
> = x^(p-1)*int('exp(-s)/s^p','s',x,inf)
>
> where the substitution s = x*t is made. This latter integral can be found from matlab's gammainc with the 'upper' option. (Remember, though, that gammainc is normalized.)
>
> It wasn't clear whether you wanted to evaluate E_nu(z) or integrate it. Your use of the letter z suggests you want it with complex values, but the value -0.5 you assigned it is real. I believe matlab's incomplete gamma function can only use real arguments.
>
> Roger Stafford