Joe Riel

9660 Reputation

23 Badges

20 years, 3 days

MaplePrimes Activity


These are answers submitted by Joe Riel

Recently I was not able to login with Firefox.  The solution was to clear the cookie for the MaplePrimes site.

The improved debugger has the ability to temporarily patch a procedure.  From the info page for mds:

  1. Stop the debugger in the procedure to be patched.  

  2. Execute `mds-patch' (`P').  This opens a buffer that contains a
     copy of the procedure.

  3. Edit the procedure.  

  4. Execute `mds-patch-install' (`C-c C-p', or use the *Install* entry
     in the *Patch* menu).

  5. Return to the Maple debugger showstat buffer.

  6. Quit the debugger (`q').

  7. Rerun the Maple code.

 

You may have to set kernelopts(opaquemodule=false) to permit access to module locals.  The patch remains in effect until the kernel is restarted.

 

The fourth boundary condition is the problem. Replacing it with

bc[4] := D[3](x)(t,z,0.16e-1)=0;

eliminates the error.  Alas, pdsolve doesn't return a solution.

Hmm.  That isn't quite right.  I had modified the equations slightly before passing to pdsolve:

cond := {bc[1], bc[2], bc[3], bc[4], bc[5]};
sys := cond union {pde[1], pde[2], pde[3], pde[4]};
sys := convert(sys,rational);
pdsolve(sys, [ Y[],Yeq[], X[], Xeq[] ] );

If the call to convert/rational is removed, the previous error reccurs.

The plot needs to be printed.  Do

print(plot3d(...));

 You might want to wrap everything in a try statement and restore plotsetup in a finally clause:

try
    plotsetup('jpeg', ... );
    print(plot3d(...));
finally
    plotsetup('default');
end try;

The ?contourplot command requires that you specify a range for both x and y.  Try

contourplot( ... , x = -1/2..1/2, y = -1/2..1/2, ... )

You have a typo in the second label box:  label("detector radius", ...) should be Label("detector radius",...)

With that fixed it ran.

The simplest approach is to solve this numerically with ?fsolve.

Another approach is to do

eq := 12^x -6^x +6-36/(3^x)=0:
[solve(simplify(eval(eq, x=log[3](y))), y)];
map(y -> log[3](y), %);
 

I'm guessing you typed that in the search box of the help browser.  Just type the command name.  The question mark is used when typing into an input region of a worksheet.

Change S to SR in the call to NLPSolve.

In the code you posted, the variable dur is not assigned, so the call to maximize returns unevaluated.  Also, in the call to plot, you need to prevent maxpoint from evaluating prematurely, that is, with a symbolic value.  One way to do that is with

plot( maxpoint, 0..2, sample=[0,1,2], adaptive=false):

Alternatively, you could right-click on the structure and select Browse.  That lets you check the content, but won't continually display it.

Note that the recurrence is periodic.  You can determine the period with a slight modification:

a := 1: b := 1/sqrt(3):
for n do
    c := simplify((a + b)/(1-a*b)):
    if assigned(trio[a,b,c]) then break; end if;
    trio[a,b,c] := n;
    a := b;
    b := c;
od:
n, trio[a,b,c];

It means Maple is attempting to store an expression that it cannot convert to a float, into an rtable (Matrix, Array, Vector) that is declared as datatype = float[8], meaning it can only store 8 byte hardware floats. For example,

V := Vector(3, datatype=float[8]):
V[1] := 3/4:  # this is okay because Maple will convert to a float
V[2] := sqrt(3):
Error, unable to store '3^(1/2)' when datatype=float[8]

Maple does not automatically convert roots of rationals to hardware floats when writing to such an rtable. In your case, the indexed name KroneckerDelta[1,2] is the issue.

@Christopher2222 I don't know what you mean.  Using PasswordField, in place of TextField, does exactly what you want. 

(**) theta := [seq(k*Pi/4,k=0..4)]; 
                                    Pi    Pi   3 Pi
                      theta := [0, ----, ----, ----, Pi]
                                    4     2     4

(**) P := [seq(2*k,k=0..4)];
                             P := [0, 2, 4, 6, 8]

You can use zip to multiply the sequences term by term

(**) zip(`*`,theta,P);
                               Pi         9 Pi
                          [0, ----, 2 Pi, ----, 8 Pi]
                               2           2

Another way is to use *~

(**) theta *~ P;
                               Pi         9 Pi
                          [0, ----, 2 Pi, ----, 8 Pi]
                               2           2

First 43 44 45 46 47 48 49 Last Page 45 of 114