Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I experience Maple 2024 not beeing responsive.

It happens often that nothing is happening for 10 to 15 seconds after placing the cursor in an input line.

When the cursor is back, typing is normal for a little while and then again Maple is not reacting to user input.

The worksheets I am working with are between 50 and 100 Mb large in file size (containing plot3d structures, approx 1000 frames distributed across several plots:-display statements). It looks to me that the GUI has to do some house keeping from time to time which keeps it buisy with all the plot structures.

I could delete (plot) output, but this would require execution of the worksheet (before deleting the output) each time I want to continue working normally. This takes several minutes to be ready to work.

Anything else that I can do?

I am learning patten matching in Maple. 

Any one could explain why patmatch(1, (x::anything)^(n::'nonunit'(anything)))   gives true but patmatch(2, (x::anything)^n::'nonunit'(anything)); gives false?

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

patmatch(1, (x::anything)^(n::'nonunit'(anything)))

true

patmatch(2, (x::anything)^n::'nonunit'(anything));

false

Download patmatch_question_nov_16_2024.mw

I was expecting result similar to using this other software

I do not understand Maple's result. How could I change the patmatch so it does not match 1 to the pattern x::anything^n::anything where n is not 1 ?

Update

To give context, I was trying to write this example from the other software  in Maple:

But when I wrote this

expr:=1 + x^2 + x^4;

F:=proc(X::anything,x::symbol)
    local la,y,n;
    if patmatch(X, (y::anything)^(n::'nonunit'(anything)) ,'la') then  
       f(eval(n,la));
     else
        X;
     fi;
end proc;

map(X->F(X,x), expr);

Maple gave 

So I modified the code now to check for explicit 1,  to avoid this bad match, like this

expr:=1 + x^2 + x^4;

F:=proc(X::anything,x::symbol)
    local la,y,n;
    if patmatch(X, (y::anything)^(n::'nonunit'(anything)) ,'la') then  
        if eval(y,la)=1 then #bug in maple?
           X;
        else
           f(eval(n,la));
        fi;
     else
        X;
     fi;
end proc;

map(X->F(X,x), expr);

And now it gives expected result

How to insert a file inside another file, creating a session, without equations with the same name conflicting?

A farmer has exactly 100m of wire mesh fence available to enclose a pasture. The fence must begin and end at his large oak tree. To do this, imagine the usual "north-south/west-east" cross of the cardinal directions in the drawing plane. The oak tree is at the center of this.

1. All land that lies west of the imaginary axis is not worth a cent.

2. All land that lies east of the oak tree becomes continuously more expensive the further it is from the north-south axis. The property value is based on the function y = k · x, where y represents the price per square meter and x represents the distance in meters to the north-south axis. k is a proportionality factor, which for the task is k = 1 euro/m^3.

a) On which curve must the fence run so that the enclosed pasture area has the greatest possible value?

b) On which curve must the fence run if instead of the distance x from the north-south axis the distance r from the oak tree is decisive with the same factor k?

I was watching Maple's video for conference 2024. In one of the presentation, this example is given

But in my Mapple 2024.2 I get an error typing the same command:

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

my_ode:={diff(x(t),t$2)-t^2*x(t)=0, x(0)=1,D(x)(0)=1}:
MultivariatePowerSeries:-PowerSeries(my_ode,t,x);

Error, invalid input: too many and/or wrong type of arguments passed to MultivariatePowerSeries:-PowerSeries; first unused argument is t

 

 

Download powerSeries_nov_14_2024.mw

Link to the video is here  it is around 39:00 in time. 

Any one knows why I get an error using same command shown in the video?

I tried connecting Maple to Jupyter Notebook, but it seems that it is not keen on outputting everything within the for loop; it only outputs the last item.

for i from 1 to 24 do
    print(i);
end do;

I've noticed that the Maple interface is always white, and after a long time, it causes eye strain. I wonder if it's possible to adjust the interface color, similar to Mathematica. My system is Windows 11.

Currently, I often use VSCode as an alternative, but some mathematical symbols don't display very clearly.

I have noticed similar discussions, such as this one, but I don’t know how to do it

I have been working on solving a system of PDEs and plotting the results. However I've been encountered issues with setting the spacestep and timestep parameters.

First of all, i attempted to plot graphs t=0..2 using the animate command,

with spacestep = 5*10-4 x 1/151,          timestep=1/1000

However, as shown in the image, an error ocurred indicating that calculations could not proceed after 1.57 sec.

Secondly, i kept the same spacestep but changed the timestep to 1/100 for plotting graphs 
t=0..2. This time, the graphs were plotted without any issues.

I initially beleved that larger spacesteps or timesteps would produce more accurate data. However, in my case, simply increasing these parameters did not work.

I would greatly appreciate if you could provide guidance on what factors should be considered when setting timestep and spacestep parameters, or any experiences in resolving similar issues.

I am running a code that loops through some 500 cases, each one considered separate, each working with a matrix of rationals 100x30 to 5000x900 or possibly larger dimensions. The matrices are not preserved and variables are reused. A concerning pattern emerges as more and more memory is slowly added until all ram (32GB) is spent and this makes no sense. Observing kernelopts(heaps); the number of entries increases steadily. Using gc() a few entries will occasionally disappear, but gc() itself takes longer with each loop.

What can I use to manage this condition?
Also why is there an increasing number of "Thread-Local" entries among the heaps?

I want to display in 3d the following objects

  • Animated plottools objects (e.g. a spinning cube)
  • Static plot objects (e.g. surface plot)/li>
  • Time dependent spacecurves (to trace the path of objects)

Technically I could

  • create a sequence of time stamps
  • generate for each time stamp a plot structure using plots:-display for all the above objects
  • display the sequence of plot structures with plots:-display with the option insequence.

or

  • create separate plots with plots:-animate for each time dependent object
  • plot with plot3d all static objects
  • display all plots with plots:-display

or

  • defining a procedure containing all plotting commands as a function of time
  • create a background plot of all static objects using plots:-display
  • animate the procedure with a plots:-animate call with the background option

Without having any experience, my perference would be the last way. However I intend to generate some plot coordinates with dsolve,numeric. This would mean that at each point in time to be plotted, dsolve starts integration from the inital conditions (which I have not planned to update animation frame by animation frame)

Any recommensations or thoughts on this?

In the publication
https://www.scirp.org/pdf/apm_2021062513594181.pdf
I read that Maple18 contains the "Adomian Decomposition". In "Help" of "Maple2024" I found no direct reference to this method. I would like to ask you to provide references in the help text to this method for solving differential equations.

The other night, first time using Maple in more than 20 years, I asked for the solution to this, looking for u1 in terms of u2:

equ := u2 - u1/(-u1^2 + 1)

solve(equ, [u1])

==> u1 = (-1 + sqrt(4*u2^2 + 1))/(2*u2)

But this is sheer nonsense. The correct solution should be:

u1 = (-1 + sqrt(u2^2 + 1))/u2   ;; note the lack of 4x scaling inside the Sqrt, nor the 2x in the denominator.

What the heck??

there is four formula for calculate them which i know them by name of author the first one is adomian second one is (BiazarShafiofAdomian) which one member of mableprimes write code for me,but i don't know how use for all kind function maybe in future i upload this program for fix this issue, the third one is by zhao which is i think i easy for calculate just  i need someone one to wite the program and do some test for some example i  upload some picture in case for getting algorithm to writting and have some example for testing  so  lets see who can do this algorithm is very usfule when we solve ODE or PDE by LDM, also last method is by taking integral have a good method, in this question this algorithm is zhao which is usfull one

Hi,
I have an equation and I want to solve it parametrically to find x , but I couldn't do that with "solve" command. (I know x should be  real and positive). What should I do?
Root_of.mw

[moderator: The Physics update Library fixes this bug with the same error generated and reported by the same Mapleprimes member on another ODESteps example.]

I have removed Physics update from libname path. 

Now I find I get error calling latex command. When Physics update is on libname, no error.

The error is 

         Error, (in Typesetting:-Parse) too many levels of recursion

I am using worksheet with typesetting extended. But also when I change it to typesetting standard, same error. 

Does this mean one must keep Physics update on libname path for Maple to work OK?

Is this error expected if Physics update is not on libname?

Worksheet below that shows this problem

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

CASE 1. With Physics update in libname path, no error

 

restart;

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

ode:=[diff(x__1(t),t)=2*x__1(t)+x__2(t),diff(x__2(t),t)=2*x__1(t)+3*x__2(t)];

[diff(x__1(t), t) = 2*x__1(t)+x__2(t), diff(x__2(t), t) = 2*x__1(t)+3*x__2(t)]

the_output:=Student:-ODEs:-ODESteps(ode,output=typeset):

latex(the_output,'output'=string):

 

CASE 2.  Removing Physics from libname path, gives internal error

 

restart;

libname:=libname[2];

"C:\Program Files\Maple 2024\lib"

ode:=[diff(x__1(t),t)=2*x__1(t)+x__2(t),diff(x__2(t),t)=2*x__1(t)+3*x__2(t)];

[diff(x__1(t), t) = 2*x__1(t)+x__2(t), diff(x__2(t), t) = 2*x__1(t)+3*x__2(t)]

the_output:=Student:-ODEs:-ODESteps(ode,output=typeset):

latex(the_output,'output'=string):

Error, (in Typesetting:-Parse) too many levels of recursion

 

 

 

Download internal_error_from_latex_when_libname_changed_nov_2_2024.mw

First 9 10 11 12 13 14 15 Last Page 11 of 2212