MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • 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

       

     

    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.

    Hi MaplePrimes, and all,

    Here is a new, to me, set of numbers
    defined by ,
    the first three numbers are {1,2,3}
    and then, 
    the next number is the sum of the three 
    previous numbers,
    so,
    {1,2,3,6,11,20, ... }
    but can only calculate a finite number of numbers
    the, so called, Tribonacci numbers
    could start with {0,1,0}
    see online
    https://oeis.org/A001590

    and
    triple_recursive_sequence_simple_first.mw

    triple_recursive_sequence_simple_first.pdf

    regards,
    Matt
     

    The new ribbon style user interface of recent Maple versions is well structured and visually much more appealing than the former user interface. Great for new users. However, I do not use the new Maple version for productive work because it is considerably slower to use: Much more clicks and mouse movements are involved than before, which breaks the flow.

    To improve this situation, I thought about customizing the quick access toolbar with menu items that I need all the time. With Maple 2026 this suggestion has become a less viable solution because the quick access toolbar shrunk in size and moved to a screen location with low mouse activity (to get there fast, the mouse has to move back and forth like Speedy Gonzales). The tiny buttons in the toolbar are hard to distinguish and to hit in one go (a golfer might say “it's rare like an eagle”). If you disagree, try to write text and switch to non-executable math (to enter a symbol) and switch back to text and continue writing. Do the same with the former user interface (e.g. Maple 2024) and compare.

    As a new suggestion I thought about adding a new tab "My Tab" to the ribbon that is customizable by the user. Here is what I would pick from the current ribbon items

    (A subset from 4 out of 10 tabs: The Home, Insert, Edit and Help tab. The latter is less important)

    I would probably also add these two items

    although they do not fully replace the former buttons from the contextual tool bar

    .

    I use the above buttons from the former user interface allot in text passages to toggle between text and non-executable math. They are also useful to change the input mode of an empty document block (instead of inserting a new line with the desired input mode and deleting unwanted input lines). These buttons were introduced with Maple 2021 to improve usability, now they are gone and with it the ease of integrating math into text. With Maple 2026, I have to go back to using F5, which now “toggles” between three states (with the drawback that now in 1-D Math no indication of the state of the input mode is available on the user interface).

    The above selection of menu items is my selection to work efficiently on textbook style Maple documents composed of explanatory text passages (including non-executable math) and Maple input and output. Other users would probably customize differently according to their needs.

    A final remark about the undo function. Most software has undo on a top level. I do not understand why undo is not in the current quick access toolbar.

    I strongly hope for productivity improvements that I can stop using Maple 2025.2 for Screen Readers (having the former user interface). Please do something to reduce mouse movements and clicks of frequently used interface functions. There is too much tab switching between the 3 most important tabs (Home, Insert, Edit) and too little functionality and ease of use of the quick access toolbar.

    I would be interested to know which menu items other users would select.

    Hi again Maple community, and others,

    want to share
    tiwn_and_cousin_prime_numbers.mw
    tiwn_and_cousin_prime_numbers.pdf
    (spelling error in file name)

    ~

    just want to share,
    some successful code

    The lesser of the twin primes are listed
    {3,5,11,17,29,41,59,71}
    https://oeis.org/A001359
    Prime numbers p such that p+2 is also a prime number

    also, the lesser of the cousin primes are listed
    {3,7,13,19,37,43,67,79,97}
    https://oeis.org/A023200
    prime numbers p such that p+4 is also a prime number

    good fun

    also, my webpage has more details
    https://mattanderson.fun
    okay

    regards,
    Matt

    Would it be possible to include the file path in $File for the proposed header/footer insertions.

    Thanks in advance

    Peter

    I am very pleased to announce the publication of my new book written together with Nic Fillion, "Perturbation Methods Using Backward Error", which uses Maple heavily throughout.

    You can find it at

    the SIAM bookstore

    and I hope that you find it useful and interesting.

    You can also find a paper in Maple Transactions, written with Michelle Hatzel, that explains how we generated the image that was chosen for the cover.  Exploring Cover Designs for an Upcoming Book  In the end, the SIAM design people chose a different one than we had thought, but they did pick one of the ones we generated!  

    This was fun to do.

     

    a rainbow-hued image with many levels; two dark blue spots connected by a horizontal and a vertical blue line from each that intersect; alarming red spots in the upper and lower left corner
     

    Over the past few months, I've created a number of short videos. My intention is to help people use Maple more effectively. I occasionally give workshops introducing Maple and its programming language, and many of the topics come from questions I get from the participants. 

    These can be found on our Youtube channel. Here are the ones posted so far.

    What is a Workbook?
    Creating a Workbook
    How to Customize Your Maple Settings with the Options Dialog
    What is Maple Transactions?
    How to Submit an Article to Maple Transactions
    Quotation Marks in Maple
    Using Single Quotes to Prevent Evaluation
     

    If you find these helpful and have suggestions for future videos, please leave a comment, thanks!

    > kernelopts(version);
    Maple 2026.0, X86 64 LINUX, Apr 28 2026, Build ID 2011354

    Maple 2026.1 

    We have just released an update to Maple. Maple 2026.1 includes further enhancements to the new AI Assistant and Plotting Themes, as well as Explore, accessibility, and the math engine. As always, we recommend that all Maple 2026 users install this update. 

    In particular, please note that this update includes a fix to the problem where titles do not show up when using the Explore commands title option.  As always, thanks for helping us, and your fellow Maple users, by letting us know! 

    This update is available through Tools>Check for Updates in Maple, and is also available from the Maple 2026.1 download page on web site, where you can also find more details.  

    My  post with a valid  question (second time) on the Migration Assistant add-on was deleted by a moderator who thought that it was spam.

    I have decided to uninstall Maple Flow altogether and consider Smath Solver or CalcTree instead. It is unfortunate that Maple has such a bad customer service.

    my second Question was deleted by a "moderator" !!!!!!!!! what is this censorship????????? (spam i was told)

    NULL

    restart;

    Error, invalid input: diff received theta(s), which is not valid for its 2nd argument

    `Christoffel symbols:`

    `Geodesic equations on the unit sphere:`

    diff(diff(theta(s), s), s) = 0

    diff(diff(phi(s), s), s) = 0

    NULL

    Download geodesics.mw

    it contained only the file geodesics.mw

    Jean-Michel 

    Hi mapleprimes, and all,

    did a little exploration with the Matrix() and ifactor() Maple commands.

    prime_factorization_of_one_digit_numbers.mw

    have a look
    no warnings, and no errors

    Regards,
    Matt

    Hi Maple community, and all,

    My intrest in prime numbers continues.

    Made a quick example file.

    3_tuple_admissible_example.mw

    3_tuple_admissible_example.pdf

    also, see my webpage for similar content
    https://mattanderson.fun
    and Norman, in Germany
    prime k-tuplets & Primzahlen

    Enjoy

    Matt

     

     

     

     

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