_Maxim_

729 Reputation

12 Badges

8 years, 359 days

MaplePrimes Activity


These are questions asked by _Maxim_

Possibly related to this. One has to remember that the result of convert/MeijerG for sin(z) is actually csgn(z)*sin(z):

convert(sin(z), MeijerG, include = all);
         sqrt(Pi)*MeijerG([[], []], [[1/2], [0]], (1/4)*z^2)

simplify(%);
         csgn(z)*sin(z)

That is the case for some other functions as well. Wouldn't it be better to return csgn(z)*MeijerG? For the sine, the form z*MeijerG is also a possibility. Might help to avoid issues similar to this one:

int(sin(a*x)*MeijerG([[], []], [[0], []], x)/x, x = 0 .. infinity); # incorrect for Re(a)<0
             -arctan(1/a)+(1/2)*Pi

 

deq := FunctionAdvisor(DE, hypergeom([a, b], [c], z))[2, 1];
          diff(f(z), z, z) = ((-a-b-1)*z+c)*(diff(f(z), z))/(z*(z-1))-f(z)*a*b/(z*(z-1))

dsolve(deq, f(z));
Error, (in dsolve) Not an ODE w.r.t. f(z)

Apparently FunctionAdvisor is doing something special for the variable names in order to avoid collisions with user variables, but if I want to use the output programmatically, without copying and pasting it, is there a better way than something like this:

dsolve(subs(op(0, indets(deq)[-1]) = f, deq), f(z));
          f(z) = _C1*hypergeom([a, b], [c], z)+_C2*z^(1-c)*hypergeom([b-c+1, a-c+1], [2-c], z)

 

deq := diff(f(z), z$2)-(2*z^2+z-a-1)/z*diff(f(z), z)-((2*a+4)*z+a+1)/(2*z)*f(z):

DETools:-formal_sol(subs(a = .1, deq), f(z), order = 3)[1];
                        1+.5000000000*z+.6845238095*z^2+O(z^3)

evalf[20](DETools:-formal_sol(subs(a = .1, deq), f(z), order = 3)[1]);
                        1.+.50000000000500000000*z+.68452380953750000000*z^2+O(z^3)

The second output is padded to 20 digits, but only the first 10 digits are correct, apparently taking the cached values from the first computation. I think that's really wrong.

Numerical evaluation of HeunBPrime fails if abs(z)>1:

HeunBPrime(.2, .3, .4, .5, 1.5);
Warning, breaking the computation of HeunBPrime after 20000 terms, the series is not converging
                      9.604689581*10^15896

while this gives the correct value:

subs(z = 1.5, convert(series(HeunBPrime(.2, .3, .4, .5, z), z = 0, 40), polynom));
                          15.37195056

 

1. This seems wrong:

modp1(ConvertIn((x^2+1)^5, x), 2);
Error, modp1: invalid arguments

ConvertIn works for other unexpanded inputs, and the documentation doesn't say that the polynomial should be expanded.

2. It's not clear what the correct way to test for equality is:

p := modp1(Monomial(1, x), 2):
q := modp1(Multiply(p, One(x)), 2):

is(p=q);
Error, (in property/ConvertRelation) invalid terms in sum: modp1(ConvertIn(x, x), 2)

evalb(p = q);
                              true

There is no Equal function, and IsZero(Subtract(p, q)) is rather clumsy.

3. In the documentation, with "Display Examples with 2D math input" checked, the second input looks like this:

a := (x^4-x^2+2) mod p

which doesn't make any sense.

4. In a 2D Input cell, using a label to refer to a previous output which is zppoly gives an error:

Error, '_Inert_ZPPOLY' is not a valid inert form

The same label in a 1D Input cell works.

5. It's not quite consistent that sometimes one-argument modp1(zppoly) works -- because zppoly stores the modulus -- but sometimes it doesn't:

modp1(IsZero(Subtract(p, q)));
Error, modp1: invalid arguments to function Subtract

6. There is no documentation for modp1/Embed.

1 2 3 4 5 6 7 Last Page 3 of 14