Axel Vogt

5821 Reputation

20 Badges

20 years, 228 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

Why do you fire a whole series of homework questions?

Not clear what you mean, but the "display" command should.

Where it may be a reasonable idea to have some constistent namings,
like P1, P2, ... or plot1, plot2, .... and not to alter that:

you can quickly locate them through searching in the worksheet

and you will have a chance to understand your sheets, if you revisit them 2 or 3 years later

I played a bit in an old Maple, which reports 6 explicite solutions for the term under the sqrt (have not checked them),

may be you check Int ( sqrt( product ) )

I once filed Corless & Jeffrey, Graphing elementary Riemann surfaces and
supposing you want the 'spiral' for the branches here it is (and with a
bit more code one certainly could draw the brunch cuts and the z-planes
to indicate the 'sheets'):

Digits:=14;
w:=u+I*v;
z:=evalc(exp(w));
x:=evalc(Re(z));
y:=evalc(Im(z));

plot3d([x,y,v],
  u=-6 ..1, v = -3*Pi ... 3*Pi,
  labels=["x","y","v"],
  view=[-1..1, -1 .. 1, -3*Pi ... 3*Pi],
  #orientation=[-56,72],
  orientation=[-70,60],
  grid=[80,80],
  axes=frame,
  #style=surface,
  shading=zhue
  #color=u
);

There is some numerical trap for such extreme tasks

Note that your formula for the cdfN is only correct at the left wing

Then (as implicitely said by acer) you need high(er) precision

And finally - since the curve is extremely flat - you may wish to use all possible
strength of fsolve (look up the parameters in the help)

And provide a rough guess for a solution

I do not have Maple at hand now, but take asymptotics, convert to polynom and
solve to have a start value.

Or you can try to solve

 ln( erfc(x/sqrt(2)) ) = ln( y )

 

Edited to give the example:

> Digits:=18;
> 
> erfc(x/sqrt(2)); asympt(%,x, 2): convert(%, polynom);
> y=simplify(%) assuming 0 < x;
> solve(%, x);
> simplify(%) assuming 0 < y; 
> eval(%, y= 1e-18); 
> x0:=evalf(%);
> 
> fsolve(erfc(x/sqrt(2))= 1e-18, x=x0);

            8.83510978817539579

> eval(erfc(x/sqrt(2)), x=%);
> evalf(%);

         .999999999999999835e-18

> erfc(x/sqrt(2))= 1e-20; map(ln, %); fsolve(%, x=0 .. 20);

           9.33604484923406004

> eval(erfc(x/sqrt(2)), x=%);
> evalf(%);

         .999999999999999887e-20

That would be a general problem you would always have to be aware.

For some testing I tried Maple 9.5 on Win 7 (installed as 32 Bit (!!) because of the DLLs) and it seems to work. The only problem I had was saving 'style sheets'.

L:=[1,2,3,4,5];
S:=convert(L, `+`);
f(S);

                               S := 15
                                f(15)


It controls the precision, not the display, from the help: "To specify the numeric precision for an evalf computation ..."

What you want (2 correct leading decimals) can be done like this:

for i from 0 to 4 do  evalf[20](poi(i)*10000); evalf[2](%); print(%);  end do:
                                8000.
                                1800.
                                 200.
                                 15.
                                 0.82


May be that Maple is improved to be more correct?

subs(alpha=1/2, gammadist); 
int(%, x=0..infinity); 
subs(theta=-1, %); 
eval(%);

                             -infinity I

Plot it to check that:

subs(alpha=1/2, gammadist); subs(theta=-1, %);
plot(Im(%), x= 0 .. 6);

                              -I exp(x)
                              ----------
                               1/2   1/2
                              x    Pi

and since exp ---> oo this is correct.
L:=[1,2,3,4,5];
 
seq(L[i], i =3 .. nops(L)); # the seq, except the first 2
L[1], L[2]; # the first 2 
[%%, %]; # put them together and make it a list

                           [3, 4, 5, 1, 2]

For the 2nd question you may wish to state what you want instead of posting the result or code.

The FFT(m,x,y) and iFFT(m,x,y) commands compute in place the fast Fourier transform and the inverse fast Fourier transform of a complex sequence of length 2^m

You use m=0 and thus take only 1 element, no? I think you shuold take m=16 for your example 2^16

Moreover (looking in Maple 9.5) it needs arrays (lower case), not Arrays (upper Case)

 

I'm trying to find the minimum distance between two e'values of an nxn matrix

Then I would do it by sorting (as already discussed), take 1st absolute
differences and sort again. The first element is one minimal solution:


M:=LinearAlgebra[RandomMatrix](3,3,generator=-99..99): # to have an example

V:=convert(M, Vector[row]);
V:=sort(V);

d:=LinearAlgebra[Dimension](V);

f:= (j) -> abs(V[j]-V[j+1]); # you want the minimum, if applied to V
W:=Vector[row](d-1,f);
W:=sort(W);
W[1];


In case used memory is a concern:

While it is easy to re-use W (by using 'map') if the dimension is constant
for V one would have to ponder a bit (but there is some command for a fast
re-arrangement of memory, if I recall correctly).
 

I'm trying to find the minimum distance between two e'values of an nxn matrix

Then I would do it by sorting (as already discussed), take 1st absolute
differences and sort again. The first element is one minimal solution:


M:=LinearAlgebra[RandomMatrix](3,3,generator=-99..99): # to have an example

V:=convert(M, Vector[row]);
V:=sort(V);

d:=LinearAlgebra[Dimension](V);

f:= (j) -> abs(V[j]-V[j+1]); # you want the minimum, if applied to V
W:=Vector[row](d-1,f);
W:=sort(W);
W[1];


In case used memory is a concern:

While it is easy to re-use W (by using 'map') if the dimension is constant
for V one would have to ponder a bit (but there is some command for a fast
re-arrangement of memory, if I recall correctly).
 

A:=Array(1..2, 1..12); #, fill=1);
B:=convert(A, Array,datatype=float[8]);
#convert(B, Array);
C:=map(identify, B);
# show the contents:
convert(A, listlist);
convert(B, listlist);
convert(C, listlist);

I do not know what you mean by sum of Bessel functions or what you expect to see, but for example you can go as follows:

  sin(t);
  convert(%, hypergeom, include=all, only=sin);
  convert(%, Bessel);

which expresses sin as BesselJ(1/2,t)*sqrt(t*Pi/2)

Perhaps the following is your desired monster:

  myExpr:=sin(c + I * (sin (d + k * sin(t))));
  convert(myExpr, hypergeom, include=all, only=sin);
  convert(%, Bessel);
  convert(%, BesselJ);
First 54 55 56 57 58 59 60 Last Page 56 of 92