_Maxim_

724 Reputation

12 Badges

9 years, 224 days

MaplePrimes Activity


These are questions asked by _Maxim_

In Maple 2017.2:

solve(x^3+x*a+2 > 0, [a, x]);
           [[a = -3, x < 1, -2 < x], [a = -3, 1 < x]]

solve(x^4+x*a+1 > 0, [a, x]);
Error, (in rootbound) 1st argument must be a polynomial with numeric coefficients

The first one clearly doesn't give the complete set of solutions. It can be made to work by adding conditions on a such as a>0.

I'm not sure if symbolic operations take index=real[i] into account or just silently ignore it:

limit(RootOf(_Z^3+a*_Z+2, index = real[1]), a = -infinity);
                               0

In fact the root grows as sqrt at -infinity.

 

solve(z^(1+I) = 1, z, allsolutions = true);
                      exp((1 + I) Pi _Z1)
getassumptions(_Z1);
                         {_Z1::integer}

Since this is a single-valued power function, there is only a finite number of solutions. evalc correctly gives exp(-2*Pi) for _Z1=-1.

evalf doesn't help here regardless of the level of precision, I think because it always generates a non-zero imaginary part for exp(-(1+I)*Pi):

seq(print(evalf(evalf[d]((exp((-1-I)*Pi))^(1+I)))), d = 10 .. 3010, 300);
                                             -12  
              0.001867442732 - 1.361179007 10    I
                                            -312  
             0.001867442732 - 1.674479874 10     I
                                           -610  
               1.000000000 + 2.386571217 10     I
                                           -910  
               1.000000000 + 8.502509375 10     I
                                            -1212  
             0.001867442732 - 1.646483173 10      I
                                            -1514  
             0.001867442732 - 4.556560265 10      I
                                            -1812  
             0.001867442732 - 1.287611101 10      I
                                            -2112  
             0.001867442732 - 1.072784224 10      I
                                          -2410  
              1.000000000 + 8.162729354 10      I
                                            -2713  
             0.001867442732 - 7.375390371 10      I
                                          -3010  
              1.000000000 + 1.988371005 10      I

Unrelated, but it would be nice to have a simple way to display lists/matrices with specified width and alignment.

 

In my code I'm trying to catch the case when a certain limit doesn't exist:

limit(exp(-I*a*z)/a, a = infinity) assuming Im(z) > 0;
                               0

Doesn't work. Strangely, this works:

limit(exp(-I*a*z)/a, a = infinity) assuming Im(z) > 0, z::complex;
                           undefined

But this again doesn't:

limit(cos(a*z)/a, a = infinity) assuming Im(z) > 0, z::complex;
                               0

(because the limit of cos(a*z) returns -1..1).

So then I decide to check the exponents directly:

is(a*Im(z) > 0) assuming a > 0, Im(z) > 0;
                             false

Doesn't work, even though it works for arbitrary f:

is(a*f(z) > 0) assuming a > 0, f(z) > 0;
                              true

I found a construct that works:

signum(Im(a*z)) assuming a > 0, Im(z) > 0;
                               1

Would it be possible to improve the handling of the assumptions on Re/Im though?

 

singular(csc(z), z);
                          {z = _Z1 Pi}
getassumptions(_Z1);
       {_Z1::(AndProp(integer, RealRange(1, infinity)))}

discont(csc(z), z);
                            {Pi _Z2}
getassumptions(_Z2);
                         {_Z2::integer}

 

I'm not sure why singular adds the condition _Z1>=1.

 

In Maple 2017.2:

if true then print(1);print(2);print(3);print(4);print(5) end if;
                               1
                               3
                               5

 

First 11 12 13 14 Page 13 of 14