MaplePrimes Questions

Maple can solve this second order linear non homogeneous ode,  but DEtools:-particularsol() not able to find the particular solution.

Any one would know why? Should it have been to find it since dsolve can? 

restart;

ode:=diff(y(x),x$2)-6*diff(y(x),x)+8*y(x)=sqrt(x);

diff(diff(y(x), x), x)-6*(diff(y(x), x))+8*y(x) = x^(1/2)

p:=DEtools:-particularsol(ode,y(x))

sol:=dsolve(ode);

y(x) = (1/2)*exp(4*x)*c__1+(1/32)*Pi^(1/2)*exp(4*x)*erf(2*x^(1/2))-(1/16)*exp(2*x)*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*x^(1/2))+(1/8)*x^(1/2)+exp(2*x)*c__2

sol:=dsolve(ode,useInt);

y(x) = (Int(exp(2*x)*(Int(x^(1/2)/(exp(2*x))^2, x))+exp(2*x)*c__1, x)+c__2)*exp(2*x)

 

 

Download why_can_not_find_yp_april_1_2026.mw

update

I think I remembered now something.

What Maple calls "particular sol" is different from what we use at school, where general solution = y_h + y_p. here y_p is the "normal" particular solution used in textbooks. Maple's definition of particular sol is different.

So for a work around, I just use varparm from now on and it gives me what I wanted:

restart;

RHS:=sqrt(x);
ode:=diff(y(x),x$2)-6*diff(y(x),x)+8*y(x)=0;
basis:=dsolve(ode, y(x), output=basis);

x^(1/2)

diff(diff(y(x), x), x)-6*(diff(y(x), x))+8*y(x) = 0

[exp(4*x), exp(2*x)]

p:=DEtools:-varparam(basis,sqrt(x),x,true): #use the basis solutions from y_h

print("particular solution is ", p)

"particular solution is ", -(1/16)*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*x^(1/2))*exp(2*x)+(1/32)*Pi^(1/2)*erf(2*x^(1/2))*exp(4*x)+(1/8)*x^(1/2)

 

 

Download why_can_not_find_yp_april_1_2026_V2.mw

ps. it will be really nice if the above command would also support useInt. This way it makes it more easy to see the particular solution integrals used before they are evaluated. But now this command does not accept useInt.

 

Dear MaplePrimes Community,

With the rapid advancement of technology, it has become increasingly important to improve our workflows and reduce repetitive manual tasks. In my research, I frequently use Maple to solve  PDEs and obtain analytical solutions. However, one major difficulty I face is the time-consuming process of manually converting each result into LaTeX format.

In many cases, Maple produces multiple solutions, and I must copy and convert each one individually into LaTeX. This process is tedious, inefficient, and prone to formatting errors.

Therefore, I would like to ask:

Is it possible to establish an automated link or workflow between Maple and LaTeX such that, after solving a problem in Maple, all resulting expressions are automatically exported and inserted into a LaTeX document in the desired format and location?

Ideally, I am looking for a system where:

  • Maple solutions are automatically converted into LaTeX code,

  • The equations are directly placed into a specified LaTeX file or section,

  • The process works for multiple solutions without manual intervention.

Furthermore, if such integration is possible, can this idea be extended to connect Maple with multiple tools (for example, Maple → LaTeX → plotting or document-generation systems), creating a more advanced automated workflow?

I would greatly appreciate any guidance, examples, or best practices for implementing such a system.

Thank you very much for your help.

Hi,

For pedagogical purposes, I am looking for a dynamic way to visualize the link between matrices and rotations in IR^3, for example through the rotation of a cube around the coordinate axes, as in the attached image.

My main goal is to help students better understand how the matrix acts geometrically in space through a clear dynamic representation.

If you have ideas, examples, or Maple approaches that could help illustrate this dynamically, I would be very grateful.

Many thanks in advance for your insight.

Question_R^3.mw

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

I am asking because I could neither find a type nor a property for nonzero integers. However, with the assume facility it is possible to combine properties 

assume(x<>0,x::integer)
about(x)
Originally x, renamed x~:
  is assumed to be: AndProp(integer,OrProp(RealRange(-infinity,Open(0)),RealRange(Open(0),infinity)))

Or:

restart;
assume(x::Non(0),x::integer)
about(x)
Originally x, renamed x~:
  is assumed to be: AndProp(integer,OrProp(RealRange(-infinity,Open(0)),RealRange(Open(0),infinity)))

Or:

assume(x::NonZero,x::integer)
about(x)
Originally x, renamed x~:
  is assumed to be: AndProp(integer,OrProp(RealRange(-infinity,Open(0)),RealRange(Open(0),infinity)))

Non(0) is also accepted by the type command which raises the question whether Non(0) is a property, a type or both.

On the other hand type does not recognise NonZero but "::NonZero" is accepted in the assume command (note the :: which is the operator for type definitions). 

The function Non, which is also listed under types, is also accepted in the context of properties. This is somewhat confusing since types and properties are different in nature. Can somone clarify?

By the way, the above examples also work when Non is replaced with Not because they are equivalent. However showstat(Non) works but showstat(Not) throws an error.

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 have a example overloaded procdeure below. Due to '=' the optional input in the 2nd proc gets trapped in the 1st proc. I have tried various ways to get around this. Obviously I could make the  optional input in the 2nd proc non-optional if all else fails. Is there a way around this?

restart

Test:=overload([
proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
l2::{`+`,`*`,`=`, `symbol`,procedure,not(list)} ) #need to detect if 'point' is present

option overload;
if not(has([_params[2]],point)) then #if true need to go the next proc

print("1st proc ",l1," ",l2);
return
end if;
end proc,

proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
{point::list:=NULL}) #oprional input

print("2nd proc",l1,"point",point);

end proc
]):

 

l:=3*x+4*y-5;
h:=4*x-8*y = 5;
P:=[3,5]

3*x+4*y-5

 

4*x-8*y = 5

 

[3, 5]

(1)

Test(l,h)

 

"1st proc ", 3*x+4*y-5, " ", 4*x-8*y = 5

(2)

Test(l,point=P)

 

Test(h,point=[2,7])

 

 

Download 2026-02-28_Q_Test_proc_Line_point_inputs.mw

Hello :)

I am totally lost with ( I guess) the LREtools package.

See the ws.

The two integer sequences come from the OEIS.

I don't understand why i have a FAILED result.

intseq := [0, 1, 4, 2, 131, 129, 3, 5, 16, 14, 12, 10, 8, 6, 31, 29, 27, 25, 23, 99734, 7, 9, 11, 13, 15, 17, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 111, 22, 20, 18, 28, 30, 32, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196]

[0, 1, 4, 2, 131, 129, 3, 5, 16, 14, 12, 10, 8, 6, 31, 29, 27, 25, 23, 99734, 7, 9, 11, 13, 15, 17, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 111, 22, 20, 18, 28, 30, 32, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196]

(1)

rec := LREtools:-GuessRecurrence(intseq, q(n))

FAIL

(2)

soln := rsolve(rec, q)

Error, (in rsolve/single) Equations do not involve function q()

 

restart

NULL

intseq := [0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155]

[0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155]

(3)

rec := LREtools:-GuessRecurrence(intseq, q(n))

FAIL

(4)

NULL

restart

with(LREtools)

intseq := [0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155]

[0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155]

(5)

NULL

rec := GuessRecurrence(intseq, q(n))

FAIL

(6)

NULL

NULL Thank you everyone.

Jean-Michel

Download rsolve_and_LREtools.mw

In the Maple dock i am having problems finding the explicit value for x, for my equation. I need it, to find the value for r later.

so i will be kindly asking for Maple wizards to help me.

i thank of you in advance for your help, any comment is appreciated.

Hi,

I am trying to correct this question for my students, but I would like to include a pedagogical graphical illustration to support the idea that, for the area of triangle BCS to be minimal, the height (SM) — where M is the midpoint of [BC]— must be perpendicular to the plane Π at point S.

The code provided in the appendix does not clearly convey this idea.

Any ideas or suggestions would be very welcome.

Thanks

bac23IllustrationEspace.mw

Hello Ladies and Gents :)

x^Pi=Pi^x

Maple returns two reals solutions :

solve(Pi^x = x^Pi, x);
                               /  ln(Pi)\    
                    Pi LambertW|- ------|    
                               \    Pi  /    
                  - ---------------------, Pi
                           ln(Pi)            

evalf(%);
              2.382179087993016, 3.141592653589793

ouf Pi is a solution :)

but Mathematica returns 3 solutions : 2 reals and 1 complex :

see the attached pdf.

Is there a way to force Maple to return these 3 solutions?

thank you.

Jean-Michel

Hello everyone, I am trying to reproduce Equation (25) from the paper by E. Yomba (Chaos, Solitons and Fractals, 2006) using Maple, where the improved extended algebraic Fan method is applied to the (2+1)-dimensional Broer–Kaup–Kupershmidt (BKK) system. Starting from the system in Eq. (23) and the ansatz given in Eq. (24), together with the auxiliary equation (Eq. (3)), the paper states that substituting these expressions and setting coefficients of powers of G(ξ) to zero leads to an overdetermined system whose solution yields Eq. (25). My difficulty is implementing this process in Maple: specifically, how to correctly substitute the ansatz into the PDE system, expand and collect terms with respect to G(ξ) and its derivatives, systematically extract the resulting algebraic/PDE system, and solve it efficiently (possibly using packages like PDEtools). I would appreciate guidance or example workflows for performing this type of symbolic derivation in Maple.

F1.mw

I am trying to set the default Cartesian and Parametric variables to set them golbally or locally in a command..

How do I achieve this? 

restart

interface(version)

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

(1)

TM := module () local Cartvars, Parmvars; export Cartline, Parmline; global x, y, z;  Cartvars := [x, y, z]; Parmvars := [alpha, beta, rho]; Cartline := proc (p1::list, p2::list, { vars := Cartvars }) local l; global Cartvars; l := (p2[2]-p1[2])*vars[1]+(p1[1]-p2[1])*vars[2]-p2[2]*p1[1]+p1[2]*p2[1]; return l end proc; Parmline := proc (p1::list, p2::list, { varp := Parmvars }) local l; global Parmvars; l := `~`[`+`](p1, varp[1]*`<,>`(p2-p1)); return l end proc end module

TM:-Cartline([4, 3], [-8, 4])

Cartvars[1]+12*Cartvars[2]-40

(2)

TM:-Cartline([4, 3], [-8, 4], vars = [x, y])

x+12*y-40

(3)

NULL

TM:-Parmline([4, 3], [-8, 4])

Vector[column](%id = 36893490963638479436)

(4)

TM:-Parmline([4, 3], [-8, 4], varp = [alpha])

Vector[column](%id = 36893490963638469564)

(5)

NULL

Download 2026-03-26_Q_Module_Generic_Variables.mw

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

when getting sequence of RealRange, I'd like to convert this to normal list. Currently I have to use map twice on the result, but I think there should be simpler way.

Below is what I do. I was wondering if there is a better way in Maple to do this, may be a built in command?

Basically, if the input is

RealRange(-2*Pi,Open(-7/4*Pi)), RealRange(Open(-5/4*Pi),Open(-3/4*Pi)), 
RealRange(Open(-1/4*Pi),Open(1/4*Pi)), RealRange(Open(3/4*Pi),Open(5/4*Pi)), 
RealRange(Open(7/4*Pi),2*Pi)

I want to change the above to normal list like this (without any Open, etc.. in it) to make it easier to post process (say for plotting and so on)

[[-2*Pi, -7/4*Pi], [-5/4*Pi, -3/4*Pi], [-1/4*Pi, 1/4*Pi], [3/4*Pi, 5/4*Pi], [7/4*Pi, 2*Pi]]

This is what I do now on an example that generates sequence of RealRange

restart;

f:=x->2*x-tan(x);
the_intervals:=solve(diff(f(x),x)>0 and x>=-2*Pi and x<= 2*Pi,x);

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

RealRange(-2*Pi, Open(-(7/4)*Pi)), RealRange(Open(-(5/4)*Pi), Open(-(3/4)*Pi)), RealRange(Open(-(1/4)*Pi), Open((1/4)*Pi)), RealRange(Open((3/4)*Pi), Open((5/4)*Pi)), RealRange(Open((7/4)*Pi), 2*Pi)

lprint(the_intervals);

RealRange(-2*Pi,Open(-7/4*Pi)), RealRange(Open(-5/4*Pi),Open(-3/4*Pi)),
RealRange(Open(-1/4*Pi),Open(1/4*Pi)), RealRange(Open(3/4*Pi),Open(5/4*Pi)),
RealRange(Open(7/4*Pi),2*Pi)

map(X->convert(X,list),[the_intervals]);
map(X1->map(X2->`if`(has(X2,Open),op(X2),X2),X1),%);

[[-2*Pi, Open(-(7/4)*Pi)], [Open(-(5/4)*Pi), Open(-(3/4)*Pi)], [Open(-(1/4)*Pi), Open((1/4)*Pi)], [Open((3/4)*Pi), Open((5/4)*Pi)], [Open((7/4)*Pi), 2*Pi]]

[[-2*Pi, -(7/4)*Pi], [-(5/4)*Pi, -(3/4)*Pi], [-(1/4)*Pi, (1/4)*Pi], [(3/4)*Pi, (5/4)*Pi], [(7/4)*Pi, 2*Pi]]

lprint(%);

[[-2*Pi, -7/4*Pi], [-5/4*Pi, -3/4*Pi], [-1/4*Pi, 1/4*Pi], [3/4*Pi, 5/4*Pi], [7/
4*Pi, 2*Pi]]

 

 

Download convert_realrange_to_list.mw

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