nm

12253 Reputation

20 Badges

13 years, 268 days

MaplePrimes Activity


These are questions asked by nm

Maple 2026 and Maple 2025.2

Is this a bug in limit? or as designed?

Doing 

limit(sol,[_C3 = 0, _C4 = 0])

Gives internal error. But

limit(sol,_C3 = 0);
limit(%,_C4 = 0);

works and no error.

Worksheet below. I've had problems before with multilimit. I think I need to change my code to do limit one by one from now on.

interface(version);

`Standard Worksheet Interface, Maple 2026.0, Windows 10, March 05 2026 Build ID 2001916`

restart;

sol:=(piecewise(t <= 0,0,t <= Pi,(arctan(tan(t))*cos(t)*_C3*_C4+arctan(tan(t))*sin(t)*_C4^2-cos(t)*_C3*_C4*t+sin(t)*_C3^2*t)/(_C3*cos(t)+_C4*sin(t)),Pi < t,Pi*_C3*(tan(t)*_C3-_C4)/(tan(t)*_C4+_C3))+2*_C3^2+2*_C4^2)*(_C3*cos(t)+_C4*sin(t))/(2*_C3^2+2*_C4^2)

sol := (piecewise(t <= 0, 0, t <= Pi, (arctan(tan(t))*cos(t)*_C3*_C4+arctan(tan(t))*sin(t)*_C4^2-cos(t)*_C3*_C4*t+sin(t)*_C3^2*t)/(cos(t)*_C3+_C4*sin(t)), Pi < t, Pi*_C3*(tan(t)*_C3-_C4)/(tan(t)*_C4+_C3))+2*_C3^2+2*_C4^2)*(cos(t)*_C3+_C4*sin(t))/(2*_C3^2+2*_C4^2)

limit(sol,[_C3 = 0, _C4 = 0])

Error, (in limit/multi/ldegree1) invalid input: limit/multi/ReIm expects its 1st argument, f, to be of type polynom, but received _DIR1*cos(t)+_DIR2*sin(t)

limit(sol,_C3 = 0)

piecewise(t <= 0, _C4*sin(t), t <= Pi, (1/2)*arctan(tan(t))*sin(t)+_C4*sin(t), _C4*sin(t))

limit(%,_C4 = 0)

piecewise(t <= 0, 0, t <= Pi, (1/2)*arctan(tan(t))*sin(t), 0)

 

 

Download limit_problem_april_2_2026.mw

Currently I generate unique local symbol inside a proc to use for intergation dummy variable. And need to make sure this symbol is not already used somewhere else in other proc. (so all symbols display different)

So I use this code

`tools/genglobal`[1](tau, 1, :-reset);
z:=`tools/genglobal`(tau);
z:=`tools/genglobal`(tau);

Which works ok, except that the symbols generated do not display nice in Latex.  Instead of  

which when rendered in latex look like this 

Which is bad as you see.  It looked like tau is being multiplied by a number.

I'd like to get the generated symbols to be  tau__1 and tau__2 instead of tau1 and tau2 and so on. Which will now display much nicer.

Is there a way in Maple to still use `tools/genglobal`(...); but generate subscripted unique symbols, where only the subscript number changes like the above.

Not able to find what syntax to use. Also not able to find any help pages on tools/genglobal.

If there is no way, I can make a global  N counter and use that to increment it and append it to a local variable, something like

 

foo:=proc()
   local z:=convert( cat("tau__",N), '`local`');
   z;
end proc;

THen call it as

But would prefer to use `tools/genglobal` if possible.

Any other suggestions?

Maple 2026

Maple 2026 and 2025

What option to use to make PDEtools:-Solve show all solutions, even double/duplicate ones? I am not able to find it using AI or help.

restart;

eq:=x^2+2*x+1=0;
solve(eq,{x})

x^2+2*x+1 = 0

{x = -1}, {x = -1}

PDEtools:-Solve(eq,x,'allsolutions')

x = -1

_EnvAllSolutions := true:
PDEtools:-Solve(eq,x);

x = -1

 

 

Download PDEtools_solve_march_28_2026.mw

Not able to make odetest give zero on this Maple solution to this first order ode.

So not sure if solution is correct or not, as can't also get same solution by hand.

Any one can find a method or way to verify this solution is correct?

odetest says it satisfies the IC but not the ode itself.

Below is worksheet. Tried with Maple 2026 and 2025.2 both give same solution.

Site will not let me upload worksheet. Here is code

ode:=diff(diff(y(x),x),x)+sin(y(x)) = 0;
IC:=y(infinity) = Pi;
sol:=[dsolve([ode,IC])];

the_residue:=odetest(sol[1],[ode,IC]);
the_residue:=odetest(sol[2],[ode,IC]);

Tried many things, including different assumptions, but can't get zero.

 

I need to plot this piecewise function

Maple plots it correctly but its sampling seems to use the points between and hence it also shows vertical asymptotes, like this

Is there a way to tell plot not to show the vertical asymtotes? These should not show. Here is the same exact function in Mathematica, and this is what I want in Maple

f[x_] := Piecewise[{
   {2*x - Tan[x], -7/4*Pi < x < -3/2*Pi},
   {2*x - Tan[x], -3/2*Pi < x < -5/4*Pi},
   {2*x - Tan[x], -3/4*Pi < x < -1/2*Pi},
   {2*x - Tan[x], -1/2*Pi < x < -1/4*Pi},
   {2*x - Tan[x], 1/4*Pi < x < 1/2*Pi},
   {2*x - Tan[x], 1/2*Pi < x < 3/4*Pi},
   {2*x - Tan[x], 5/4*Pi < x < 3/2*Pi},
   {2*x - Tan[x], 3/2*Pi < x < 7/4*Pi},
   {True, None}}]

Plot[f[x], {x, -2 Pi, 2 Pi}]

 

Here is Maple worksheet with all the maple code. I tried adding 'adaptive'=true,'discont'=true but these made no difference.

f_decreasing := x -> piecewise(-7/4*Pi < x and x < -3/2*Pi, 2*x - tan(x), -3/2*Pi < x and x < -5/4*Pi, 2*x - tan(x), -3/4*Pi < x and x < -1/2*Pi, 2*x - tan(x), -1/2*Pi < x and x < -1/4*Pi, 2*x - tan(x), 1/4*Pi < x and x < 1/2*Pi, 2*x - tan(x), 1/2*Pi < x and x < 3/4*Pi, 2*x - tan(x), 5/4*Pi < x and x < 3/2*Pi, 2*x - tan(x), 3/2*Pi < x and x < 7/4*Pi, 2*x - tan(x),true,[])

f_decreasing := proc (x) options operator, arrow; piecewise(-(7/4)*Pi < x and x < -(3/2)*Pi, 2*x-tan(x), -(3/2)*Pi < x and x < -(5/4)*Pi, 2*x-tan(x), -(3/4)*Pi < x and x < -(1/2)*Pi, 2*x-tan(x), -(1/2)*Pi < x and x < -(1/4)*Pi, 2*x-tan(x), (1/4)*Pi < x and x < (1/2)*Pi, 2*x-tan(x), (1/2)*Pi < x and x < (3/4)*Pi, 2*x-tan(x), (5/4)*Pi < x and x < (3/2)*Pi, 2*x-tan(x), (3/2)*Pi < x and x < (7/4)*Pi, 2*x-tan(x), true, []) end proc

plot(f_decreasing(x),x=-2*Pi..2*Pi,'adaptive'=true,'discont'=true,'color'="blue");

 

 

Download plot_piecewise_march_25_2026.mw

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