awass

301 Reputation

10 Badges

19 years, 147 days

MaplePrimes Activity


These are questions asked by awass

I am trying to enter an ODE into Maple and I remember that Dr. Lopez showed how to use a prime to denote differentiation. When I try I get conflicting results: if I type

>  y''+y'+3*y=0;;

Error, unexpected single forward quote
But if I copy that command from the Help page Maple understands what I want. What is going on?

BTW, there is no entry for Differential Equations on the Help page.
 

 

 

The Help pages says:

Import a Worksheet from XML
  Open an existing XML document as a worksheet to modify the content or to change its appearance.
1. From the File menu, select Open. The Open dialog appears.
Select the Maple Worksheet as XML file type.

Those instructions do NOT apply to Maple 2018 on a Mac (although I have verified they DO apply on a Windows machine.) No dialog appears.

My .mw file is 90% format information and thenbits and pieces of Maple code. Is there some way to just extract the maple stuff? The file is pretty long and cutting out the xml stuff is very time consuming.

Thanks,

 

I have a procedure that changes the value of an input variable quite unexpectdly. Can anyone explain why? I have a very simplified example of this below.

restart;
with(LinearAlgebra):
switch := proc (V::Vector)
description "This procedure is supposed to take a Vector V and switch entries 1 and 2";
local W,a,b;
W:= V;
a:= W[1];
b:= W[2];
W[1 ] := b;  
W[2] :=a;
W
end proc;

V1:=Vector([1,3,5]);
V2:=switch(V1);
I have omitted the output for brevity's sake but all works well as expected.
However,
V1;

returns V2 not V1. Why is the procedure changing V1?
 

The problem occurs with matrices but not with lists.

 

Thanks.

 

Here is a simple procedure that works fine if entered using 1D Maple input
> Q:=proc(x)
sin(x)
end proc;
but if you use 2D math input
> q:=proc(x)
sin(x);

  end proc;

Error, unterminated procedure
    Typesetting:-mambiguous(qAssignTypesetting:-mambiguous(

      procApplyFunction(x) sinApplyFunction(x),

      Typesetting:-merror("unterminated procedure")))
Error, unable to parse
    Typesetting:-mambiguous(  Typesetting:-mambiguous(end,

      Typesetting:-merror("unable to parse")) procsemi)

Ouch! But to confuse things further the following procedures may be entered using 2D math and work fine:
>H := proc (x) x^2*sin(x) end proc;
>K := proc (x) sin(x^2) end proc;
Doesn't make any sense to me. Perhaps 2D math is not ready for prime time?

 

From the help pages for the Gram Schmidt command:

The number of Vectors returned is the dimension of the vector space spanned by V.  In particular, if the Vectors in V are not linearly independent, fewer Vectors than the number in V are returned.


That is not what happens when floating point numbers are involved, for example:

>restart;
>with(LinearAlgebra);
>a := Vector([1, 2, 3]); b := Vector([1, -2, 3]); c := Vector([3, 2, 1]); d := Vector([5, 1, -3]); e := Vector([0, 1.01, -3]);
>GramSchmidt([a, b, c, d, e]);

This returns 3 vectors as it should BUT
>GramSchmidt([b, c, d, e, a]) returns 5 vectors (one of which is essentially 0).  That is definitely a bug.
 

1 2 3 4 5 6 7 Page 3 of 10