MaplePrimes Questions

Hello, I have a procedure "timing" in the code editor that I am calling from the main canvas of a flow document. I would like to print the procedure description text string from the Description option in the procedure using the Describe command. However, Describe(timing) does not return anything.

The flow document is at this link: Procedure-Describe.flow

I would appreciate any suggestions.

Thanks

I am new to Windows 11 (edit: I was forced to migrate from 10).

I am looking for an option to resize the Window that the interupt button becomes accessible (see red box)

Also: there are no window controls (maximize minimize) visble . (edit: the title bar is clipped off).

Window key + arrow key does not work.

I have also tried the Snap Layout option to resize but cannot find Maple 2025.1 under the selectable tasks.

What else can I try?

I checked the ConsistencyTest of the system of equations but no output with 'true' or 'False'. Is it not work in 'DEtools'? Download consistency.mw

I have a piecewise density function (f).  I am trying to find the median value.

I have tried the Median function and the Percentile function, but neither work for me.  I am not sure why.

I have also tried to integrate the density function on the (0,x) interval such that the area under the curve is 1/2 and then solve for x.  This works for simple problems, but not the one attached.

There is something very simple that I'm not doing, but I am not sure what.

restart

kernelopts(version)

`Maple 2023.2, X86 64 WINDOWS, Nov 24 2023, Build ID 1762575`

(1)

with(Statistics)

 

(2)

f := 2*t*piecewise(t <= 0, 0, t <= 1, t^2+Pi-4*t, t <= sqrt(2), -(sqrt(t^2-1)*t^2+2*sqrt(t^2-1)*arcsin((t^2-2)/t^2)-4*t^2+2*sqrt(t^2-1)+4)/sqrt(t^2-1), sqrt(2) < t, 0)

2*t*piecewise(t <= 0, 0, t <= 1, t^2+Pi-4*t, t <= 2^(1/2), -((t^2-1)^(1/2)*t^2+2*(t^2-1)^(1/2)*arcsin((t^2-2)/t^2)-4*t^2+2*(t^2-1)^(1/2)+4)/(t^2-1)^(1/2), 2^(1/2) < t, 0)

(3)

plot(f, t = 0 .. sqrt(2))

 

Median(f)

2*t*piecewise(t <= 0, 0, t <= 1, t^2+Pi-4*t, t <= 2^(1/2), -((t^2-1)^(1/2)*t^2+2*(t^2-1)^(1/2)*arcsin((t^2-2)/t^2)-4*t^2+2*(t^2-1)^(1/2)+4)/(t^2-1)^(1/2), 2^(1/2) < t, 0)

(4)

Percentile(f, 50)

2*t*piecewise(t <= 0, 0, t <= 1, t^2+Pi-4*t, t <= 2^(1/2), -((t^2-1)^(1/2)*t^2+2*(t^2-1)^(1/2)*arcsin((t^2-2)/t^2)-4*t^2+2*(t^2-1)^(1/2)+4)/(t^2-1)^(1/2), 2^(1/2) < t, 0)

(5)

myMedian := solve(int(f, t = 0 .. x) = 1/2, x)

Warning, solutions may have been lost

 

(6)

NULL

Download Median.mw

When calculating limits of real-valued functions, sometimes (especially in competitions) tricky approaches are taken using pen and paper. I repeatedly encountered the simple conclusion that, for example, for natural k, the value sin(k*pi) = 0. Thus, the function value is determined logically without specifying a specific number. There are numerous other examples of this that can easily be constructed.
My question after unsuccessful attempts using "assume" is:
How, for example, does Maple determine the value of sin(k*pi) from the assumption "k is natural" alone? Are such prominent values ​​implemented in tables?

 

As I was comparing visually the first terms of a priori identical sums produced by add , I was surprised to find them different.
So I suspected some error in what I have done, until I realized that add randomly permuted the terms.
Each term is of the form (R + P)2 where R is a random number and P a polynomial.

This behaviour is illustrated in worksheet add_changes_ranks.mw and appears only when random numbers are used (provided the seed is not forced to some constant value)

Does someone ever onserved that or have any idea of what happens here (maybe this behaviour no longer happens in recent versions?) ?

Thanks in advance

I am trying to find the standard deviation for a piecewise density function (f).  The interval is (0, sqrt(3))  I am convinced the density function is what I want.  I calculate the expected value of the density function (evE) and the answer is correct -- about 0.66145

When I try to calculate the standard deviation (stdE), I get an answer that is "off" by a large degree.  Via simulating values, I should get a value of about 0.24936.  Each time I "re-run" the calculation, I get varying results, all of which are "off" by a large degree.

I am only guessing, but my integration function might be missing some sort of assumption and/or option.

My work is attached.  Does anyone know what I am doing wrong?

restart

with(Statistics)

f := -t*piecewise(t <= 0, 0, t <= 1, t*(t^3+6*Pi*t-8*t^2-4*Pi), t <= sqrt(2), -(2*(4*t^2*sqrt(t^2-1)*arcsin((t^2-2)/t^2)+4*t^2*arctan(sqrt(t^2-1))*sqrt(t^2-1)+(t^4+(2*Pi+3)*t^2-4*t*Pi+3*Pi-1/2)*sqrt(t^2-1)-8*t^4+4*t^2+4))/sqrt(t^2-1), t <= sqrt(3), (8*arctan((t^3+t^2-3*t-1)/(sqrt(t^2-2)*(t^3-t^2-t-1)))*t*sqrt(t^2-2)-4*arccot((t^2-t-1)/sqrt(t^2-2))*t^2*sqrt(t^2-2)+4*t*sqrt(t^2-2)*(t+2)*arctan((t^2+t-1)/sqrt(t^2-2))+(8*t^2-4)*sqrt(t^2-2)*arcsin((t^2-3)/(t^2-1))+16*arcsin(sqrt(t^2-2)/sqrt(t^2-1))*sqrt(t^2-2)-16*arcsin(1/sqrt(t^2-1))*sqrt(t^2-2)+((t^2+5)*sqrt(t^2-2)-8*t^2+16)*(t^2+1))/sqrt(t^2-2), sqrt(3) < t, 0)

-t*piecewise(t <= 0, 0, t <= 1, t*(t^3+6*Pi*t-8*t^2-4*Pi), t <= 2^(1/2), -2*(4*t^2*(t^2-1)^(1/2)*arcsin((t^2-2)/t^2)+4*t^2*arctan((t^2-1)^(1/2))*(t^2-1)^(1/2)+(t^4+(2*Pi+3)*t^2-4*t*Pi+3*Pi-1/2)*(t^2-1)^(1/2)-8*t^4+4*t^2+4)/(t^2-1)^(1/2), t <= 3^(1/2), (8*arctan((t^3+t^2-3*t-1)/((t^2-2)^(1/2)*(t^3-t^2-t-1)))*t*(t^2-2)^(1/2)-4*arccot((t^2-t-1)/(t^2-2)^(1/2))*t^2*(t^2-2)^(1/2)+4*t*(t^2-2)^(1/2)*(t+2)*arctan((t^2+t-1)/(t^2-2)^(1/2))+(8*t^2-4)*(t^2-2)^(1/2)*arcsin((t^2-3)/(t^2-1))+16*arcsin((t^2-2)^(1/2)/(t^2-1)^(1/2))*(t^2-2)^(1/2)-16*arcsin(1/(t^2-1)^(1/2))*(t^2-2)^(1/2)+((t^2+5)*(t^2-2)^(1/2)-8*t^2+16)*(t^2+1))/(t^2-2)^(1/2), 3^(1/2) < t, 0)

(1)

plot(f, t = 0 .. sqrt(3))

 

evE := simplify(int(t*f, t = 0 .. sqrt(3)))

(1/105)*(294*(2^(1/2)-3/2)*(-2+3^(1/2))*ln(1+2^(1/2))+168*(2^(1/2)-3/2)*(-2+3^(1/2))*ln(1+3^(1/2))-252*(2^(1/2)-3/2)*(-2+3^(1/2))*arccoth(2^(1/2))+((-14*Pi-84*ln(2)-19)*3^(1/2)+28*Pi+168*ln(2)+50)*2^(1/2)+(21*Pi+126*ln(2)+20)*3^(1/2)-42*Pi-252*ln(2)-58)/((2*2^(1/2)-3)*(-2+3^(1/2)))

(2)

evalf(evE)

.6617071838

(3)

stdE := simplify(sqrt(int(f*(t-evE)^2, t = 0 .. sqrt(3))))

(1/210)*(-4808607312140100*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*ln(1+2^(1/2))^2+(-5495551213874400*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*ln(1+3^(1/2))+8243326820811600*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*arccoth(2^(1/2))+((457962601156200*Pi+2747775606937200*ln(2)+631290043332900)*3^(1/2)-793214493249360*Pi-4759286959496160*ln(2)-1093426429714584)*2^(1/2)+(-647656921614780*Pi-3885941529688680*ln(2)-892778941072368)*3^(1/2)+1121774694224184*Pi+6730648165345104*ln(2)+1546338486359352)*ln(1+2^(1/2))-1570157489678400*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*ln(1+3^(1/2))^2+(4710472469035200*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*arccoth(2^(1/2))+((261692914946400*Pi+1570157489678400*ln(2)+360737167618800)*3^(1/2)-453265424713920*Pi-2719592548283520*ln(2)-624815102694048)*2^(1/2)+(-370089669494160*Pi-2220538016964960*ln(2)-510159394898496)*3^(1/2)+641014110985248*Pi+3846084665911488*ln(2)+883621992205344)*ln(1+3^(1/2))-3532854351776400*(2^(1/2)-3880899/2744210)*(3^(1/2)-70226/40545)*arccoth(2^(1/2))^2+(((-392539372419600*Pi-2355236234517600*ln(2)-541105751428200)*3^(1/2)+679898137070880*Pi+4079388822425280*ln(2)+937222654041072)*2^(1/2)+(555134504241240*Pi+3330807025447440*ln(2)+765239092347744)*3^(1/2)-961521166477872*Pi-5769126998867232*ln(2)-1325432988308016)*arccoth(2^(1/2))+((-392539372419600*ln(2)^2+(-130846457473200*Pi-180368583809400)*ln(2)-10903871456100*Pi^2-30061430634900*Pi+1205966071986042)*3^(1/2)+679898137070880*ln(2)^2+(226632712356960*Pi+312407551347024)*ln(2)+18886059363080*Pi^2+52067925224504*Pi-2088794509063308)*2^(1/2)+(555134504241240*ln(2)^2+(185044834747080*Pi+255079697449248)*ln(2)+15420402895590*Pi^2+42513282908208*Pi-1705493574764511)*3^(1/2)-961521166477872*ln(2)^2+(-320507055492624*Pi-441810996102672)*ln(2)-26708921291052*Pi^2-73635166017112*Pi+2954001523727854)^(1/2)*(5*2^(1/2)-7)*(-5+3*3^(1/2))/((70*2^(1/2)-99)*(15*3^(1/2)-26)*(-2+3^(1/2))*(4*3^(1/2)-7)*(12*2^(1/2)-17)*(2*2^(1/2)-3))

(4)

evalf(stdE)

7031348.295

(5)
 

NULL

Download StdE.mw

Hello,

I’m currently a student working with vectors as part of my electrical AC calculations. Up until now, I’ve been using GeoGebra to add and plot vectors, but I’m trying to transition fully to Maple, since I already use it for everything else in my studies.

All of my assignments are either given in — or require answers in — polar form (magnitude and angle), so I would really like to work directly in polar coordinates without converting everything to Cartesian and back.

I’ve already tried to figure this out on my own, but so far, I’ve only been able to make it work using Cartesian notation. I’ve attached a PDF with a typical example of the kind of tasks I work on, in case that helps clarify my needs.

Could you guide me on how to best set up and work with polar vectors in Maple — including how to define, add, and plot them directly in polar notation?

Vector_Help.pdf

Thanks in advance for your help!

Best regards,
Mads Bach Nielsen

- Yes this was written with the help of Chat GPT

why this error is getting. but in the published paper for the same parameter it is converging. what is the mistake in this worksheet please rectify it in sachin_base_paper.mw

Maple 2024 had a very well defined "Stop Execution" symbol on the desktop.  

Maple 2025 doesn't have an obvious symbol somewhere.  Also, the two little "dots" that I once had in the lower left bottom in Maple 2025 have disappeared! There is only a bar at the bottom which seems to do nothing.

i need a way for making my loop working fast, i need something for calculating such term fast without showing result but thus term make a lot of time for coming out ?

fasting.mw

I want to substitute equation to equation, how?

Download r.mw

Someone should please help me compute the left and right eigenvectors of the system below. The purpose is to compute values for 'a' and 'b' in the bifurcation formula.

Thank you

``

with(VectorCalculus)

 

(1)

interface(imaginaryunit = I)

I

(2)

I

I

(3)
 

diff(S(t), t) := `&Lambda;__p`-(`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&theta;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`/N[p]+µ__C)*S+`&omega;__B`*I__B

Lambda__p-(`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&theta;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`/N[p]+µ__C)*S+omega__B*I__B

(4)

diff(I__B(t), t) := `#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&theta;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`*S/N[p]-`&omega;__B`*I__B-(`&sigma;__B`+µ__C)*I__B

`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&theta;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`*S/N[p]-omega__B*I__B-(sigma__B+µ__C)*I__B

(5)

NULL

``

(6)

diff(S__A(t), t) := `&Lambda;__A`-(µ__A+`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&alpha;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`/N[p])*S__A+`&delta;__A`*I__A

Lambda__A-(µ__A+`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&alpha;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`/N[p])*S__A+delta__A*I__A

(7)

diff(I__A(t), t) := `#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&alpha;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`*S__A/N[p]-(µ__A+`&delta;__A`)*I__A

`#mrow(mi("&varphi;",fontstyle = "normal"),mo("&sdot;"),msub(mi("&alpha;",fontstyle = "normal"),mi("B")),mo("&sdot;"),msub(mi("I"),mi("B")))`*S__A/N[p]-(µ__A+delta__A)*I__A

(8)

NULL

``

(9)

Download CBD2.mw

Hi,

I’m trying to remove the parentheses (for the dᵢ values) to achieve optimal display. Ideas ? Thanks

S4_Droites_Implicite.mw

A colleage asked me for the solution of an elementary boundary value problem for an ODE that models the steady-state temperature distribution in a nonhomogeneous rod.  I solved it in Maple and passed the solution on to her without checking the result.  She struggled for a day or two, attempting to "debug" her finite element code whose result was not agreeing with Maple's.

Upon closer inspection, it turned out that her code was correct and the solution returned by Maple was not.  Here are the details.  I can't tell whether Maple's dsolve can be improved to provide correct solutions to this and similar problems.

Problem with dsolve()

restart;

kernelopts(version);

`Maple 2025.0, X86 64 LINUX, Mar 24 2025, Build ID 1909157`

A boundary value problem for an ODE

 

Let's solve the following boundary value problem:

de := Diff(a(x)*Diff(u(x),x),x) = -1;

Diff(a(x)*(Diff(u(x), x)), x) = -1

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

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

Maple's dsolve() fails to find a solution:

dsolve({de,bc});

 

Solution obtained by hand

 

The solution may be obtained by hand, as follows.

 

Integrate the DE once

a(x)*(diff(u(x), x)) = c-x.

where c is the integration constant.  Therefore

diff(u(x), x) = (c-x)/a(x) and (c-x)/a(x) = c/a(x)-x/a(x).

To determine the value of the constant c, integrate the above over [-1, 1]

and apply the boundary conditions:

c*(int(1/a(x), x = -1 .. 1))+int(x/a(x), x = -1 .. 1) = u(1)-u(-1) and u(1)-u(-1) = 0

whence
c = (int(x/a(x), x = -1 .. 1))/(int(1/a(x), x = -1 .. 1)).

Having thus determined c, we integrate the expression for diff(u(x), x) obtained above, and arrive at the solution
u(x) = int((c-xi)/a(xi), xi = -1 .. x).

Remark: The solution obtained here is valid for any a(x) as long as

the integrals encountered above make sense.  Note that there is
no requirement on the differentiability or even continuity of a(x).

Technically, a(x) can be any function such that 1/a(x) is integrable.

 

 

Wrong solution returned by dsolve()

 

Let us consider a special choice of the coefficient a(x):

a := x -> 1 + 2*Heaviside(x);

proc (x) options operator, arrow; 1+2*Heaviside(x) end proc

According the the calculations above, we have:

c := int(x/a(x),x=-1..1) / int(1/a(x),x=-1..1) ;

-1/4

and therefore the correct solution is

int((c-xi)/a(xi), xi=-1..x):
sol := u(x) = collect(%, Heaviside);

u(x) = ((1/6)*x+(1/3)*x^2)*Heaviside(x)-(1/4)*x-(1/2)*x^2+1/4

Here is what the solution looks like:

plot(rhs(sol), x=-1..1, color=blue, thickness=3);

Let's attempt to solve the same boundary value problem with Maple's dsolve().

dsolve({de,bc}):
bad_sol := collect(%, Heaviside);

u(x) = ((1/3)*x^2+x/(3*exp(-2)+3)-exp(-2)*x/(3*exp(-2)+3))*Heaviside(x)-(1/2)*x^2-x/(3*exp(-2)+3)+(3*exp(-2)+1)/(6*exp(-2)+6)

That's very different from the correct solution obtained above.   To see the problem with it, let's recall that according to the DE, the expression a(x)*(diff(u(x), x))NULLshould evaluate to  c-x for some constant c,  but what we get through bad_sol is nothing like c-x;  in fact, it's not even continuous:

a(x)*diff(rhs(bad_sol), x):
collect(%, Heaviside, simplify);
plot(%, x = -0.5 .. 0.5);

((4*x-2)*exp(-2)+4*x+2)*Heaviside(x)^2/(3*exp(-2)+3)+(-(4/3)*x-1/3)*Heaviside(x)-x-1/(3*exp(-2)+3)

It appears that dsolve goes astray by attempting to expand the expression diff(a(x)*(diff(u(x), x)), x).   It shouldn't.

 

 

Download dsolve-bug.mw

 

2 3 4 5 6 7 8 Last Page 4 of 2424