nm

11483 Reputation

20 Badges

13 years, 82 days

MaplePrimes Activity


These are questions asked by nm

Never seen such a message before

Here is MWE, Trace shows it comes from (SolveTools:-PolynomialSystemSolvers:-PseudoResultant:-AttemptFactorization,2)

 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

ode:=diff(y(x),x$2)+3*y(x)+D(y)(3)=0;
IC:=y(1)+4*y(2)+y(4)=0;

diff(diff(y(x), x), x)+3*y(x)+(D(y))(3) = 0

y(1)+4*y(2)+y(4) = 0

dsolve(ode)

x+(1/3)*3^(1/2)*(tan(3^(1/2)*x)-arctan(tan(3^(1/2)*x)))-((1/3)*(D(y(x)))(3)*(1+tan(3^(1/2)*x)^2)^(1/2)+(1+tan(3^(1/2)*x)^2)^(1/2)*y(x))*c__1-c__2 = 0

dsolve([ode,IC])

Error, (in dsolve) this is a bug

tracelast

 dsolve called with arguments: [diff(diff(y(x), x), x)+3*y(x)+(D(y))(3) = 0, y(1)+4*y(2)+y(4) = 0], arbitraryconstants = subscripted, atomizenames = true, build = false, numeric = false, type = none
 #(dsolve,80): error

 \`dsolve/IC\` called with arguments: [diff(diff(y(x), x), x)+3*y(x)+(D(y))(3) = 0, y(1)+4*y(2)+y(4) = 0], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = particular and general
 #(\`dsolve/IC\`,53): return procname(_passed,':-usesolutions' =  "general and particular")

 \`dsolve/IC\` called with arguments: [diff(diff(y(x), x), x)+3*y(x)+(D(y))(3) = 0, y(1)+4*y(2)+y(4) = 0], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = general and particular
 #(\`dsolve/IC\`,57): ans := procname(_passed,':-usesolutions = "general"');

 \`dsolve/IC\` called with arguments: [diff(diff(y(x), x), x)+3*y(x)+(D(y))(3) = 0, y(1)+4*y(2)+y(4) = 0], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = general
 #(\`dsolve/IC\`,277): zz := map(op,{\`dsolve/IC/_C\`({ANS[i]},funcs,x,ics)});

 \`dsolve/IC/_C\` called with arguments: {y(x) = -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(3^(1/2)*x)^2)^(1/2)-3^(1/2)*tan(3^(1/2)*x)+3^(1/2)*arctan(tan(3^(1/2)*x))+3*_C[2]-3*x)/((1+tan(3^(1/2)*x)^2)^(1/2)*_C[1])}, {y(x)}, x, [y(1) = _C1, y(2) = _C2, y(4) = -_C1-4*_C2]
 #(\`dsolve/IC/_C\`,1): ans := \`dsolve/IC/_C/do\`(solns,depvars,t,inits,'evaluated_ans', "default",':-giveup = giveup');

 \`dsolve/IC/_C/do\` called with arguments: {y(x) = -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(3^(1/2)*x)^2)^(1/2)-3^(1/2)*tan(3^(1/2)*x)+3^(1/2)*arctan(tan(3^(1/2)*x))+3*_C[2]-3*x)/((1+tan(3^(1/2)*x)^2)^(1/2)*_C[1])}, {y(x)}, x, [y(1) = _C1, y(2) = _C2, y(4) = -_C1-4*_C2], evaluated_ans, default, giveup = giveup, usecansolve = false
 #(\`dsolve/IC/_C/do\`,103): csol := [\`ODEtools/Solve/EnvDropMultiplicity\`(eqns,consts)];

 \`ODEtools/Solve/EnvDropMultiplicity\` called with arguments: {-(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(3^(1/2))^2)^(1/2)-3^(1/2)*tan(3^(1/2))+3^(1/2)*(3^(1/2)-Pi)+3*_C[2]-3)/((1+tan(3^(1/2))^2)^(1/2)*_C[1]) = _C1, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(2*3^(1/2))^2)^(1/2)-3^(1/2)*tan(2*3^(1/2))+3^(1/2)*(2*3^(1/2)-Pi)+3*_C[2]-6)/((1+tan(2*3^(1/2))^2)^(1/2)*_C[1]) = _C2, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(4*3^(1/2))^2)^(1/2)-3^(1/2)*tan(4*3^(1/2))+3^(1/2)*(4*3^(1/2)-2*Pi)+3*_C[2]-12)/((1+tan(4*3^(1/2))^2)^(1/2)*_C[1]) = -_C1-4*_C2}, {_C1, _C2, _C[1], _C[2]}, keepalreadysolveduntouched = false, removelabel = false
 #(\`ODEtools/Solve/EnvDropMultiplicity\`,29): sol := :-solve(ee,X,_rest)

 solve called with arguments: {-(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(3^(1/2))^2)^(1/2)-3^(1/2)*tan(3^(1/2))+3^(1/2)*(3^(1/2)-Pi)+3*_C[2]-3)/((1+tan(3^(1/2))^2)^(1/2)*_C[1]) = _C1, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(2*3^(1/2))^2)^(1/2)-3^(1/2)*tan(2*3^(1/2))+3^(1/2)*(2*3^(1/2)-Pi)+3*_C[2]-6)/((1+tan(2*3^(1/2))^2)^(1/2)*_C[1]) = _C2, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(4*3^(1/2))^2)^(1/2)-3^(1/2)*tan(4*3^(1/2))+3^(1/2)*(4*3^(1/2)-2*Pi)+3*_C[2]-12)/((1+tan(4*3^(1/2))^2)^(1/2)*_C[1]) = -_C1-4*_C2}, {_C1, _C2, _C[1], _C[2]}, AllSolutions = FAIL, ConditionalSolutions = FAIL, DropMultiplicity = FAIL, Explicit = FAIL, MaxSols = FAIL, SolveOverReals = FAIL, SymbolicSolutions = true, TryHard = FAIL, UseAssumptions = false, domain = default, parameters = {}, parametric = false, split = false, useunits = FAIL
 #(solve,133): _MaxSols := oldmaxsols

 Engine:-Main called with arguments: {-(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(3^(1/2))^2)^(1/2)-3^(1/2)*tan(3^(1/2))+3^(1/2)*(3^(1/2)-Pi)+3*_C[2]-3)/((1+tan(3^(1/2))^2)^(1/2)*_C[1]) = _C1, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(2*3^(1/2))^2)^(1/2)-3^(1/2)*tan(2*3^(1/2))+3^(1/2)*(2*3^(1/2)-Pi)+3*_C[2]-6)/((1+tan(2*3^(1/2))^2)^(1/2)*_C[1]) = _C2, -(1/3)*(_C[1]*(D(_Z))(3)*(1+tan(4*3^(1/2))^2)^(1/2)-3^(1/2)*tan(4*3^(1/2))+3^(1/2)*(4*3^(1/2)-2*Pi)+3*_C[2]-12)/((1+tan(4*3^(1/2))^2)^(1/2)*_C[1]) = -_C1-4*_C2}, {}, {_C1, _C2, _C[1], _C[2]}
 #(SolveTools:-Engine:-Main,37): sol := [SolveTools:-PolynomialSystem(eqns,vars,ineqs,':- maxsols' = \`if\`(type([_MaxSols],[{integer, infinity}]) and 0 < _MaxSols,_MaxSols,100))]

 PolynomialSystem:-ModuleApply called with arguments: {-(1/3)*(_X000003*(D(_Z))(3)*(1+tan(3^(1/2))^2)^(1/2)-3^(1/2)*tan(3^(1/2))+3^(1/2)*(3^(1/2)-Pi)+3*_X000004-3)/((1+tan(3^(1/2))^2)^(1/2)*_X000003) = _X000001, -(1/3)*(_X000003*(D(_Z))(3)*(1+tan(2*3^(1/2))^2)^(1/2)-3^(1/2)*tan(2*3^(1/2))+3^(1/2)*(2*3^(1/2)-Pi)+3*_X000004-6)/((1+tan(2*3^(1/2))^2)^(1/2)*_X000003) = _X000002, -(1/3)*(_X000003*(D(_Z))(3)*(1+tan(4*3^(1/2))^2)^(1/2)-3^(1/2)*tan(4*3^(1/2))+3^(1/2)*(4*3^(1/2)-2*Pi)+3*_X000004-12)/((1+tan(4*3^(1/2))^2)^(1/2)*_X000003) = -_X000001-4*_X000002}, {_X000001, _X000002, _X000003, _X000004}, {}, FAIL, backsubstitute = true, domain = absolute, engine = default, explicit = false, maxsols = 100, preprocess = true, preservelabels = false, tryhard = true
 #(SolveTools:-PolynomialSystem:-ModuleApply,15): sol := SolveTools:-PolynomialSystem:-Main(SolveTools:-Utilities:-New( equations,notz,SolveTools:-Utilities:-Intersect(vars,indets(equations ))),':-backsub' = reallybacksub,':-domain' = domain,':-maxsols' =  realmaxsols,':-engine' = engine,':-preprocess' = preprocess,':- tryhard' = tryhard);

 PolynomialSystem:-Main called with arguments: [{-(1/3)*(_X000003*(D(_Z))(3)*(1+tan(3^(1/2))^2)^(1/2)-3^(1/2)*tan(3^(1/2))+3^(1/2)*(3^(1/2)-Pi)+3*_X000004-3)/((1+tan(3^(1/2))^2)^(1/2)*_X000003)-_X000001, -(1/3)*(_X000003*(D(_Z))(3)*(1+tan(2*3^(1/2))^2)^(1/2)-3^(1/2)*tan(2*3^(1/2))+3^(1/2)*(2*3^(1/2)-Pi)+3*_X000004-6)/((1+tan(2*3^(1/2))^2)^(1/2)*_X000003)-_X000002, -(1/3)*(_X000003*(D(_Z))(3)*(1+tan(4*3^(1/2))^2)^(1/2)-3^(1/2)*tan(4*3^(1/2))+3^(1/2)*(4*3^(1/2)-2*Pi)+3*_X000004-12)/((1+tan(4*3^(1/2))^2)^(1/2)*_X000003)+_X000001+4*_X000002}, {3*(1+tan(3^(1/2))^2)^(1/2)*_X000003 <> 0, 3*(1+tan(2*3^(1/2))^2)^(1/2)*_X000003 <> 0, 3*(1+tan(4*3^(1/2))^2)^(1/2)*_X000003 <> 0}, {_X000001, _X000002, _X000003, _X000004}, {}, true, false, 1, {_X000001, _X000002, _X000003, _X000004}], backsub = true, domain = absolute, engine = default, maxsols = 100, preprocess = true, tryhard = true
 #(SolveTools:-PolynomialSystem:-Main,86): sol := [SolveTools:-PolynomialSystemSolvers:- PseudoResultant(SolveTools:-Utilities:- GetEquations(sys),SolveTools:-Utilities:- GetVariables(sys),SolveTools:-Utilities:- GetInequations(sys),':-maxsols' = maxsols,':- tryhard' = tryhard)];

 PseudoResultant:-ModuleApply called with arguments: {(_X000003*(D(_Z))(3)*(-2*cos(3^(1/2))+1+sec(3^(1/2)))+3*_X000001*_X000003*(-2*cos(3^(1/2))+sec(3^(1/2)))+3*_X000002*_X000003+3^(1/2)*tan(3^(1/2)))/cos(2*3^(1/2)), -(sec(4*3^(1/2))+sec(3^(1/2)))*_X000003*(D(_Z))(3)+3*(sec(4*3^(1/2))-sec(3^(1/2)))*_X000001*_X000003+12*_X000002*sec(4*3^(1/2))*_X000003+3^(1/2)*Pi+3^(1/2)*tan(4*3^(1/2))-3^(1/2)*tan(3^(1/2))}, {_X000001, _X000002, _X000003}, {_X000003 <> 0}, backsub = true, maxsols = 100, tryhard = true
 #(SolveTools:-PolynomialSystemSolvers:-PseudoResultant:-ModuleApply,25): SolveTools:-PolynomialSystemSolvers:-PseudoResultant:-ApplySubstitution ({},[],numer(tm1),notzero union map(xx -> denom(xx) <> 0,tm1), unknowns);

 ApplySubstitution called with arguments: {}, [], {_X000003*(D(_Z))(3)*sec(3^(1/2))+3*_X000001*sec(3^(1/2))*_X000003-2*_X000003*(D(_Z))(3)*cos(3^(1/2))-6*_X000001*_X000003*cos(3^(1/2))+3^(1/2)*tan(3^(1/2))+_X000003*(D(_Z))(3)+3*_X000002*_X000003, -_X000003*(D(_Z))(3)*sec(4*3^(1/2))+3*_X000001*sec(4*3^(1/2))*_X000003+12*_X000002*sec(4*3^(1/2))*_X000003+3^(1/2)*Pi+3^(1/2)*tan(4*3^(1/2))-_X000003*(D(_Z))(3)*sec(3^(1/2))-3*_X000001*sec(3^(1/2))*_X000003-3^(1/2)*tan(3^(1/2))}, {1 <> 0, _X000003 <> 0, cos(2*3^(1/2)) <> 0}, {_X000001, _X000002, _X000003}
 #(SolveTools:-PolynomialSystemSolvers:-PseudoResultant:-ApplySubstitution,48): eqns := map(SolveTools:-PolynomialSystemSolvers:-PseudoResultant:- AttemptFactorization,eqns,not0,unknowns);

 AttemptFactorization called with arguments: _X000003*(D(_Z))(3)*sec(3^(1/2))+3*_X000001*sec(3^(1/2))*_X000003-2*_X000003*(D(_Z))(3)*cos(3^(1/2))-6*_X000001*_X000003*cos(3^(1/2))+3^(1/2)*tan(3^(1/2))+_X000003*(D(_Z))(3)+3*_X000002*_X000003, {_X000003 <> 0, cos(2*3^(1/2)) <> 0}, {_X000001, _X000002, _X000003}
 #(SolveTools:-PolynomialSystemSolvers:-PseudoResultant:-AttemptFactorization,2): error \`this is a bug\`

Error, (in dsolve) this is a bug

 locals defined as: e = e

 


 

Download dsolve_error_this_is_bug_2025_1_oct_2_2025.mw

Note that changing the IC to IC:=y(1)+4*y(2)=0; makes it work with no error.

It is only when adding y(4) does the error shows up.

update Bug report emailed to Maplesoft.

 

 

Another very serious bug in Maple.

I have code that simplifies intitial conditions passed.

I found that simplify((D@@2)(y)(Pi) = 0) gives error 

Error, (in unknown) invalid input: diff received Pi, which is not valid for its 2nd argument

but Pi is constant. It works for any other values other than Pi.

This only happens when adding Physics:-Setup(assumingusesAssume = true):

Any idea why this happens?

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1877 and is the same as the version installed in this computer, created 2025, July 11, 19:24 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

simplify((D@@2)(y)(Pi) = 0)

((D@@2)(y))(Pi) = 0

Physics:-Setup(assumingusesAssume = true):

simplify((D@@2)(y)(Pi) = 0)

Error, (in unknown) invalid input: diff received Pi, which is not valid for its 2nd argument

 

 

Download simplify_fail_when_adding_physics_sept_27_2025.mw

any idea what match fail on this example? is somethinbg wrong I am doing?

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

A:=2*y(3)^4+5;
match(A=k1*y(k2)^k3+k4,y,'la')

2*y(3)^4+5

false

patmatch(A,k1::anything*y(k2::anything)^(k3::anything)+k4::anything,'la');
la

true

[k1 = 2, k2 = 3, k3 = 4, k4 = 5]

Download why_match_fail_sept_21_2025.mw

Update:
I think match can only do it if the main "variable"   is a variable and not a "function". In this example y(.) is function, so that is why it failed to match. For example this works:

A:=2*y^3+4;
match(A=k1*y^k2+k3,y,'la')

And gives true, since "y" here is not a "function".

But this makes match not very useful to use for parsing. patmatch seems a little more practical to use.

I wanted to check that the input  has the pattern   symbol(symbol), which will match any of   y(x), or f(x) or A(B) and so on.

But using patmatch does not work. Using patmatch(h(z),y::symbol(x::symbol),'la');  or even patmatch(h(z),'y'::anything('x'::anything),'la'); all return false. I know I can do patmatch(h(z),func::function(name),'la'); and this returns true, but this matches h(z,r) and matches h(z,r,t) and matches h(z,r,t,u) and so on. 

I wanted to match only   SYMBOL(SYMBOL), i..e. one symbol followed by "(" followed by one symbol followed by closing ")"

For reference, this is what I am looking for 

I know I can use other ways in Maple to do this (may be typematch and and others). But wanted to see if patmatch works on this and why it is failing.

Can this be done using patmatch?

Maple 2025.1 unable to solve this ode. Sympy gives the following two solutions which Maples verifies are correct.

Any trick or option that can help dsolve find these solutions?
 

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

ode:=diff(y(x),x) = (1+cos(x)*sin(y(x)))*tan(y(x));

diff(y(x), x) = (1+cos(x)*sin(y(x)))*tan(y(x))

sol:=dsolve(ode);

sol_1:=y(x)=arcsin( 2*exp(x) / ( c__1 + sqrt(2)*exp(x) * sin(x+Pi/4) ) ) + Pi

y(x) = arcsin(2*exp(x)/(c__1+2^(1/2)*exp(x)*sin(x+(1/4)*Pi)))+Pi

odetest(sol_1,ode)

0

sol_2:=y(x)=arcsin( 2*exp(x) / ( c__1 - sqrt(2)*exp(x) * sin(x+Pi/4) ) ) ;

y(x) = arcsin(2*exp(x)/(c__1-2^(1/2)*exp(x)*sin(x+(1/4)*Pi)))

odetest(sol_2,ode)

0

 


 

Download How_to_find_solution_sept_20_2025.mw

update:

OK, found out how. Needed transformation u(x)=sin(y(x)). Maple probably did not have this in one of the things to try.

 

restart;

ode:=diff(y(x),x) = (1+cos(x)*sin(y(x)))*tan(y(x));
sol:=dsolve(ode);

diff(y(x), x) = (1+cos(x)*sin(y(x)))*tan(y(x))

tr:=y(x)=arcsin(u(x));
PDEtools:-dchange(tr,ode,[u(x)]):
dsolve(%);
sol:=y(x)=arcsin(rhs(%));
odetest(sol,ode)
 

y(x) = arcsin(u(x))

u(x) = -2/(-2*exp(-x)*c__1+sin(x)+cos(x))

y(x) = -arcsin(2/(-2*exp(-x)*c__1+sin(x)+cos(x)))

0


 

Download How_to_find_solution_sept_20_2025_V2.mw

 

 

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