Calculation issue for LaguerreL in Maple Leaf

105 views Asked by At

I am trying to calculate LaguerreL(n, a x) in Maple but a problem is occurring.

  1. It works for decimals and nor fractions, I think.

    Meaning, it works for LaguerreL(m,n,0.5) and not for LaguerreL(m,n, 1/2).

    Should not it work for both?

  2. Does not calculate value for negative a.

    LaguerreL(3.0, 2.0, 2.0) = -1.33333333333   
    

    But,

    LaguerreL(3.0, -2.0, 2.0) = Float(undefined) + Float (undefined)
    

    However, Laguerre with negative a has a value. It is not undefined.

  3. One needs to specify decimals?

    LaguerreL(3,2,2) = LaguerreL(3,2,2)
    

    But,

    LaguerreL(3.0,2.0,2.0) = -1.33333333333   
    
  4. Is LaguerreL() in Maple any different than LaguerreL[] in Mathematica?

1

There are 1 answers

0
acer On

Question 1:

Is this the same as Question 3?

Question 2:

restart;
ee:=LaguerreL(3, -2, 2);

                   ee := LaguerreL(3, -2, 2)

convert(ee, hypergeom); # weakness (bug reported)

                      LaguerreL(3, -2, 2)

convert(ee, elementary); # weakness (bug reported)

                      LaguerreL(3, -2, 2)

simplify(ee); # weakness (bug reported)

                      LaguerreL(3, -2, 2)

evalf(ee); # bug (bug reported)

             Float(undefined) + Float(undefined) I

Here are a few ways to work around that:

restart;
ee:=LaguerreL(3, -2, 2);

                   ee := LaguerreL(3, -2, 2)

# One way:

# raise the second argument two times
ff:=convert(ee,LaguerreL,"raise b"$2):

lprint(%);
   (1/3)*LaguerreL(3, 2)-(13/12)*LaguerreL(3, 1, 2)
   +(1/2)*LaguerreL(3, 2, 2)

simplify(ff);

                             2
                             -
                             3

convert(ff,elementary);

                             2
                             -
                             3

evalf(ff);

                       0.6666666665

# Related...
ffh:=convert(ff, hypergeom):

lprint(%);
   (1/3)*hypergeom([-3], [1], 2)-(13/3)*hypergeom([-3], [2], 2)
   +5*hypergeom([-3], [3], 2)

convert(ffh,elementary);

                             2
                             -
                             3

simplify(ffh);

                             2
                             -
                             3

evalf(ffh);

                        0.6666666665

# Another (crude) way:
evalf(Limit(LaguerreL(3,a,2), a=-2.0));

                        0.6666666667

# Another (cruder) way
normal(convert(LaguerreL(3,a,2),elementary));

                       1  3   7     1
                       - a  - - a - -
                       6      6     3

eval(%,a=-2.0);

                        0.6666666667

Question 3:

Yes, that's how it works. See also Question 4.

restart;
ee:=LaguerreL(3,2,2);

                   ee := LaguerreL(3, 2, 2)

simplify(ee);

                           -4/3

convert(ee, elementary);

                           -4/3

Question 4:

Compare definitions on their respective online documentation.

https://reference.wolfram.com/language/ref/LaguerreL.html

https://www.maplesoft.com/support/help/maple/view.aspx?path=LaguerreL

On that Mathematica page you will see that the following conversion to elementary functions (in Maple) is done automatically.

restart;
ee:=LaguerreL(2, a, x);

                     ee := LaguerreL(2, a, x)

convert(ee, elementary);

                                                          2
           (1 + a) (a + 2)                (-a - 2) x
           --------------- + (-a - 2) x - -----------
                  2                         2 a + 4

expand(normal(%));

                 2                                2
            1/2 a  + 3/2 a + 1 - x a - 2 x + 1/2 x