Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello all,

This is a post for a software change.

I think it would be great if Maple had some constructions for :

i++

++i

i--

--i and idem for multiply and divide.

I guess it is too late for Maple 2026, but maybe this could be added for 2027.

i++ does work however.

Have a great day.

Jean-Michel

PS:You must have a reputation score of at least 100 to add a new tag. (???)

Sorry : I just see that this  is already implemented in Maple.

Thank you

WHen plotting f(x) and g(x) on same plot, and putting legend at bottom (default), the legends show horizontally. i.e. f(x) then g(x) on same line.

I'd like the legend to be stacked vertically, just like when the legend on the right or left, But keep it at bottom. But want to do all this in code. Not using any UI context tools or mouse.

Here is an example

restart;

f:=x->x^3-x^2+1;
g:=x->6-2*x-x^2;
the_legend:=[typeset("f(x) = ",f(x)),typeset("g(x) = ",g(x))]:
plots[setoptions](font=[TIMES,16], labelfont=[TIMES,18]):
the_title:="Plot of f(x) and g(x)":
plot([f(x),g(x)],x=-5..5,
     'gridlines',
     'color'=['red','blue'],
     'legend'=the_legend,
     'legendstyle'=['location'='bottom'],
     'axes'='normal',
     'title'=the_title,  
     'scaling'='unconstrained');

proc (x) options operator, arrow; x^3-x^2+1 end proc

proc (x) options operator, arrow; 6-2*x-x^2 end proc

#I want the above legend to be stacked vertically like the
#following one, but keep it at bottom

plot([f(x),g(x)],x=-5..5,
     'gridlines',
     'color'=['red','blue'],
     'legend'=the_legend,
     'legendstyle'=['location'='right'],
     'axes'='normal',
     'title'=the_title,  
     'scaling'='unconstrained');

 

 

Download legend_question.mw

This way back machine shows how Maple debugger looked like in the year 2005 (that is 20 years ago) in Maple 10.

And it is pretty much the same debugger today. Here is a screen shot side by side of recent version

20 YEARS and nothing changed.

The debugger in Maple is one, if not the main, selling point for Maple compared to its competitor for many.

Even the article above says this

     "But the big plus about the Maple language is that it has a debugger! "

     "Also, the existence of a reasonable debugger in Maple is a big plus. From
      personal experience, I can tell you that debugging Mathematica Notebooks
     can be both time consuming and frustrating."

Can the debugger be improved, so it is easier to use? 

All what is needed is to change the UI so  one can see more code as they are stepping in, like with Matlab debugger for example.

That is all. Currently it is a pain using the debugger, since one only sees one or 2-3  lines at time as they step in the code instead of seeing complete code with full screen which makes it much easier to see things.

Instead of Maplesoft wasting time on AI and cosmetics, do something practical for developers and improve the debugger.

It should not take a software company 40 years just to improve a UI for a debugger. What is the blocking issue here? 

Just hire one or two programmers and they can do this in 6 months.

It would be useful to have Time-Frequency signal processing tools in Maple, for non-stationary spectral analysis. One example is the Wigner-Ville Transform, along with a range of others (e.g. STFT)

I was wondering which theorem the following result is based on, and what the name of the sequence used is.

restart; with(LinearAlgebra)

K := proc (i::integer, j::integer) local M; M := Matrix(5, 5); M[i, i] := 1; M[j, j] := 1; return M end proc

F := proc (r, c, g, h) options operator, arrow; Adjoint(A.K(r, c).B.K(g, h).C) end proc

d1 := 3; d2 := 5; A := Matrix(d1, d2, symbol = a); B := Matrix(d2, d2, symbol = b); C := Matrix(d2, d1, symbol = c)

d1 := 3

 

d2 := 5

 

Matrix(3, 5, {(1, 1) = a[1, 1], (1, 2) = a[1, 2], (1, 3) = a[1, 3], (1, 4) = a[1, 4], (1, 5) = a[1, 5], (2, 1) = a[2, 1], (2, 2) = a[2, 2], (2, 3) = a[2, 3], (2, 4) = a[2, 4], (2, 5) = a[2, 5], (3, 1) = a[3, 1], (3, 2) = a[3, 2], (3, 3) = a[3, 3], (3, 4) = a[3, 4], (3, 5) = a[3, 5]})

 

Matrix(5, 5, {(1, 1) = b[1, 1], (1, 2) = b[1, 2], (1, 3) = b[1, 3], (1, 4) = b[1, 4], (1, 5) = b[1, 5], (2, 1) = b[2, 1], (2, 2) = b[2, 2], (2, 3) = b[2, 3], (2, 4) = b[2, 4], (2, 5) = b[2, 5], (3, 1) = b[3, 1], (3, 2) = b[3, 2], (3, 3) = b[3, 3], (3, 4) = b[3, 4], (3, 5) = b[3, 5], (4, 1) = b[4, 1], (4, 2) = b[4, 2], (4, 3) = b[4, 3], (4, 4) = b[4, 4], (4, 5) = b[4, 5], (5, 1) = b[5, 1], (5, 2) = b[5, 2], (5, 3) = b[5, 3], (5, 4) = b[5, 4], (5, 5) = b[5, 5]})

 

Matrix(%id = 36893489807004764868)

(1)

simplify(Adjoint(A.B.C)-add([F(1, 2, 1, 2), F(1, 2, 1, 3), F(1, 2, 1, 4), F(1, 2, 1, 5), F(1, 2, 2, 3), F(1, 2, 2, 4), F(1, 2, 2, 5), F(1, 2, 3, 4), F(1, 2, 3, 5), F(1, 2, 4, 5), F(1, 3, 1, 2), F(1, 3, 1, 3), F(1, 3, 1, 4), F(1, 3, 1, 5), F(1, 3, 2, 3), F(1, 3, 2, 4), F(1, 3, 2, 5), F(1, 3, 3, 4), F(1, 3, 3, 5), F(1, 3, 4, 5), F(1, 4, 1, 2), F(1, 4, 1, 3), F(1, 4, 1, 4), F(1, 4, 1, 5), F(1, 4, 2, 3), F(1, 4, 2, 4), F(1, 4, 2, 5), F(1, 4, 3, 4), F(1, 4, 3, 5), F(1, 4, 4, 5), F(1, 5, 1, 2), F(1, 5, 1, 3), F(1, 5, 1, 4), F(1, 5, 1, 5), F(1, 5, 2, 3), F(1, 5, 2, 4), F(1, 5, 2, 5), F(1, 5, 3, 4), F(1, 5, 3, 5), F(1, 5, 4, 5), F(2, 3, 1, 2), F(2, 3, 1, 3), F(2, 3, 1, 4), F(2, 3, 1, 5), F(2, 3, 2, 3), F(2, 3, 2, 4), F(2, 3, 2, 5), F(2, 3, 3, 4), F(2, 3, 3, 5), F(2, 3, 4, 5), F(2, 4, 1, 2), F(2, 4, 1, 3), F(2, 4, 1, 4), F(2, 4, 1, 5), F(2, 4, 2, 3), F(2, 4, 2, 4), F(2, 4, 2, 5), F(2, 4, 3, 4), F(2, 4, 3, 5), F(2, 4, 4, 5), F(2, 5, 1, 2), F(2, 5, 1, 3), F(2, 5, 1, 4), F(2, 5, 1, 5), F(2, 5, 2, 3), F(2, 5, 2, 4), F(2, 5, 2, 5), F(2, 5, 3, 4), F(2, 5, 3, 5), F(2, 5, 4, 5), F(3, 4, 1, 2), F(3, 4, 1, 3), F(3, 4, 1, 4), F(3, 4, 1, 5), F(3, 4, 2, 3), F(3, 4, 2, 4), F(3, 4, 2, 5), F(3, 4, 3, 4), F(3, 4, 3, 5), F(3, 4, 4, 5), F(3, 5, 1, 2), F(3, 5, 1, 3), F(3, 5, 1, 4), F(3, 5, 1, 5), F(3, 5, 2, 3), F(3, 5, 2, 4), F(3, 5, 2, 5), F(3, 5, 3, 4), F(3, 5, 3, 5), F(3, 5, 4, 5), F(4, 5, 1, 2), F(4, 5, 1, 3), F(4, 5, 1, 4), F(4, 5, 1, 5), F(4, 5, 2, 3), F(4, 5, 2, 4), F(4, 5, 2, 5), F(4, 5, 3, 4), F(4, 5, 3, 5), F(4, 5, 4, 5)]))

Matrix(%id = 36893489807027993164)

(2)

nops([F(1, 2, 1, 2), F(1, 2, 1, 3), F(1, 2, 1, 4), F(1, 2, 1, 5), F(1, 2, 2, 3), F(1, 2, 2, 4), F(1, 2, 2, 5), F(1, 2, 3, 4), F(1, 2, 3, 5), F(1, 2, 4, 5), F(1, 3, 1, 2), F(1, 3, 1, 3), F(1, 3, 1, 4), F(1, 3, 1, 5), F(1, 3, 2, 3), F(1, 3, 2, 4), F(1, 3, 2, 5), F(1, 3, 3, 4), F(1, 3, 3, 5), F(1, 3, 4, 5), F(1, 4, 1, 2), F(1, 4, 1, 3), F(1, 4, 1, 4), F(1, 4, 1, 5), F(1, 4, 2, 3), F(1, 4, 2, 4), F(1, 4, 2, 5), F(1, 4, 3, 4), F(1, 4, 3, 5), F(1, 4, 4, 5), F(1, 5, 1, 2), F(1, 5, 1, 3), F(1, 5, 1, 4), F(1, 5, 1, 5), F(1, 5, 2, 3), F(1, 5, 2, 4), F(1, 5, 2, 5), F(1, 5, 3, 4), F(1, 5, 3, 5), F(1, 5, 4, 5), F(2, 3, 1, 2), F(2, 3, 1, 3), F(2, 3, 1, 4), F(2, 3, 1, 5), F(2, 3, 2, 3), F(2, 3, 2, 4), F(2, 3, 2, 5), F(2, 3, 3, 4), F(2, 3, 3, 5), F(2, 3, 4, 5), F(2, 4, 1, 2), F(2, 4, 1, 3), F(2, 4, 1, 4), F(2, 4, 1, 5), F(2, 4, 2, 3), F(2, 4, 2, 4), F(2, 4, 2, 5), F(2, 4, 3, 4), F(2, 4, 3, 5), F(2, 4, 4, 5), F(2, 5, 1, 2), F(2, 5, 1, 3), F(2, 5, 1, 4), F(2, 5, 1, 5), F(2, 5, 2, 3), F(2, 5, 2, 4), F(2, 5, 2, 5), F(2, 5, 3, 4), F(2, 5, 3, 5), F(2, 5, 4, 5), F(3, 4, 1, 2), F(3, 4, 1, 3), F(3, 4, 1, 4), F(3, 4, 1, 5), F(3, 4, 2, 3), F(3, 4, 2, 4), F(3, 4, 2, 5), F(3, 4, 3, 4), F(3, 4, 3, 5), F(3, 4, 4, 5), F(3, 5, 1, 2), F(3, 5, 1, 3), F(3, 5, 1, 4), F(3, 5, 1, 5), F(3, 5, 2, 3), F(3, 5, 2, 4), F(3, 5, 2, 5), F(3, 5, 3, 4), F(3, 5, 3, 5), F(3, 5, 4, 5), F(4, 5, 1, 2), F(4, 5, 1, 3), F(4, 5, 1, 4), F(4, 5, 1, 5), F(4, 5, 2, 3), F(4, 5, 2, 4), F(4, 5, 2, 5), F(4, 5, 3, 4), F(4, 5, 3, 5), F(4, 5, 4, 5)])

100

(3)
 

NULL

Download Adjoint353.mw

Given equation such as 1/A=x/A, at school we are allowed to write this as 1=x by canceling A on both side.

But in Maple, even if I tell it that A is not zero, it still refuses to simplify it and cancel A from both sides.

What could be the reson for this?

eq:= 1/A = x/A;
simplify(eq) assuming A<>0

Using Mathematica it does it:

I am not looking for workaround, I know how to force this if needed, one way could be

numer(normal((lhs-rhs)(eq)))=0

gives 1 - x = 0

My question is why Maple's simplify does not simplify it automatically? Even using simplify with size option did not. Is it just weakness in simplify or is there a subtle mathematical reason behind it which I am missing?

Maple 2025.2

Hi, I want to write a function to parse an expression into coefficients and exponents as follows:


I found a similar function (factors), but it fails in the second case.

this transforamtion including two function which i try to do, but my result is so different and even is not near i did like the author mention but i don't know how reach that outcome, the importan part is the equation 2.7

 

s1.mw

Given first order nonlinear ode which is hard to solve using standard methods, the smart dsolve sometimes uses a method where it linearizes the first order ode to a linear second order ode and solves that.

Then with that solution to the linear second order ode, it is able to find the solution of the first order ode (need to resolve the constants of integration to merge them into one, but this part is easy to do).

My question is, how and what method it uses to "linearizes by differentation"? I could not find this in any textbook I have, and not able to see how it does.

Here is an example where it uses this method to solving this first order ode

restart;

Typesetting:-Unsuppress('all'); #always do this.
Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx    
Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)

ode:=diff(y(x),x) = (-y(x)^2+4*a*x)^2/y(x); 
infolevel[dsolve]:=5;
dsolve(ode,y(x), singsol=all);

Tracing says 

So it says, if I understand, that it differentiated the original given first order ode and then linearized the resulting second order ode to the above, which is    y''=-64 a^2 x^2 y - 16 a x y' which is certainly linear second order ode and now can be solved using kovacic algorithm. Now the solution to the first order ode can be obtained.

But when differentiating the first order ode, this is the result

expand(diff(ode,x))

So the question is, did Maple mean it "linearized" the above to y''=-64 a^2 x^2 y - 16 a x y' 

If so, then how? Did it use Taylor series? but if so, where it expanded about? Or did it use some other method?  One thing I noticed is that by multiplying the RHS above by y^2 it becomes

And "removing" the nonlinear terms (say expansion is around y=0, so higher order y terms are very small and can be removed) the RHS above becomes

    y'' y^2 = -16 y' a^2 x^2 + 32 a^2 x y

Which is close to Maple shows, but 32 instead of 64, and what about the y^2 on the left side?  Is this method even valid mathematically to do? Since solution that result will be correct only near y=0?

So far, trying to step in the debugger to find how, I was not able to find where it does that but will keep trying.

Any idea what Maple means by linearization to 2nd order and how it does it?

ps. only case I know about, where nonlinear first order ode can be transformed to linear second order ode is the Riccati ode using transformation y=u'/u. But this  first order ode is not Riccati.

I just installed Maple 2023 on a MacPro running macOS Sequoia 15.7.2. Update to latest .version and activation worked without a hitch.

When I try to run it from the Finder it immediately puts up a dialog saying something like "Java not found". There is a webpage by Maplesoft addressing this, but it is completely uninformative and unhelpful.

I can get Maple to run using the cli (in Terminal) opening the Maple 2023 .app file, at which point Maple (running the standard GUI) works just as one would expect. So it is not a crisis but I'd like to be able to open it through the Finder as well. The Maple .app folder appears to have all the Java stuff in it, and clearly it is somewhere.

Anyone seen and solved this before?

Thanks,

Mac Dude

To enter prime notation in Math-2D I currently do

k^2 + `k'`^2 = 1;
                           2     2    
                          k  + k'  = 1

To enter a back tick (left single quote symbol) this requires with my keyboard shift+(key for `) followed by hitting the space bar.

The output looks nice

However to enter k' in a new input line, dragging and dropping k' (which normally works for other expressions) from a former output does not work. The result is

Instead of changing default typesetting rules, I made k' atomic and dragged it to the favourite palette. This is an acceptable solution to avoid keyboard acrobatics. The only drawback is that the favourite palette gets crowded after a while.

I was wondering whether there are other ways to enter prime notation in a less complicated way as I have described above?

This is a question on semantics I suppose.

Maple dsolve returns a solution with a limit in it, because the limit do not exist or Maple could not find the limit. Which is fine.

Then why does simplify() applied to the solution returns undefined?  Now it appears that Maple solution is y(x)=undefined, which does not make much sense.

Should it not have left the solution with the limit in place as is? i.e. since dsolve could not find limit, how did simplify managed to replace the limit by undefined?

Is this considered an expected behavior by simplify?

Firewall changed its mind again today and will not let me upload worksheet. Here is code

ode:=4*x*diff(y(x),x$2)+2*diff(y(x),x)+y(x)=(6+x)/x^2;
IC:=y(infinity)=0;
sol:=dsolve([ode,IC],y(x)); #OK, maple can't find limit. No problem
simplify(sol)

I have to ask my school teacher on this when school starts. But is it OK to have infinity in the ode solution itself?

Maple 2025.2 gives

ode:=diff(y(x),x$2)-2*diff(y(x),x)+y(x)=4*exp(-x);
IC:=y(infinity)=0;
sol:=dsolve([ode,IC])

And according to odetest, this does not verify the ode nor the IC

odetest(sol,[ode,IC])

Just asking what others think of this solution and if it should be consider a bug or not?

Maple 2025.2 on windows 10

in here i want to apply this method for finding my parameter but is a special kind of substituion and i don't know how hundle this kind  and find the parameters i did some part but i didn't reach the target 

f-p-second.mw

1 2 3 4 5 6 7 Last Page 1 of 2237