acer

30767 Reputation

29 Badges

19 years, 6 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by acer

Has anyone else noticed that Mapleprimes response/loading/refreshing time has become relatively much slower in the past few weeks?

How could one simplify the following expression, preferably over z in large parts of the complex plane, and with few calls under different assumptions, and preferably gracefully.

expr := 2*Pi*(-z)^(1/2)-z^(1/2)*(2*ln(-z^(1/2))-ln(z));

I am curious whether anyone here can come up with a way to simplify the expression x1 to 15*Pi/32 in fewer exact, symbolic steps. The following was performed in Maple 2016.2 for Linux.

restart;

x1 := arcsin(1/2*(2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2));

arcsin((1/2)*(2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2))

x2 := evalc(convert(x1,expln));

arctan((2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2)/(2-(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2))

x3 := convert(x2, expln);

((1/2)*I)*(ln(1-I*(2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2)/(2-(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2))-ln(1+I*(2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2)/(2-(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2)))

# non-Pro wolframalpha can simplify x3 to 15*Pi/32 (but not x2 or x1).
#

x4 := combine(x3);

((1/2)*I)*ln(-(I*2^(1/2)*((2+2^(1/2))*(2+(2+2^(1/2))^(1/2)))^(1/2)+I*(2*2^(1/2)+4)^(1/2)+I*2^(1/2)+(-1+I))/(I*2^(1/2)*((2+2^(1/2))*(2+(2+2^(1/2))^(1/2)))^(1/2)+I*(2*2^(1/2)+4)^(1/2)+I*2^(1/2)+1+I))

x5 := simplify(x4);

((1/2)*I)*(-ln(2)+ln(-(2+(2+2^(1/2))^(1/2))^(1/2)*(I*2^(1/2)*(2+2^(1/2))^(1/2)-I*2^(1/2)+1-I)))

x6 := expand(x5);

-((1/2)*I)*ln(2)+((1/4)*I)*ln(2+(2+2^(1/2))^(1/2))+((1/2)*I)*ln(-I*2^(1/2)*(2+2^(1/2))^(1/2)+I*2^(1/2)+(-1+I))

x7 := combine(x6);

-((1/4)*I)*(ln(-(1/2)*(2+2^(1/2))^(1/2)*(I*2^(1/2)+(-1-I)))+(2*I)*Pi)

simplify(x7,constant);

(15/32)*Pi

# It's a pity that last step worked while this next is inadequate.
simplify(x7);

-((1/4)*I)*ln(-(2+2^(1/2))^(1/2)*(I*2^(1/2)+(-1-I)))+((1/4)*I)*ln(2)+(1/2)*Pi

# Another way, using x7
simplify(evalc(x7));

(15/32)*Pi

# Another way, using x7
simplify(combine(expand(x7)));

(15/32)*Pi

 

Download simplify_example.mw

I'd like to be able to get a quicker low accuracy computation of the argument of the complex-valued JacobiTheta1 function.

I only need as much accuracy as to get a decent plot, which means... I don't know... about 1e-3 relative accuracy?

If I can get a formula or approach that is "evalhf'able" then I can construct a procedure which does this action and writes results inplace to a float[8] Matrix.

The naive approach in the code below takes about 6min...

The code below, which is a PLOT structure, seems to be one of the more efficient forms of specifying individual colors for each point in a 2D point plot.

My central question is: what plotting command will construct this?

PLOT(CURVES(Matrix([seq([i,i],i=0..4)],datatype=float[8])),
     STYLE(POINT), AXESLABELS("", ""), VIEW(0 .. 10, 0 .. 10),
     COLOUR(HSV,
            Array(1..15,[0.0,1,1,0.2,1,1,0.4,1,1,0.6,1,1,0.3,1,1],
                  datatype=float[8])
            )
     );

I know that I can call `plot` and pass the m-by-2 Matrix of point data, and specify style=point. But how can I pass in such a nice, efficient float[8] Array to specify the points' colors? I know that the float[8] Array is leaner than a long sequence of HFloats. But even in the simpler case of just two points: how can one pass the `color` option just once to specify the colors to be used for each of the points?

Oh, in case anyone's interested, another old-fashioned (but terser) was to get such a float[8], C_order Array is with the `hfarray` command.

1 2 3 Page 1 of 3