Rouben Rostamian

MaplePrimes Activity


These are questions asked by Rouben Rostamian

Before Maple 2020, it was possible to start up Maple from the Linux commandline with multiple files, as  in

maple   -x   worksheet-1.mw   worksheet-2.mw   ...   worksheet-n.mw

That started up Maple's Java interface and loaded the n worksheets in separate tabs.

That no longer seems to work in Maple 2020 — now the command exits silently when invoked with multuple files.  Why?

Aside: Loading a single file works as expected, but not multiple files.

 

restart;

kernelopts(version);

`Maple 2020.0, X86 64 LINUX, Mar 4 2020, Build ID 1455132`

convert([1,2,3], Vector[row]);

Vector[row](3, {(1) = 1, (2) = 2, (3) = 3})

convert([1,2,3], Vector[col]);

This worksheet shows an unexpected behavior of pdsolve().  It solves the heat equation on the interval (−1,1) but fails on the interval (0,1).  I see no technical reason for this happening — it's probably due to a little bug lurking somewhere.

restart;

kernelopts(version);

`Maple 2020.0, X86 64 LINUX, Mar 4 2020, Build ID 1455132`

Physics:-Version();

`The "Physics Updates" package is not installed`

Solve the heat equation on the interval -1 < x and x < 1 and

boundary conditions u(-1, t) = 0, u(1, t) = 0.

pde := diff(u(x,t),t) = diff(u(x,t),x,x);

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

bc := u(-1,t)=0, u(1,t)=0;

u(-1, t) = 0, u(1, t) = 0

ic := u(x,0) = cos(Pi/2*x);

u(x, 0) = cos((1/2)*Pi*x)

pdsol := expand(pdsolve({pde,bc,ic}));

u(x, t) = cos((1/2)*Pi*x)*exp(-(1/4)*t*Pi^2)

That's good.  Apply pdetest to verify it:

pdetest(pdsol, [pde,bc,ic]);

[0, 0, 0, 0]

Now, solve the same problem on the interval 0 < x and x < 1 and

boundary condition u__x(0, t) = 0 and u(1, t) = 0.  It should be

evident that the solution remains the same as the one calculated

above, due to symmetry, and here is the verification:

bc_new := D[1](u)(0,t)=0, u(1,t)=0;

(D[1](u))(0, t) = 0, u(1, t) = 0

pdetest(pdsol, [pde,bc_new,ic]);

[0, 0, 0, 0]

But for some reason Maple's pdsolve fails to solve the PDE.  Actually

its response is somewhat erratic -- sometimes it returns nothing at all,

and sometimes it exits with an error message.

pdsolve({pde,bc_new,ic});

 

Download pdsolve-fails.mw

 

Does anyone here have experience with exporting Maple worksheets to LaTeX?  According to help page

?Export as latex

"You can change the Mathematics Formatting Width to align multi-line displayed formulas by modifying the option in the Export tab of the Options dialog."

That setting, however, seems to have no effect.  The image below shows the result, after setting the line width to (the extremely narrow!) 2 inches.  Long lines still overflow the left and right margins of the paper, rendering the result useless.

I see that this was pointed out in 2016 but there appears to have been no improvements since.  Does anyone know a workaround?  I am running Maple 2020 on Linux, if that matters.

This zip file z.zip contains a Maple worksheet, the exported *.tex file, and the compiled PDF.  Here is what that PDF looks like.

 

 

When composing multiple plots, plots:-display's normal behavior is to set the overall plotting region to what is necessary to accommodate the union of the individual plots.  That works correctly most of the time but not in the case shown below.  This may indicate a bug in one of plots:-shadebetween,  plots:-display,  plottools:-extrude.  I have not been able to pinpoint the problem.  Any ideas?

restart;

Make a 3D plot:

plots:-shadebetween(x^2, 2-x^2, x=-1..1, color=red, transparency=0):
p1 := plottools:-extrude(%, 0..0.3);

 

Make another 3D plot:

plottools:-sphere([1.5,0,0], 1, color="Green"):
p2 := plots:-display(%);

 

Combine the plots:

plots:-display([p1,p2], scaling=constrained, style=surface);

 

We see that most of the green sphere has been cut off.  One way to fix things is
to add a view option (see below), but that wouldn't have been necessary if things
were working properly.

plots:-display([p1,p2], scaling=constrained, style=surface,
  view=[-1..3, DEFAULT, DEFAULT]);

 

This was done in Maple 2019.

Maple 2017 behaves the same way.  I don't know whether this ever worked properly in earlier Maples.
 

Download bug-in-3D-view.mw

 

5 6 7 8 9 10 11 Last Page 7 of 16