" Maple page says:

Ei(a, z) = z^(a-1)*GAMMA(1-a, z)

In FriCAS that would be

Ei(a, z) == z^(a-1)*Gamma(1 - a, z)

I am not sure if Maple is right, example above leads to Gamma(0, x)
which is undefined."

But the help page 
https://www.maplesoft.com/support/help/maple/view.aspx?path=Ei  says

"with the exception of the point 0 in the case of 
Ei1(z)."

Ok, so the bottom line is that Fricas does not have a builtin function for 
the two argument version
for exponential integral function that sagemath can translate the call to.

In this case, for now, I will remove these problems (135 in total from this 
particular Rubi test file), because now
Fricas fails all of them since sagemath is assuming Fricas has the two 
argument version.

--Nasser


On Tuesday, April 9, 2024 at 11:30:13 PM UTC-5 Waldek Hebisch wrote:

> On Tue, Apr 09, 2024 at 08:24:35PM -0700, 'Nasser M. Abbasi' via FriCAS - 
> computer algebra system wrote:
> > I found problem integrating many problems using sagemath calling Fricas 
> to 
> > do the integration when using exponential integral function. These are 
> > problems from Rubi test files.
> > 
> > It works OK with other CAS systems supported by sagemath (Maxima and 
> GIAC) 
> > but sagemath 10.3 does not seem to correctly translate the call to 
> Fricas.
> > 
> > I am having hard time finding what the exponential integral function is 
> > called before I ask at sagemath forum. I looked at the Fricas book and 
> do 
> > not see anything,. I tried Ei but this does not work. (i.e. does not 
> give 
> > same answer as other cas systems).
>
> Well, 'Ei' is "true exponential integral". Other systems ofer you
> variants, in FriCAS it is just 'Ei'. Some variants are equivalent
> to incomplete gamma function, in such case FriCAS gives you
> incomplete gamma.
>
> > First here is a link to the special function I am taking about
> > 
> > https://reference.wolfram.com/language/ref/ExpIntegralE.html
> > 
> > https://www.maplesoft.com/support/help/maple/view.aspx?path=Ei
> > 
> > Here is a test to what values it should give for some random input. In 
> > Mathematica it gives 
> > 
> > ExpIntegralE[3, 5.0]
> > .000877801
> > 
> > In Maple
> > 
> > Ei(3,5.0)
> > 0.0008778008928
> > 
> > IN sagemath 10.3
> > 
> > sage: exp_integral_e(3,5.0)
> > 0.000877800892770638
> > 
> > But I tried Ei(3,5.0) in Fricas and it gives error.
>
> 'Ei' takes a single argument. If you need relations between various
> functions look into Abramowitz and Stegun, FriCAS Ei is exactly as
> defined in Abramowitz and Stegun.
>
> > 
> > Here is an example, using sagemath trying to integrate. It works OK with 
> > maxima and giac but gives error with Fricas. I am using 
> > 
> > >fricas --version
> > FriCAS 1.3.10
> > based on sbcl 2.3.11
> > 
> > with sagemath 
> > >sage --version
> > SageMath version 10.3, Release Date: 2024-03-19
> > 
> > Starting sagemath and typing:
> > 
> > sage: var('x a b')
> > (x, a, b)
> > 
> > sage: integrate(exp_integral_e(1,b*x),x,algorithm="giac")
> > integrate(exp_integral_e(1, b*x), x)
> > 
> > sage: integrate(exp_integral_e(1,b*x),x,algorithm="maxima")
> > -exp_integral_e(2, b*x)/b
> > 
> > sage: integrate(exp_integral_e(1,b*x),x,algorithm="fricas")
> > RuntimeError Traceback (most recent call last)
> > TypeError: An error occurred when FriCAS evaluated 
> > 'exp_integral_e(((1)::EXPR INT),(b)*(x))':
> > There are no library operations named exp_integral_e
> > 
> > So clearly sagemath did not translate the exp_integral_e to Fricas 
> > correctly.
> > 
> > What should the translation look like?
>
> Maple page says:
>
> Ei(a, z) = z^(a-1)*GAMMA(1-a, z)
>
> In FriCAS that would be
>
> Ei(a, z) == z^(a-1)*Gamma(1 - a, z)
>
> I am not sure if Maple is right, example above leads to Gamma(0, x)
> which is undefined.
>
> -- 
> Waldek Hebisch
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/e461b761-03fc-4a35-8317-f53672edebd9n%40googlegroups.com.
  • [fricas-devel] wha... 'Nasser M. Abbasi' via FriCAS - computer algebra system
    • Re: [fricas-d... Waldek Hebisch
      • Re: [fric... 'Nasser M. Abbasi' via FriCAS - computer algebra system
        • Re: [... 'Martin R' via FriCAS - computer algebra system
          • R... 'Nasser M. Abbasi' via FriCAS - computer algebra system
    • Re: [fricas-d... James Cloos

Reply via email to