MaplePrimes Questions

The conditional trigger in the code below does not cause a halt although odeplot shows x dipping to a value below 2.

What is the correct coding of this event to cause a halt when x becomes less than 2?

Does any Maple documentation show examples of working discrete events with conditional triggers?


DE1 := diff(x(t), t, t) = -x(t)-(diff(x(t), t))+y(t);

DE2 := diff(y(t), t, t) = y(t)-(diff(y(t), t))+x(t);

ICs := x(0) = 2, (D(x))(0) = 1, y(0) = 0, (D(y))(0) = 1;

sol1 := dsolve({DE1, DE2, ICs}, {x(t), y(t)}, numeric, event_initial = true, events = [[[0, x(t) < 2], halt]]);

plots:-odeplot(sol1, [t, x(t)], t = 0 .. 3);

In the following case evalhf Int not working. Please help


In two lines below Command1 and Command2 have the same value

Command1 := subs([a=1, b=2], a*x+b);
Command2 := eval(a*x+b, [a=1, b=2]);

Are there pros and cons of using one over the other?

Thanks in advance


I have the following equation

diff(m(t, x), t)+diff((u(t, x)^2-(diff(u(t, x), x))^2)*m(t, x), x) = 0

How I can change it by using this transform

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

to get a new PDE only with u(t,x)

then I need to change u(t,x) by


where y=x−at

How I can do this in Maple?

Hello everyone!

I am struggling to figure out the cause of the problem with Explore command. To put it as simple as possible:

 a := <3, 4, 5>

Explore(a[i], i = 1 .. 3);
Error, (in Explore) bad index into Vector

I am pretty sure that this has to do with an attempt to evaluate A[i] with i not yet defined, but why does Explore behave this way? seq has no such problem:

seq(a[i], i = 1 .. 3);
3, 4, 5

But as soon as I put it into Explore, seq seems to forget all its "special evaluation rules":

Explore(seq(a[i], i = 1 .. 3), b = 1 .. 2);
Error, (in Explore) bad index into Vector

It is probably for the same reason that I can't solve the problem with unevaluation quotes such as: 

Explore('a[i]', i = 1 .. 3);
Error, (in Explore) bad index into Vector

What am I doing wrong??




How to find characterstics for the PDE  yzp+2xq=xy  using maple.....plz help me 


I am trying to  solve the system of equations
solve(x^2+y^2+z^2-4*x+6*y-2*z-11 = 0, 2*x+2*y-z = -18], [x, y, z]);

I didn't get the result x = - 4/3, y = -19/3, z = 8/3.

How can I get the solution?

With Mathematica, I tried 
Solve[{x^2 + y^2 + z^2 - 4*x + 6*y - 2*z - 11 == 0, 
  2*x + 2*y - z == -18}, {x, y, z}, Reals]

And got the correct solution.

How to plot the solution of pde

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

I can't step further,  i can't insert boundary value problem, plz help me to solve pde.

Hear u(x,t)->infinity  when t->infinity  and diff(u(x,t),x) =0 when x=0 for all t 

Please ignore my mistake,

If I have a procedure that for example produces a list of times it takes to work out the eigenvectors of a random nxn matrix from n=2..9.


If I want to make my data more accurate so that it works out the time it takes to find the eigenvector for each different sized matrix multiple times and then takes an average time (for each n), how would I do that?


Hi I'm trying to make a procedure that will multiply all the diagonal entries of any random matrix together, this is what I have tried so far:


Diag := proc(A)
local aux,V,i,n;

for i from 1 to n do 
aux := 1; 
aux := aux*U2(i,i);
end do:

end proc;

but this just produces the last diagoinal entry of the matrix - how do I make the loop multiply the previous number by the next diagonal entry?

another option I've done is to make a list of the diagonal entries, but then I encounter the same problem with multiplication:

local n, List;
end proc:

any help would be greatly appreciated!

I need to convert a maple code into a clickable user interface one. How to do it?. Thank you.

Hi, I've created an array from a do loop, where the number in the array is the number of degrees for which I've calculated the answer, I now wish to graph the angle against the value in the array. i.e. the value a[50]=156.21 should graph to the point (50,156.21). Ideally as well I'd like for it to be joined up by a smooth curve of best fit, but I'll take what I can get, I can't seem to figure out how to plot it at all at the moment.

See code below:


for i from 50 by 5 to 85 do
ThetaBn := (1/180)*i*Pi;
s := cos(2*ThetaBn)*x+(2*sin(ThetaBn)*sin(ThetaBn))*sin(x);
a[i] := 180.0*fsolve(s = 0, x, 1 .. 6)*(1/Pi)
end do;




The program below works fine, but comes up with an error message: wrong number (or type) of parameters in function $.  I'm confused as the Maple 7 Help on 'convert, bytes' the $ symbol is omitted.  The program works fine: it is just a little disconcerting, as this is just the start of a general Wordwheel program.

   The error seems to be related to the textplot command - but why?

# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Wordwheel program - intended to be general
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
#Number of letters, including the ? sign
#Angle of arc for each letter
# Draw the circle
c:=circle([0,0], R, color=black):
#Draw the lines
i from 0 to nolett-1 do
  lin[i] := line([0,0], [R*cos(i*ang),R*sin(i*ang)], color=black,   linestyle=1):
end do:  #i
#Upper & lower case alphabets
#s_L := convert( [$97..122], 'bytes' ):   #a - z
s_U := convert( [$65..95], 'bytes' ):   #A-Z

plots[display](c,tp1, seq(lin[i], i=0..nolett-1), scaling=constrained, axes=none);

Warning, the name changecoords has been redefined

Warning, the name arrow has been redefined

Error, wrong number (or type) of parameters in function $




Download wordwheel.mws


E := proc (n::posint)
local L, x, y, z, p;
p := n; L := NULL;
assume(x::nonnegint, y::nonnegint, z::nonnegint);
assume(x <= y and y < =z);
for x from 1 to irem(p, 2) do
for y from x to irem(p, 2) do
for z from y to irem(p, 2) do
if x+y+z = p then L := L, [x, y, z] end if
end do
end do
end do;
return L end proc:
This procedure don't work. I would like E(9)={(1,4,4),(2,3,4),(3,3,3)} then E(2019), E(2022). Thank you.

Is this documenation wrong?

It says that calling sequence is 

     FetchRow( statement, column, valuetype  )

But below it only shows 



prepared statement obtained using Prepare command



type of the output data, default is "auto"


With no column anywhere.  And none of examples show column in them.

And when I tried it by adding a column name that I know exist in my sqlite3 database, Maple gave an error that no such parameter allowed.  

Does FetchRow support column name or is the above just a documenation error?

Maple 2019


First 6 7 8 9 10 11 12 Last Page 8 of 1731