Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

restart;
solve({-alpha^4*b^2*lambda*mu*b[1] + a^2*alpha^2*lambda*mu*b[1] + 6*beta*lambda^2*sigma*a[0]*a[1]^2 + 6*beta*mu^2*a[0]*a[1]^2 - 6*beta*lambda*a[0]*b[1]^2 = 0, -alpha^4*b^2*lambda^2*mu*sigma - alpha^4*b^2*mu^3 + a^2*alpha^2*lambda^2*mu*sigma + a^2*alpha^2*mu^3 - 4*beta*lambda^2*sigma*a[0]*b[1] - 4*beta*lambda*mu*b[1]^2 - 4*beta*mu^2*a[0]*b[1] = 0, -alpha^4*b^2*lambda^2*sigma - alpha^4*b^2*mu^2 + a^2*alpha^2*lambda^2*sigma + a^2*alpha^2*mu^2 + beta*lambda^2*sigma*a[1]^2 + beta*mu^2*a[1]^2 - 3*beta*lambda*b[1]^2 = 0, -alpha^4*b^2*lambda^2*sigma - alpha^4*b^2*mu^2 + a^2*alpha^2*lambda^2*sigma + a^2*alpha^2*mu^2 + 3*beta*lambda^2*sigma*a[1]^2 + 3*beta*mu^2*a[1]^2 - beta*lambda*b[1]^2 = 0, -alpha^6*b^4*lambda^2*mu*b[1] + alpha^6*b^2*l^2*lambda^2*sigma*a[0] + alpha^6*b^2*l^2*mu^2*a[0] - a^2*alpha^4*l^2*lambda^2*sigma*a[0] + alpha^4*b^2*k^2*lambda^2*sigma*a[0] - a^2*alpha^4*l^2*mu^2*a[0] + alpha^4*b^2*k^2*mu^2*a[0] + 2*alpha^2*b^2*beta*lambda^2*sigma*a[0]^3 + a^4*alpha^2*lambda^2*mu*b[1] - a^2*alpha^2*k^2*lambda^2*sigma*a[0] - 6*alpha^2*b^2*beta*lambda^2*a[0]*b[1]^2 + 2*alpha^2*b^2*beta*mu^2*a[0]^3 - a^2*alpha^2*k^2*mu^2*a[0] + 2*a^2*beta*lambda^2*sigma*a[0]^3 + 2*alpha^2*b^2*lambda^2*omega*sigma*a[0] - 6*a^2*beta*lambda^2*a[0]*b[1]^2 + 2*a^2*beta*mu^2*a[0]^3 + 2*alpha^2*b^2*mu^2*omega*a[0] - 2*a^2*lambda^2*omega*sigma*a[0] - 2*a^2*mu^2*omega*a[0] + 2*a*lambda^2*sigma*C[1]*a[0] + 2*a*mu^2*C[1]*a[0] = 0, -2*alpha^6*b^4*lambda^3*sigma - 2*alpha^6*b^4*lambda*mu^2 + alpha^6*b^2*l^2*lambda^2*sigma + alpha^6*b^2*l^2*mu^2 - a^2*alpha^4*l^2*lambda^2*sigma + alpha^4*b^2*k^2*lambda^2*sigma + 2*a^4*alpha^2*lambda^3*sigma - a^2*alpha^4*l^2*mu^2 + alpha^4*b^2*k^2*mu^2 + 6*alpha^2*b^2*beta*lambda^2*sigma*a[0]^2 + 2*a^4*alpha^2*lambda*mu^2 - a^2*alpha^2*k^2*lambda^2*sigma - 6*alpha^2*b^2*beta*lambda^2*b[1]^2 + 6*alpha^2*b^2*beta*mu^2*a[0]^2 - a^2*alpha^2*k^2*mu^2 + 6*a^2*beta*lambda^2*sigma*a[0]^2 + 2*alpha^2*b^2*lambda^2*omega*sigma - 6*a^2*beta*lambda^2*b[1]^2 + 6*a^2*beta*mu^2*a[0]^2 + 2*alpha^2*b^2*mu^2*omega - 2*a^2*lambda^2*omega*sigma - 2*a^2*mu^2*omega + 2*a*lambda^2*sigma*C[1] + 2*a*mu^2*C[1] = 0, -alpha^6*b^4*lambda^3*sigma + alpha^6*b^4*lambda*mu^2 + alpha^6*b^2*l^2*lambda^2*sigma + alpha^6*b^2*l^2*mu^2 - a^2*alpha^4*l^2*lambda^2*sigma + alpha^4*b^2*k^2*lambda^2*sigma + a^4*alpha^2*lambda^3*sigma - a^2*alpha^4*l^2*mu^2 + alpha^4*b^2*k^2*mu^2 + 6*alpha^2*b^2*beta*lambda^2*sigma*a[0]^2 - a^4*alpha^2*lambda*mu^2 - a^2*alpha^2*k^2*lambda^2*sigma - 2*alpha^2*b^2*beta*lambda^2*b[1]^2 + 12*alpha^2*b^2*beta*lambda*mu*a[0]*b[1] + 6*alpha^2*b^2*beta*mu^2*a[0]^2 - a^2*alpha^2*k^2*mu^2 + 6*a^2*beta*lambda^2*sigma*a[0]^2 + 2*alpha^2*b^2*lambda^2*omega*sigma - 2*a^2*beta*lambda^2*b[1]^2 + 12*a^2*beta*lambda*mu*a[0]*b[1] + 6*a^2*beta*mu^2*a[0]^2 + 2*alpha^2*b^2*mu^2*omega - 2*a^2*lambda^2*omega*sigma - 2*a^2*mu^2*omega + 2*a*lambda^2*sigma*C[1] + 2*a*mu^2*C[1] = 0}, {omega, a[0], a[1], b[1]});
 

Recently @salim-barzani asked a question about a paper that involved analysing the different types of roots of polynomials. The appendix in that paper gave the example of the roots of x^4+x^2*e[2]+x*e[1]+e[0]using the analysis in Lu et al, "A complete discrimination system for polynomials", Science in China (Ser. E), 39 (1996) 628-646. The analysis uses the discriminant sequence and extensions. Maple provides this through RegularChains:-ParametricSystemTools:-DiscrminantSequence. For example for this polynomial we find there is a real root of multiplicity 2 and a complex conjugate pair when D__2*D__3 < 0 and D__4 = 0 where the D__i are the ith entries in the discriminant sequence [1, -e[2], -2*e[2]^3+8*e[0]*e[2]-9*e[1]^2, 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3].

 

The problem with these conditions is that they are in terms of the D__i and not directly in terms of the e__i parameters. One can derive these conditions and then solve them to find the conditions on the parameters, but Maple has various routines in the RegularChains, RootFinding:-Parametric and SolveTools packages that directly find conditions on parameters to find when there are specified numbers of real or complex roots for polynomial systems. So this post is my attempt to use these tools to find the conditions on the parameters of the above polynomial that give various types of roots. One immediate difficulty is that generally these routines count distinct roots irrespective of multiplicity, and so some indirect analysis is required. There are several different types of commands and analyses that could be used, and my choices here are more to do with my learning experience than an optimum analysis.

 

The first conclusion is that it is possible, although RealComprehensiveTriangularize did not work as I expected when asking for zero real roots (bug?). Assuming it had worked, RealComprehensiveTriangularize could cover all the cases here, though that will not be true when there are more parameters. There doesn't seem to be an obvious systematic way of doing this analysis, which is a downside. Another downside is the large number of subcase conditions, which look as if they could be combined into fewer subcases. CellDecomposition works well for cases without multiplicity.


Main worksheet [not all is displaying below]:

Download RootAnalysis4.mw

restart

with(RegularChains); with(ParametricSystemTools); with(RootFinding:-Parametric)

Consider the following polynomial in x with the three real parameters e[0], e[1], e[2]. We would like to know the conditions on these parameters that lead to different numbers of real and complex-conjugate pairs of roots of different multiplicities.

p := x^4+x^2*e[2]+x*e[1]+e[0]

x^4+x^2*e[2]+x*e[1]+e[0]

Consider first how many cases there are. We can set this up as a combinatorial problem in the combstruct package.

sys := {C = Atom, R = Atom, realrts = Set(multiplereal), rts = Prod(realrts, complexrts), complexpr = Prod(C, C), complexrts = Set(multiplecomplex), multiplecomplex = Sequence(complexpr, card > 0), multiplereal = Sequence(R, card > 0)}

Draw := proc (q) options operator, arrow; eval(q, {Epsilon = NULL, Prod = `[]`, Set = (proc () options operator, arrow; args end proc), Sequence = `*`}) end proc

For a degree 4 polynomial there are 9 different cases to consider. Here [C, C] means a (non-real) complex-conjugate pair of roots and R means a real root; the exponents indicate the multiplicities.

all := combstruct:-allstructs([rts, sys], size = degree(p, x)); nops(%); `~`[Draw](all)

9

[[[C, C]^2], [[C, C], [C, C]], [R^2, [C, C]], [R^4], [R, R, [C, C]], [R^2, R^2], [R^3, R], [R, R, R^2], [R, R, R, R]]

These are (in order)
(a) A duplicate pair of complex-conjugate roots

(b) Two distinct pairs of complex-conjugate roots

(c) A real root of multiplicity 2 and a pair of complex-conjugate roots

(d) A real root of multiplicity 4

(e) Two distinct real roots of multiplicity 1 and a complex-conjugate pair

(f) Two distinct real roots each of multiplicity 2

(g) A real root of multiplicity 3 and a real root of multiplicity 1

(h) Three distinct real roots, of multiplicities 2, 1, and 1

(i) Four distinct real roots of multiplicity 1

Declare the variables first and parameters last. np is the number of parameters. Use the suggested order.

vp := SuggestVariableOrder([p = 0], [x]); R := PolynomialRing(vp); np := nops(`minus`({vp[]}, {x}))

[x, e[0], e[1], e[2]]

polynomial_ring

3

Define derivative polynomials. p2 = 0 when there is a root of multiplicity 2 or more; p3 = 0 when there is a root of multiplicity 3 or more and p4 = 0when there is a root of multiplicity 4.

p2 := diff(p, x); p3 := diff(p2, x); p4 := diff(p3, x)

4*x^3+2*x*e[2]+e[1]

12*x^2+2*e[2]

24*x

Discriminant is zero if and only if there are repeated roots.

Delta := discrim(p, x)

16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3

(d) A real root of multiplicity 4

 

This is perhaps the simplest case and can be done using RealComprehensiveTriangularize. Specifying np = 3 means use the last 3 variables in the PolynomialRing as parameters. The argument 1 means we want the cases where there is one distinct real root. We specify that all of p, p2, p3, p4 are zero so that the 1 real root is the common root of these polynomials, i.e., is a root on multiplicity 4. (I find the cadcell output a little easier to use, but it is not critical.)

rct := RealComprehensiveTriangularize({p = 0, p2 = 0, p3 = 0, p4 = 0}, np, R, 1, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

This means that the conditions on the parameters to get a single real root of multiplicity 4 are

conds := Info(rct[2][1][1], R)

[e[2] = 0, e[1] = 0, e[0] = 0]

and that the polynomial to solve to find this root under these conditions is

poly := Info(rct[1][][2], R)

[x = 0]

which we can check:

eval(p, conds); solve(%, x)

x^4

0, 0, 0, 0

(g) A real root of multiplicity 3 and a real root of multiplicity 1

 

For multiplicity 3 we need p, p2, p3 all zero ,but p4 nonzero to exclude multiplicity 4. We want there to be one real root meeting these conditions. The other root must be real with multiplicity 1.

rct := RealComprehensiveTriangularize({p = 0, p2 = 0, p3 = 0, p4 <> 0}, np, R, 1, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

There are two conditions, differing only in the sign of e[1]

conds1 := Info(rct[2][1][1], R); eqs1, ineqs1 := selectremove(type, conds1, `=`); conds2 := Info(rct[2][2][1], R); eqs2, ineqs2 := selectremove(type, conds2, `=`)

[e[2] < 0, e[1] = -(2/9)*(-6*e[2]^3)^(1/2), e[0] = -(1/12)*e[2]^2]

[e[1] = -(2/9)*(-6*e[2]^3)^(1/2), e[0] = -(1/12)*e[2]^2], [e[2] < 0]

[e[2] < 0, e[1] = (2/9)*(-6*e[2]^3)^(1/2), e[0] = -(1/12)*e[2]^2]

[e[1] = (2/9)*(-6*e[2]^3)^(1/2), e[0] = -(1/12)*e[2]^2], [e[2] < 0]

The polynomial to be solved to find the root of multiplicity 3 is

poly := Info(rct[1][][2], R)

[4*e[2]*x+3*e[1] = 0]

so the root of multiplicity under the two sets of conditions is (for any negative e[2])

`assuming`([simplify(solve(eval(poly, eqs1), x))], [ineqs1[]]); `assuming`([simplify(solve(eval(poly, eqs2), x))], [ineqs2[]])

{x = -(1/6)*6^(1/2)*(-e[2])^(1/2)}

{x = (1/6)*6^(1/2)*(-e[2])^(1/2)}

which we can check in the original polynomial

`assuming`([simplify([solve(eval(p, eqs1), x, explicit)])], [ineqs1[]]); `assuming`([simplify([solve(eval(p, eqs2), x, explicit)])], [ineqs2[]])

[(1/2)*6^(1/2)*(-e[2])^(1/2), -(1/6)*6^(1/2)*(-e[2])^(1/2), -(1/6)*6^(1/2)*(-e[2])^(1/2), -(1/6)*6^(1/2)*(-e[2])^(1/2)]

[(1/6)*6^(1/2)*(-e[2])^(1/2), (1/6)*6^(1/2)*(-e[2])^(1/2), (1/6)*6^(1/2)*(-e[2])^(1/2), -(1/2)*6^(1/2)*(-e[2])^(1/2)]

 

(f) Two distinct real roots each of multiplicity 2

 

This can be done similarly. For multiplicity 2 we need p, p2 both zero ,but p3, p4 nonzero to exclude multiplicity 3 or 4. There needs to be two such roots.

rct := RealComprehensiveTriangularize({p = 0, p2 = 0, p3 <> 0, p4 <> 0}, np, R, 2, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

The condition, and the polynomial to find the roots of multiplicity 2 are

conds := Info(rct[2][1][1], R); eqs, ineqs := selectremove(type, conds, `=`); poly := Info(rct[1][][2], R)

[e[2] < 0, e[1] = 0, e[0] = (1/4)*e[2]^2]

[e[1] = 0, e[0] = (1/4)*e[2]^2], [e[2] < 0]

[2*x^2+e[2] = 0]

so the roots of multiplicity 2 under the condition are (for any negative e[2])

`assuming`([simplify([solve(eval(poly, eqs), x)])], [ineqs[]])

[{x = (1/2)*2^(1/2)*(-e[2])^(1/2)}, {x = -(1/2)*2^(1/2)*(-e[2])^(1/2)}]

which we can check in the original polynomial

`assuming`([simplify([solve(eval(p, eqs), x, explicit)])], [ineqs[]])

[(1/2)*2^(1/2)*(-e[2])^(1/2), -(1/2)*2^(1/2)*(-e[2])^(1/2), (1/2)*2^(1/2)*(-e[2])^(1/2), -(1/2)*2^(1/2)*(-e[2])^(1/2)]

(i) Four distinct real roots of multiplicity 1

 

This is also a simple case; we just ask for p = 0 to have 4 distinct real roots.

rct := RealComprehensiveTriangularize({p = 0}, np, R, 4, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

Of course the polynomial to solve is just the original one.

poly := Info(rct[1][][2], R)

[x^4+e[2]*x^2+e[1]*x+e[0] = 0]

We recognize the discriminant appearing here in the first and third conditions, where e[0] is chosen so that it is not zero to ensure there are repeated roots; there are additional conditions to distinguish this from cases (b) and (e).

solve(Delta, e[0], explicit = false)

RootOf(256*_Z^3-128*e[2]^2*_Z^2+(16*e[2]^4+144*e[1]^2*e[2])*_Z-4*e[1]^2*e[2]^3-27*e[1]^4)

When e[1] = 0, (as in the second condition), the discriminant is

eval(Delta, e[1] = 0); solve(%, e[0])

16*e[0]*e[2]^4-128*e[0]^2*e[2]^2+256*e[0]^3

0, (1/4)*e[2]^2, (1/4)*e[2]^2

With a little thought, the three conditions may be combined into one rule:
Choose any negative e[2]. Find a value of e[1] between -2*sqrt(-6*e[2]^3)*(1/9)and 2*sqrt(-6*e[2]^3)*(1/9). Then find a value of e[2] between the first and second real solutions of the discriminant.

For cases where the polynomials to solve do not have multiple roots (as here), an alternative to RealComprehensiveTriangularize is CellDecomposition in the RootFinding:-Parametric package. The same information about the conditions is given in a more cryptic form using CellDescription for the cells with 4 real roots (cell numbers 4 and 8) from CellDecomposition. The two cells differ in the sign of e[1].

cells := CellDecomposition([p = 0], [x], [e[0], e[1], e[2]]); NumberOfSolutions(cells); cells4 := CellsWithSolutions(cells, 4); CellDescription(cells, cells4[1]); CellDescription(cells, cells4[2])

[[1, 2], [2, 0], [3, 2], [4, 4], [5, 2], [6, 0], [7, 2], [8, 4], [9, 2], [10, 0], [11, 2], [12, 0], [13, 2], [14, 0], [15, 2], [16, 0]]

[4, 8]

[[-infinity, 0, e[2], e[2], 1], [8*e[2]^3+27*e[1]^2, 1, e[1], e[1], 1], [16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 2]]

[[-infinity, 0, e[2], e[2], 1], [e[1], 1, e[1], 8*e[2]^3+27*e[1]^2, 2], [16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 2]]

The SamplePoints and SampleSolutions commands automate finding a valid solution in a cell, which exhibits the 4 distinct real roots.

cells:-SamplePoints[4]; SampleSolutions(cells, %); cells:-SamplePoints[8]; SampleSolutions(cells, %)

[e[0] = 0, e[1] = -2570530724767170816689/9444732965739290427392, e[2] = -1]

[[x = -.8164965809], [x = -.2988584907], [x = 0.], [x = 1.115355072]]

[e[0] = 0, e[1] = 20564245798137366533639/75557863725914323419136, e[2] = -1]

[[x = -1.115355072], [x = 0.], [x = .2988584907], [x = .8164965809]]

 

 


(h) Three distinct real roots, of multiplicities 2, 1, and 1

 

This is the only case with three distinct real roots, so it can also be done with RealComprehensiveTriangularize similarly to the previous case.

rct := RealComprehensiveTriangularize({p = 0}, np, R, 3, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

The conditions on e[2] and e[1] are the same as those of case (i), but now e[0] is chosen to make the discriminant zero, since there are repeated roots.
Choose e[2] < 0, e.g., e[2] = -1, and then -2*sqrt(-6*e[2]^3)*(1/9) < e[1] and e[1] < 2*sqrt(-6*e[2]^3)*(1/9), e.g., e[1] = (1/2)*(2*sqrt(-6*e[2]^3)*(1/9))

params := {e[2] = -1}; params := `union`(params, {e[1] = eval((1/2)*(2*sqrt(-6*e[2]^3)*(1/9)), params)})

{e[2] = -1}

{e[1] = (1/9)*6^(1/2), e[2] = -1}

Now choose e[0] to make the discriminant zero

fsolve(eval(Delta, params), e[0], digits = 20); params := `union`(params, {e[0] = %[1]})

-0.1889013308e-1, 0.6793395576e-1, .4509561773

{e[0] = -0.1889013308e-1, e[1] = (1/9)*6^(1/2), e[2] = -1}

The three distinct roots are

poly := Info(rct[1][][2], R); eval(poly, params); [fsolve(%[], complex)]

[((512*e[2]^5+6912*e[1]^2*e[2]^2)*e[0]^2+(-256*e[2]^7-2304*e[2]^4*e[1]^2-7776*e[2]*e[1]^4)*e[0]+32*e[2]^9+400*e[1]^2*e[2]^6+1728*e[1]^4*e[2]^3+2916*e[1]^6)*x^3+((-256*e[2]^4*e[1]+6912*e[2]*e[1]^3)*e[0]^2+(128*e[2]^6*e[1]+576*e[2]^3*e[1]^3-3888*e[1]^5)*e[0]-16*e[1]*e[2]^8-192*e[1]^3*e[2]^5-648*e[1]^5*e[2]^2)*x^2+((512*e[2]^6+4992*e[1]^2*e[2]^3+5184*e[1]^4)*e[0]^2+(-256*e[2]^8-1856*e[2]^5*e[1]^2-4320*e[2]^2*e[1]^4)*e[0]+32*e[2]^10+408*e[1]^2*e[2]^7+1692*e[1]^4*e[2]^4+2430*e[1]^6*e[2])*x+(256*e[2]^5*e[1]+8640*e[2]^2*e[1]^3)*e[0]^2+(-128*e[2]^7*e[1]-1440*e[2]^4*e[1]^3-7776*e[2]*e[1]^5)*e[0]+16*e[1]*e[2]^9+204*e[1]^3*e[2]^6+972*e[1]^5*e[2]^3+2187*e[1]^7 = 0]

[-13.08460370*x^3-.7573725292*6^(1/2)*x^2+12.82157099*x-.7116973772*6^(1/2) = 0]

[-1.121474463, .1417831433, .8379081760]

And the original polynomial has these 3 roots, with one repeated

eval(p, params); simplify(fnormal([fsolve(%, complex)], 7), zero)

x^4-x^2+(1/9)*x*6^(1/2)-0.1889013308e-1

[-1.121474, .1417831, .1417831, .8379082]

(e) Two distinct real roots of multiplicity 1 and a complex-conjugate pair

 

For this case we have no repeated roots (discriminant nonzero) and two distinct real roots

rct := RealComprehensiveTriangularize({p = 0, Delta <> 0}, np, R, 2, output = cadcell); Display(rct, R)

PiecewiseTools:-Is, "Wrong kind of parameters in piecewise"

There are two types of solutions. (i) Those with e[2] < 0 are similar to those before, but now e[1] can be on the boundaries: -2*sqrt(-6*e[2]^3)*(1/9) <= e[1] and e[1] <= 2*sqrt(-6*e[2]^3)*(1/9) and e[2] is variously related to the real roots of the discriminant. (ii) e[2] >= 0, e[1] is anything and e[0] is less than the first real root of the discriminant.
Similar information is available from CellDecompostion for the cells with two distinct real solutions. CellDecomposition does not deal with values on the boundary. It also does not deal with multiple roots so all the cells with two roots are for this case, case (e).

NumberOfSolutions(cells); cells2 := CellsWithSolutions(cells, 2)

[[1, 2], [2, 0], [3, 2], [4, 4], [5, 2], [6, 0], [7, 2], [8, 4], [9, 2], [10, 0], [11, 2], [12, 0], [13, 2], [14, 0], [15, 2], [16, 0]]

[1, 3, 5, 7, 9, 11, 13, 15]

for i in cells2 do CellDescription(cells, i) end do

[[-infinity, 0, e[2], e[2], 1], [-infinity, 0, e[1], 8*e[2]^3+27*e[1]^2, 1], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

[[-infinity, 0, e[2], e[2], 1], [8*e[2]^3+27*e[1]^2, 1, e[1], e[1], 1], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

[[-infinity, 0, e[2], e[2], 1], [8*e[2]^3+27*e[1]^2, 1, e[1], e[1], 1], [16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 2, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 3]]

[[-infinity, 0, e[2], e[2], 1], [e[1], 1, e[1], 8*e[2]^3+27*e[1]^2, 2], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

[[-infinity, 0, e[2], e[2], 1], [e[1], 1, e[1], 8*e[2]^3+27*e[1]^2, 2], [16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 2, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 3]]

[[-infinity, 0, e[2], e[2], 1], [8*e[2]^3+27*e[1]^2, 2, e[1], infinity, 0], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

[[e[2], 1, e[2], infinity, 0], [-infinity, 0, e[1], e[1], 1], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

[[e[2], 1, e[2], infinity, 0], [e[1], 1, e[1], infinity, 0], [-infinity, 0, e[0], 16*e[0]*e[2]^4-4*e[1]^2*e[2]^3-128*e[0]^2*e[2]^2+144*e[0]*e[1]^2*e[2]-27*e[1]^4+256*e[0]^3, 1]]

Verify that all these cells have two distinct real roots and a complex-conjugate pair

for i in cells2 do fsolve(eval(p, cells:-SamplePoints[i]), complex) end do

-.8774388331-.7448617666*I, -.8774388331+.7448617666*I, .7548776662, 1.

-1.208211169, -0.6103890665e-1-.7864141726*I, -0.6103890665e-1+.7864141726*I, 1.330288982

-.7135149791-.3232096177*I, -.7135149791+.3232096177*I, .4198192076, 1.007210751

-1.330288982, 0.6103890665e-1-.7864141726*I, 0.6103890665e-1+.7864141726*I, 1.208211169

-1.007210751, -.4198192076, .7135149791-.3232096177*I, .7135149791+.3232096177*I

-1., -.7548776662, .8774388331-.7448617666*I, .8774388331+.7448617666*I

-.3627365530-1.149253336*I, -.3627365530+1.149253336*I, .1226790229, .6027940830

-.6027940830, -.1226790229, .3627365530-1.149253336*I, .3627365530+1.149253336*I

   

 

Any explanation why this happens? notice, I did not supply the x and y ranges, let Maple decide.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2026.1, Windows 10, April 28 2026 Build ID 2011354`

plots:-contourplot(y+sin(x),'colorbar'=false,':-contours' = 2,size=[100,100]);

plots:-contourplot(y+sin(x),'colorbar'=false,':-contours' = 1,size=[100,100]);

Error, (in plot/iplot2d) numeric exception: division by zero

 

 

Download bug_in_contourplot.mw

nowday i am very intrested in this method which really i something intresting  i want to generate all the type of function not just thus in this paper  i will update the other  layers too but need sometime, i try to apply the exact layer  as author did in this paper but i did something mistake in one part about finding the parameters  i didnt fix that part but i did the second  part of the paper and i got answer, but for first one i need some help, also if possible  it will be amazing if someone can construct the all layer which can be construct , this is just two cases i provide here and in one of them i am stuck and i can't find the parameter but other i did it , target  of finding in apply the formula  for more  hiden layer  becuase in other papers i saw a lot of the  hiden layer i want to apply all of them if possible not jsut tw or three of them i want to know  and see how many hiden layer exist by constructing generate function, and the graph i am not sure maple can do that or not like fig 1 and fig 2 which if do that it will  be more amazing 

thank you for any help 

 

 

t1 have problem about  first case of layer and t2 dont have problem

I asked Maple AI what a glyph is. Then I prompted this

A kernel lost message was returned and the AI pannel became irresponsive.

Maple is still running well in exsisting and new tabs. 

Can the AI service be restarted from the user interface?

(Is that crash reproducible?)

 

Edit:

For exercises involving Pick's Theorem, I need grid points within a Cartesian coordinate system. How can "all" grid points - at least within the first quadrant - be generated without the tedious manual entry of integer coordinates? Is it possible to draw grid polygons as closed polylines simply by clicking on the grid points? (BTW: At the moment, this works well in the good old "Cabri.")
My search within the "Help" section (using terms such as plot, grid, mesh, lattice, etc.) proved unsuccessful.

The HTML characters in the attached document cause problems here on MaplePrimes. You have to open the worksheet

Download HTML_characters_in_math_mode.mw

05-2-2.mws

Can you help me with this code?

restart: with(VectorCalculus):

assume(g>0,Omega>0,V0>0,theta>0,alpha>0,alpha<=Pi/2):

alias(omega=w,Omega=W,alpha=a):

w:=<-W*cos(a),0,W*sin(a)>;

Vector(3, {(1) = -W*cos(a), (2) = 0, (3) = W*sin(a)})

(1)

r:=<x(t),y(t),z(t)>; v:=diff(r,t);

Vector(3, {(1) = x(t), (2) = y(t), (3) = z(t)})

Vector(3, {(1) = diff(x(t), t), (2) = diff(y(t), t), (3) = diff(z(t), t)})

(2)

F[gravity]:=<0,0,-g>;

Vector(3, {(1) = 0, (2) = 0, (3) = -g})

(3)

F[Coriolis]:=-2*w &x v;

Vector(3, {(1) = 2*W*sin(a)*(diff(y(t), t)), (2) = -2*W*cos(a)*(diff(z(t), t))-2*W*sin(a)*(diff(x(t), t)), (3) = 2*W*cos(a)*(diff(y(t), t))})

(4)

F[centrifugal]:=-w &x (w &x r);

Vector(3, {(1) = W*sin(a)*(W*cos(a)*z(t)+W*sin(a)*x(t)), (2) = W^2*cos(a)^2*y(t)+W^2*sin(a)^2*y(t), (3) = W*cos(a)*(W*cos(a)*z(t)+W*sin(a)*x(t))})

(5)

F[resultant]:=F[gravity]+F[Coriolis]+F[centrifugal];

Vector(3, {(1) = 2*W*sin(a)*(diff(y(t), t))+W*sin(a)*(W*cos(a)*z(t)+W*sin(a)*x(t)), (2) = -2*W*cos(a)*(diff(z(t), t))-2*W*sin(a)*(diff(x(t), t))+W^2*cos(a)^2*y(t)+W^2*sin(a)^2*y(t), (3) = -g+2*W*cos(a)*(diff(y(t), t))+W*cos(a)*(W*cos(a)*z(t)+W*sin(a)*x(t))})

(6)

eq:=(u,i)->simplify(diff(u(t),t,t)=F[resultant][i]):

xeq:=eq(x,1); yeq:=eq(y,2); zeq:=eq(z,3);

xeq := diff(x(t), `$`(t, 2)) = Omega*sin(alpha)*(Omega*sin(alpha)*x(t)+Omega*cos(alpha)*z(t)+2*(diff(y(t), t)))

yeq := diff(y(t), `$`(t, 2)) = Omega*(y(t)*Omega-2*(diff(z(t), t))*cos(alpha)-2*(diff(x(t), t))*sin(alpha))

zeq := diff(z(t), `$`(t, 2)) = sin(alpha)*cos(alpha)*x(t)*Omega^2+cos(alpha)^2*z(t)*Omega^2+2*Omega*cos(alpha)*(diff(y(t), t))-g

(7)

ic:=x(0)=0,y(0)=0,z(0)=0,D(x)(0)=0,D(y)(0)=V0*cos(theta),D(z)(0)=V0*sin(theta);

ic := x(0) = 0, y(0) = 0, z(0) = 0, (D(x))(0) = 0, (D(y))(0) = V0*cos(theta), (D(z))(0) = V0*sin(theta)

(8)

sol:=dsolve({xeq,yeq,zeq,ic},{x(t),y(t),z(t)},method=laplace):

assign(sol):

f:=u->simplify(expand(u(t))): X:=f(x); Y:=f(y); Z:=f(z);

X := -(1/4)*(Omega^4*V0*sin(theta)*cos(alpha)*(sum(exp(_alpha1*t)/((Omega^2+_alpha1^2)*_alpha1), _alpha1 = RootOf(Omega^2+_Z^2)))+cos(alpha)*g*(sum(exp(_alpha1*t)*_alpha1^2/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))-sin(theta)*cos(alpha)*V0*(sum(exp(_alpha1*t)*_alpha1/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))*Omega^2+(-2*Omega^3*cos(theta)*V0+3*cos(alpha)*Omega^2*g)*(sum(exp(_alpha1*t)/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))+4*(Omega^2*t*V0*sin(theta)-(1/2)*Omega^2*t^2*g-g)*cos(alpha))*sin(alpha)/Omega^2

Y := (1/4)*(-V0*cos(theta)*Omega^2+2*cos(alpha)*Omega*g)*(sum(exp(_alpha1*t)/((Omega^2+_alpha1^2)*_alpha1), _alpha1 = RootOf(Omega^2+_Z^2)))-(1/2)*sin(theta)*cos(alpha)*V0*Omega*(sum(exp(_alpha1*t)/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))+(1/4)*V0*cos(theta)*(sum(exp(_alpha1*t)*_alpha1/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))

Z := (1/4)*(-Omega^4*cos(alpha)^2*V0*sin(theta)*(sum(exp(_alpha1*t)/((Omega^2+_alpha1^2)*_alpha1), _alpha1 = RootOf(Omega^2+_Z^2)))-cos(alpha)^2*g*(sum(exp(_alpha1*t)*_alpha1^2/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))+cos(alpha)^2*sin(theta)*V0*(sum(exp(_alpha1*t)*_alpha1/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))*Omega^2+(2*Omega^3*cos(alpha)*cos(theta)*V0-3*Omega^2*g*cos(alpha)^2)*(sum(exp(_alpha1*t)/(Omega^2+_alpha1^2), _alpha1 = RootOf(Omega^2+_Z^2)))+(-4*Omega^2*t*V0*sin(theta)+2*Omega^2*t^2*g+4*g)*cos(alpha)^2+4*Omega^2*t*V0*sin(theta)-2*Omega^2*t^2*g)/Omega^2

(9)

P:=(u,n)->convert(taylor(u,W=0,n),polynom):

Xexp:=P(X,4); Yexp:=P(Y,4); Zexp:=P(Z,4);  

Error, (in series/sum) unable to compute series

Error, (in series/sum) unable to compute series

Error, (in series/sum) unable to compute series

 

tt:=solve(Zexp=0,t);

tt :=

(10)

 T1:=P(tt[2],1); d[x]:=eval(Xexp,t=T1);  

Error, invalid subscript selector

d[x] := Xexp

 

T2:=P(tt[2],2); d[y]:=P(eval(Yexp,t=T2),2);

Error, invalid subscript selector

d[y] := Yexp

 

d[y]:=collect(d[y],[cos(a),1/g^2,V0^3,W]);

d[y] := Yexp

(11)

parameters:={a=Pi/4,theta=Pi/3,V0=500,W=7.27*10^(-5),g=9.8}:

d[x]:=eval(d[x],evalf(parameters));

d[x] := Xexp

(12)

d[y]:=eval(d[y],evalf(parameters));

d[y] := Yexp

(13)
 

 

Download 05-2-2.mws

Can anyone share additional information about the Maple conference to be held in 2026? I want to submit a talk and then submit a paper to the Maple Transactions journal based on the same.

Can anyone help me?

restart: with(plots):   

h:=0.01: n:=6000: Digits:=18:

t[0]:=0: x[0]:=0.2: y[0]:=0.1: epsilon:=20:

F:=(x,y)->epsilon*(1-x^2)*y-x:

begin:=time():

for k from 0 to n do

t[k+1]:=t[k]+h;

x[k+1]:=x[k]+h*y[k];

y[k+1]:=y[k]+h*F(x[k],y[k]);

pt[k]:=[t[k],x[k],y[k]]:

end do:

cpu_time:=time()-begin;

pointplot3d([seq(pt[j],j=0..n)],axes=normal,symbol=cross,symbolsize=8,color=red,labels=["t","x","y"],orientation=[-90,0]);

sys:=diff(X(t),t)=Y(t),diff(Y(t),t)=F(X(t),Y(t));

vars:={X(t),Y(t)}: ic:=X(0)=0.2,Y(0)=0.1:

sol:=dsolve({sys,ic},vars,numeric,stepsize=h,method=classical[foreuler],output=listprocedure):

odeplot(sol,[t,X(t)],0..h*n,axes=normal,style=line,numpoints=n,labels=["t","x"]);

XX:=eval(X(t),sol): x1:=XX(1);  pt[100];

 

 

Download 09-1-1.mws

I am trying to plot a function where one of the variables is determind via a procedure that uses fsolve and depends on some parameters. When I go to try and make a plot using Explore to vary the parameters I get the following error:
"in fsolve  S  is in the equation, and is not solved for"
My worksheet is seen below:

restart;

 

T := 2^(2/3)*(16*CC(S,mu,Z,Pr)^2*Pi^2 + 2*Pi^2*Z^2 + 16*Pi*S*CC(S,mu,Z,Pr) + 3*S^2)*Pr^(1/3)/(4*(4*CC(S,mu,Z,Pr)*Pi + S)^(2/3)*(2*Pi^2*Z^2 + 4*Pi*S*CC(S,mu,Z,Pr) + S^2)^(2/3)*CC(S,mu,Z,Pr)^(1/3)*Pi^(2/3))

(1/4)*2^(2/3)*(16*CC(S, mu, Z, Pr)^2*Pi^2+2*Pi^2*Z^2+16*Pi*S*CC(S, mu, Z, Pr)+3*S^2)*Pr^(1/3)/((4*CC(S, mu, Z, Pr)*Pi+S)^(2/3)*(2*Pi^2*Z^2+4*Pi*S*CC(S, mu, Z, Pr)+S^2)^(2/3)*CC(S, mu, Z, Pr)^(1/3)*Pi^(2/3))

(1)

 

mu = 2^(2/3)*S*(16*C^2*Pi^2 - 2*Pi^2*Z^2 - S^2)*Pr^(1/3)/(4*(4*C*Pi + S)^(2/3)*(2*Pi^2*Z^2 + 4*C*Pi*S + S^2)^(2/3)*C^(4/3)*Pi^(2/3))

mu = (1/4)*2^(2/3)*S*(16*C^2*Pi^2-2*Pi^2*Z^2-S^2)*Pr^(1/3)/((4*C*Pi+S)^(2/3)*(2*Pi^2*Z^2+4*C*Pi*S+S^2)^(2/3)*C^(4/3)*Pi^(2/3))

(2)

CC:=proc(S,mu,Z,Pr)
fsolve((2),C,C=0.01..100)
end proc;

proc (S, mu, Z, Pr) fsolve(mu = (1/4)*2^(2/3)*S*(16*C^2*Pi^2-2*Pi^2*Z^2-S^2)*Pr^(1/3)/((4*C*Pi+S)^(2/3)*(2*Pi^2*Z^2+4*C*Pi*S+S^2)^(2/3)*C^(4/3)*Pi^(2/3)), C, C = 0.1e-1 .. 100) end proc

(3)

CC(1,0,0.5,0.2)

.1938622552

(4)

Explore(plot(T,0..15),parameters=[[mu=0 .. 1,minorticks=0.25],[Z=0..0.5,minorticks=0.1],[Pr=0..1,minorticks=0.25]])


When I try to move the sliders on my parameters this is where I get the error. I want to plot over S, but I can only get CC once I have all the other values including S. I assume it has something to do with the fact that my plotting variable is in the procedure?

Any help would be greatly appreciated, thanks. 

Download Explore_Plot_Problem.mw

A note on what I've been working on for the past while. Some of you may have seen the announcement on LinkedIn yesterday; this is for the home audience.

The question I've been chasing is the one that's underneath the Physics package, the dsolve / pdsolve formal methods and heuristics, the advanced Mathematical Functions and FunctionAdvisor, and most of what I've written for Maple over the years. How can mathematicians and physicists speed up significantly their work using Computer Algebra Systems (CAS) and at the same time trust the result a computer hands back? The new chapter is what happens when AI sits between the human and the CAS, and the answer to that, in my view, turns out to be a much harder problem than the AI hype suggests.

Why? Because AI is increasingly the driver of computational mathematics in research, engineering, and education. And the unsolved problem isn't whether AI can do mathematics. It can. The problem is that an incorrect AI result arrives with the same confidence as a correct one.

On 100 challenging problems of undergraduate mathematics we tested, six independent state-of-the-art AIs returned mathematically equivalent answers on only 21% of them, and even within a single AI, repeated runs disagreed with themselves on 3% to 57% of the problems (details). The gap this validation crosses, between probabilistic inference and certified mathematical computation, is epistemological, not technological. It won't close with more training data. It needs validation across multiple AIs and multiple CAS, with no single engine having the final word.

ExaktAI aims to address that gap. It guides AI through mathematical computation, validates each step against Maple and Mathematica, and automatically generates and opens a corresponding CAS document where the validation can be audited and reproduced for every step, and where one can continue working on the problem. The goal: AI-mathematics that is validated, with the human in the loop.

ExaktAI is now well developed (TRL 6: System prototype demonstration in a simulated environment, on the ISED / Innovative Solutions Canada TRL scale). At the end an image. A Beta is scheduled for late summer / fall 2026; details at exaktai.ai.

In summary: ExaktAI is my present, and if you work on AI for mathematics and computer algebra, or the validation problem for AI, I'd love to hear your perspective.



Edgardo S. Cheb-Terrab
ExaktAI
Research Fellow Emeritus at Maplesoft.

Para_1.mw.  please help to correct this error.

It seems that in Maple 2025+ on Windows 11, the SMTLIB package is not working. For example:

SMTLIB:-Satisfiable( {x^2+y^2+z^2<1, x*y*z>1} ) assuming real;

complains about error loading external library mplsmtlib.dll.

Is there an explanation, or a workaround?

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