Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 359 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

The mathematical constant Pi is spelled with a capital in Maple. If you spell it pi, it's just another variable, which, unfortunately, prettyprints exactly the same as the mathematical constant. However, the printed forms can be distinguished using the lprint command.

A (nonconstant) function of a random variable is itself a random variable. So your is already a random variable and there's no need to apply RandomVariable to it. Skip T1, and do what you want with Y, such as 

simplify(PDF(Y,t));

or, more directly,

simplify(PDF(1/X,t));

 

restart:

 

MaxAbsWithIndex:= proc(M::Matrix(numeric), col::posint)
# Returns the entry with maximal absolute value in column col
# and its row index.
local
     Max:= -infinity, i, MaxI, v, absv, Maxv,
     Rows:= proc(M) option inline; op([1,1],M) end proc
;
     for i to Rows(M) do
          v:= M[i,col];
          absv:= abs(v);
          if absv > Max then
               Max:= absv;
               MaxI:= i;
               Maxv:= v
          end if
     end do;
     (Maxv, MaxI)
end proc:

 

Pivot:= proc(M::Matrix(numeric), row::posint, col::posint)
uses RO= LinearAlgebra:-RowOperation;
local Max,MaxI;
     (Max,MaxI):= MaxAbsWithIndex(M, col);
     RO(RO(M, [row,MaxI], _rest), row, 1/Max, _rest)
end proc:
          

A:= LinearAlgebra:-RandomMatrix(3,4);

A := Matrix(3, 4, {(1, 1) = -32, (1, 2) = 27, (1, 3) = 99, (1, 4) = 92, (2, 1) = -74, (2, 2) = 8, (2, 3) = 29, (2, 4) = -31, (3, 1) = -4, (3, 2) = 69, (3, 3) = 44, (3, 4) = 67})

A1:= Pivot(A, 1, 1);

A1 := Matrix(3, 4, {(1, 1) = 1, (1, 2) = -4/37, (1, 3) = -29/74, (1, 4) = 31/74, (2, 1) = -32, (2, 2) = 27, (2, 3) = 99, (2, 4) = 92, (3, 1) = -4, (3, 2) = 69, (3, 3) = 44, (3, 4) = 67})

A;

Matrix(3, 4, {(1, 1) = -32, (1, 2) = 27, (1, 3) = 99, (1, 4) = 92, (2, 1) = -74, (2, 2) = 8, (2, 3) = 29, (2, 4) = -31, (3, 1) = -4, (3, 2) = 69, (3, 3) = 44, (3, 4) = 67})

Pivot(A, 1, 1, inplace);

Matrix(3, 4, {(1, 1) = 1, (1, 2) = -4/37, (1, 3) = -29/74, (1, 4) = 31/74, (2, 1) = -32, (2, 2) = 27, (2, 3) = 99, (2, 4) = 92, (3, 1) = -4, (3, 2) = 69, (3, 3) = 44, (3, 4) = 67})

A;

Matrix(3, 4, {(1, 1) = 1, (1, 2) = -4/37, (1, 3) = -29/74, (1, 4) = 31/74, (2, 1) = -32, (2, 2) = 27, (2, 3) = 99, (2, 4) = 92, (3, 1) = -4, (3, 2) = 69, (3, 3) = 44, (3, 4) = 67})

 

 

Download Pivot.mw

I think that the only reason to use Join would be if you wanted to use its second argument, the separator. I did some quick tests, and cat is quicker and uses less memory. Join is externally compiled and cat is built-in, so they're both pretty efficient.

How about shifting the z-coordinates of the centers of the base circles?

p1:= plottools:-cylinder([1, 1, 1], 1, 1):
p2:= plottools:-cylinder([1, 1, 2], 2, 3):
p3:= plottools:-cylinder([1, 1, 5], 1, 4):

plots:-display([p1,p2,p3]);

Here's an example of your 1, 2, and 3. There are many ways for 2 and 3. Pay special attention to the way that prime-power fields are created in Maple because it's a little unusual.

restart:
#0. Create the matrix
p:= Randprime(3,x) mod 2;
alias(x= RootOf(p,x)):
M:= Matrix(5,7, ()-> randpoly(x, degree= 3));

#1. Get the rank.
Gausselim(M, 'rank') mod 2:
rank;
     5


#2. Row sum squared
V:= Vector(op([1,1], M), i-> expand(add(y, y= M[i,..])^2));

#3. Dividing by row sum squared
Matrix(op(1,M), (i,j)-> M[i,j]/V[i]);

 

See the commands ?sign, ?primpart, and ?content. Using those, here's a short procedure for it:

p:=x^2*y-2*y*z+3*x^2+2*y-z:

RepeatPositiveTerms:= (P::polynom(integer))->
     [seq(`if`(sign(t)=1, primpart(t) $ content(t), [][]), t= [op(expand(P))])]
:

RepeatPositiveTerms(p);

     [x^2*y, x^2, x^2, x^2, y, y]

 

Any function can be made to map over a list by appending to its name:

abs~(L);
signum~(L);

Or, getting a bit fancier, there's

(abs~, signum~)(L);

 

Your system is overspecified: You have three equations, but only two unknown functions. This can't be solved.

In general, it is a bad idea to use D and gamma as variable names because they have predefined meanings in Maple; however, your usage of them here causes no problem.

The purpose of the macro below is to simplify the typing of the function. If you don't like it, you can just as well continue to use BesselJ and HermiteH.

macro(B= BesselJ, H= HermiteH):
F:= (Pi*B(1,x)*H(0,x) + 2*B(0,x) - Pi*B(0,x)*B(1,x)*H(0,x)) *
        exp(-x^2*D*t/alpha)*B(0,x/chi)/B(1,x)^2 -
        M[0]*T[2]*gamma*exp(-T[g]/T[0]*(t-delta));
params:=
      [M[0]= 8, g= 9.8, gamma= 1.17, r= 1.15, T[g]= 1.11111,
      T[0]= 3.666667, t= 5e-9, delta= 0.002, x= 3.478505,
      alpha= 5.36, k= 1.2, r= 1.15, D= 7.46];

plot3d([chi, eval(F, params), T[2]], chi= 0.22..0.25, T[2]= 300..900, grid= [4,4]);

The purpose of grid= [4,4] is to restrict chi and T[2] to the four discrete values that you specified. You could just as well omit it and then a 50x50 grid would be used.

The general command to solve it is pdsolve:

pdsolve(diff(c(x,t),t)=diff(c(x,t),x,x)-diff(c(x,t),x)-c(x,t), c(x,t));

But unless you specify the initial and boundary conditions in the command, the solution returned is somewhat trivial. (Perhaps "trivial" is not the right word: maybe "overly general" better describes it.) If you are having trouble putting the intial and boundary conditions into the form that Maple wants, let me know.

Use the command fnormal (see ?fnormal).

What makes you think that a solution exists within the ranges that you give?

You should try changing those three parameters gradually and one at a time to see where it stops giving you a solution. Then go one step back to where you had solution. Check if any variable is close to one boundary of its range. 

I did the above for your system. I was able to push t_prof and t_r all the way to 0.16 and t_w to 0.12. At this point M = 0.400056799031096, which is very close to its lower limit of 0.4. If I lower the lower limit of M, I can raise t_w.

 

restart:

 

The command debug is synonymous with trace. I'll try to get into the habit of calling it trace because that it a better description of what it does.

 

The goal of using trace in this worksheet is to see when procedures from package Groebner are called, and if they are called, where are they called from, what are the arguments, and what are the return values.

 

First, I will use it on this procedure that calls eliminate.

CoeffsOfLinComb:= proc(

     L::list(polynom),

     V::set(name):= indets(L, And(name, Not(constant))),

     $

)

local

     c, k, C:= {c[k] $ k= 1..nops(L)},

     S:= eliminate({coeffs(expand(`+`((C*~L)[])), V)}, C),

     F:= indets(rhs~(S[1]), name) intersect C=~ 1

;

     eval([C[]], eval(S[1],F) union F)

end proc:

 

PolyLinearCombo:= proc(

     F::list(polynom),

     f::polynom,

     V::set(name):= indets([F,f], And(name, Not(constant))),

     $

)

local C:= CoeffsOfLinComb([f, F[]], V);

     if f=0 then  return (true, [0$nops(F)])  end if;

     if C[1]=0 then  (false, [])  else  (true, -C[2..] /~ C[1])  end if

end proc:

 

F:= [a*A1 + b*A3, c*A2+d*A3]:
f:= e*A1+h*A2:

N:= {e*b*c + a*h*d}:  W:= [a,c]:

{a*d*h+b*c*e}

[a, c]

trace(Groebner);

[Groebner:-BasisTable, Groebner:-OutputBasis, [[MatrixOrder:-ModuleApply], ShortMonomialOrders:-VerifyOrder, [LeadingTermProc:-UserOrder, LeadingTermProc:-WalkOrder, LeadingTermProc:-ModuleApply], [NextMonomialProc:-ModuleApply], ShortMonomialOrders:-EliminationStructure, ShortMonomialOrders:-IsElimOrder, ShortMonomialOrders:-SimilarOrders, ShortMonomialOrders:-ProjectOrder, ShortMonomialOrders:-FGBOrder], Groebner:-MonomialOrder, [[gbasis:-init, gbasis:-compute, gbasis:-walk_compute, gbasis:-ModuleApply, gbasis:-gsolve_init, gbasis:-gsolve], Buchberger:-sort_list_by_lm, Buchberger:-normalize_sign, Buchberger:-minimize_gb, Buchberger:-inter_reduce_gb, Buchberger:-inter_reduce, Buchberger:-InterReduce, Buchberger:-GroebnerBasis, Buchberger:-NormalForm, Buchberger:-GSolve], [F4:-NormalForm, F4:-GroebnerBasis], Groebner:-RewriteProc, [FGLM:-ConvertGB, FGLM:-ModuleApply], [Walk:-ConvertGB, Walk:-ModuleApply], Groebner:-LeadingTerm, Groebner:-LeadingMonomial, Groebner:-LeadingCoefficient, Groebner:-TrailingTerm, Groebner:-WeightedDegree, Groebner:-InitialForm, Groebner:-Support, Groebner:-Homogenize, Groebner:-MatrixOrder, Groebner:-SuggestVariableOrder, Groebner:-RememberBasis, [SubstituteRootOfs:-substitute_rootofs, SubstituteRootOfs:-collect_rootof_powers, SubstituteRootOfs:-ModuleApply], Groebner:-Basis, Groebner:-InterReduce, Groebner:-Reduce, Groebner:-NormalForm, Groebner:-SPolynomial, Groebner:-Solve, Groebner:-RationalUnivariateRepresentation, Groebner:-UnivariatePolynomial, Groebner:-ModuleGB, Groebner:-IsProper, Groebner:-IsZeroDimensional, Groebner:-MaximalIndependentSet, Groebner:-HilbertDimension, [HilbertSeries:-ModuleApply], Groebner:-HilbertPolynomial, Groebner:-TestOrder, [MultivariateCyclicVector:-ModuleApply], Groebner:-NormalSet, Groebner:-MultiplicationMatrix, [ToricIdealBasis:-ModuleApply], Groebner:-IsBasis, Groebner:-fglm_algo, Groebner:-gbasis, Groebner:-gsolve, Groebner:-hilbertdim, Groebner:-hilbertpoly, Groebner:-hilbertseries, Groebner:-is_finite, Groebner:-is_solvable, Groebner:-leadcoeff, Groebner:-leadmon, Groebner:-leadterm, Groebner:-normalf, Groebner:-pretend_gbasis, Groebner:-reduce, Groebner:-inter_reduce, Groebner:-spoly, Groebner:-termorder, Groebner:-testorder, Groebner:-univpoly, Groebner:-SetBasis, Groebner:-MulMatrix, Groebner:-init, Groebner:-_pexports]

R:= PolyLinearCombo(F, f, {A||(1..3)}):

The absence of any output shows that none of the procedures in the above list are called.

R;

false, []

The procedure below uses simplify with side relations in addition to eliminate. We will see that the simplify does use Groebner procedures.

ExtPolyLinearCombo:= proc(
     F::list(polynom),
     f::polynom,
     V::set(name),
     Null::set(polynom):= {},
     NotNull::set(polynom):= {}
)
local
     c, k, C:= {c[k] $ k= 1..nops(F)},
     S:= eliminate(simplify({coeffs(expand(`+`((C*~F)[]) - f), V)}, Null), C)
;
     if
          lhs~(S[1]) <> C or
          not simplify(S[2], Null) subset {0}
          # or not andmap(s-> is(denom(rhs(s)) <> 0), S[1])
          #      assuming (NotNull <>~ 0)[], (Null =~ 0)[]
     then
          return false, []
     end if;
     
     true, eval([C[]], S[1])
end proc:

 

Note that I end the command below with a colon. This substantially reduces the amount of output. In this case, I am only interested in the entry and exit points.

R:= ExtPolyLinearCombo(F, f, {A||(1..3)}, N, W):

{--> enter Groebner:-SuggestVariableOrder, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, [_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]]

<-- exit Groebner:-SuggestVariableOrder (now in simplify/siderels:-simplify/siderels) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, output = basislm
{--> enter Groebner:-BasisTable, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0
<-- exit Groebner:-BasisTable (now in Groebner:-Basis) = table( [ ] )}
{--> enter ShortMonomialOrders:-SimilarOrders, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), []
<-- exit ShortMonomialOrders:-SimilarOrders (now in Groebner:-Basis) = []}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, itord, variables = {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}, characteristic = 0, output = basislm
value remembered (in Groebner:-Basis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [ ] )
{--> enter Groebner:-SuggestVariableOrder, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}
<-- exit Groebner:-SuggestVariableOrder (now in Groebner:-Basis) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter ShortMonomialOrders:-FGBOrder, args = tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-FGBOrder (now in Groebner:-Basis) = [[_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]]]}
{--> enter SubstituteRootOfs:-ModuleApply, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Basis) = {}, {}, [], {}}
{--> enter Groebner:-LeadingTerm, args = _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5], lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
{--> enter LeadingTermProc:-ModuleApply, args = lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-LeadingTerm) = proc (f) lc, lm := f, 1; for i to N do lc := lcoeff(lc, vars[i], 'lmt'); lm := lm*lmt end do; lc, lm end proc}
<-- exit Groebner:-LeadingTerm (now in fgbrs:-fgb_gbasis) = 1, _t[2]*_t[3]*_t[5]}
{--> enter Groebner:-RememberBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, skiptypecheck = true
value remembered (in Groebner:-RememberBasis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [( tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]) ) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]] ] )
<-- exit Groebner:-RememberBasis (now in Groebner:-Basis) = }
{--> enter Groebner:-OutputBasis, args = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
{--> enter LeadingTermProc:-ModuleApply, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-OutputBasis) = proc (f) lcoeff(f, vars, 'lm'), lm end proc}
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in simplify/siderels:-simplify/siderels) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-NormalForm, args = [_t[1]*c[1]-_t[5]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0
{--> enter Groebner:-Reduce, args = [_t[1]*c[1]-_t[5]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), s, FAIL, characteristic = 0, normalize = false
{--> enter SubstituteRootOfs:-ModuleApply, args = [[_t[1]*c[1]-_t[5]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Reduce) = {}, {}, [], {}}
{--> enter F4:-NormalForm, args = [_t[1]*c[1]-_t[5]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), 0
value remembered (in initf4): LeadingTermProc:-ModuleApply(plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])) -> proc (f) lcoeff(f, vars, 'lm'), lm end proc
{--> enter ShortMonomialOrders:-VerifyOrder, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-VerifyOrder (now in initf4) = true}
<-- exit F4:-NormalForm (now in Groebner:-Reduce) = [_t[1]*c[1]-_t[5]]}
<-- exit Groebner:-Reduce (now in Groebner:-NormalForm) = [_t[1]*c[1]-_t[5]]}
<-- exit Groebner:-NormalForm (now in simplify/siderels:-Reduce) = [_t[1]*c[1]-_t[5]]}
{--> enter Groebner:-SuggestVariableOrder, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, [_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]]
<-- exit Groebner:-SuggestVariableOrder (now in simplify/siderels:-simplify/siderels) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, output = basislm
{--> enter Groebner:-BasisTable, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0
<-- exit Groebner:-BasisTable (now in Groebner:-Basis) = table( [ ] )}
{--> enter ShortMonomialOrders:-SimilarOrders, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), []
<-- exit ShortMonomialOrders:-SimilarOrders (now in Groebner:-Basis) = []}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, itord, variables = {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}, characteristic = 0, output = basislm
value remembered (in Groebner:-Basis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [ ] )
{--> enter Groebner:-SuggestVariableOrder, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}
<-- exit Groebner:-SuggestVariableOrder (now in Groebner:-Basis) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter ShortMonomialOrders:-FGBOrder, args = tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-FGBOrder (now in Groebner:-Basis) = [[_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]]]}
{--> enter SubstituteRootOfs:-ModuleApply, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Basis) = {}, {}, [], {}}
{--> enter Groebner:-LeadingTerm, args = _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5], lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
{--> enter LeadingTermProc:-ModuleApply, args = lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-LeadingTerm) = proc (f) lc, lm := f, 1; for i to N do lc := lcoeff(lc, vars[i], 'lmt'); lm := lm*lmt end do; lc, lm end proc}
<-- exit Groebner:-LeadingTerm (now in fgbrs:-fgb_gbasis) = 1, _t[2]*_t[3]*_t[5]}
{--> enter Groebner:-RememberBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, skiptypecheck = true
value remembered (in Groebner:-RememberBasis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [( tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]) ) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]] ] )
<-- exit Groebner:-RememberBasis (now in Groebner:-Basis) = }
{--> enter Groebner:-OutputBasis, args = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
{--> enter LeadingTermProc:-ModuleApply, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-OutputBasis) = proc (f) lcoeff(f, vars, 'lm'), lm end proc}
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in simplify/siderels:-simplify/siderels) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-NormalForm, args = [_t[3]*c[2]-_t[6]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0
{--> enter Groebner:-Reduce, args = [_t[3]*c[2]-_t[6]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), s, FAIL, characteristic = 0, normalize = false
{--> enter SubstituteRootOfs:-ModuleApply, args = [[_t[3]*c[2]-_t[6]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Reduce) = {}, {}, [], {}}
{--> enter F4:-NormalForm, args = [_t[3]*c[2]-_t[6]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), 0
value remembered (in initf4): LeadingTermProc:-ModuleApply(plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])) -> proc (f) lcoeff(f, vars, 'lm'), lm end proc
{--> enter ShortMonomialOrders:-VerifyOrder, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-VerifyOrder (now in initf4) = true}
<-- exit F4:-NormalForm (now in Groebner:-Reduce) = [_t[3]*c[2]-_t[6]]}
<-- exit Groebner:-Reduce (now in Groebner:-NormalForm) = [_t[3]*c[2]-_t[6]]}
<-- exit Groebner:-NormalForm (now in simplify/siderels:-Reduce) = [_t[3]*c[2]-_t[6]]}
{--> enter Groebner:-SuggestVariableOrder, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, [_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]]
<-- exit Groebner:-SuggestVariableOrder (now in simplify/siderels:-simplify/siderels) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, output = basislm
{--> enter Groebner:-BasisTable, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0
<-- exit Groebner:-BasisTable (now in Groebner:-Basis) = table( [ ] )}
{--> enter ShortMonomialOrders:-SimilarOrders, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), []
<-- exit ShortMonomialOrders:-SimilarOrders (now in Groebner:-Basis) = []}
{--> enter Groebner:-Basis, args = {_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, itord, variables = {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}, characteristic = 0, output = basislm
value remembered (in Groebner:-Basis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [ ] )
{--> enter Groebner:-SuggestVariableOrder, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], {_t[1], _t[2], _t[3], _t[4], _t[5], _t[6]}
<-- exit Groebner:-SuggestVariableOrder (now in Groebner:-Basis) = _t[6], _t[5], _t[4], _t[3], _t[2], _t[1]}
{--> enter ShortMonomialOrders:-FGBOrder, args = tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-FGBOrder (now in Groebner:-Basis) = [[_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]]]}
{--> enter SubstituteRootOfs:-ModuleApply, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Basis) = {}, {}, [], {}}
{--> enter Groebner:-LeadingTerm, args = _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5], lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
{--> enter LeadingTermProc:-ModuleApply, args = lexdeg([_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]], [])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-LeadingTerm) = proc (f) lc, lm := f, 1; for i to N do lc := lcoeff(lc, vars[i], 'lmt'); lm := lm*lmt end do; lc, lm end proc}
<-- exit Groebner:-LeadingTerm (now in fgbrs:-fgb_gbasis) = 1, _t[2]*_t[3]*_t[5]}
{--> enter Groebner:-RememberBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0, skiptypecheck = true
value remembered (in Groebner:-RememberBasis): Groebner:-BasisTable({_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]}, 0) -> table( [( tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]) ) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]] ] )
<-- exit Groebner:-RememberBasis (now in Groebner:-Basis) = }
{--> enter Groebner:-OutputBasis, args = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], tdeg(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in Groebner:-Basis) = [[1, _t[2]*_t[3]*_t[5], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [_t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
{--> enter LeadingTermProc:-ModuleApply, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit LeadingTermProc:-ModuleApply (now in Groebner:-OutputBasis) = proc (f) lcoeff(f, vars, 'lm'), lm end proc}
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-OutputBasis, args = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), true
<-- exit Groebner:-OutputBasis (now in Groebner:-Basis) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
<-- exit Groebner:-Basis (now in simplify/siderels:-simplify/siderels) = [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]}
{--> enter Groebner:-NormalForm, args = [_t[2]*c[1]+_t[4]*c[2]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), characteristic = 0
{--> enter Groebner:-Reduce, args = [_t[2]*c[1]+_t[4]*c[2]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), s, FAIL, characteristic = 0, normalize = false
{--> enter SubstituteRootOfs:-ModuleApply, args = [[_t[2]*c[1]+_t[4]*c[2]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]]]
<-- exit SubstituteRootOfs:-ModuleApply (now in Groebner:-Reduce) = {}, {}, [], {}}
{--> enter F4:-NormalForm, args = [_t[2]*c[1]+_t[4]*c[2]], [[1, _t[1]*_t[4]*_t[6], _t[1]*_t[4]*_t[6]+_t[2]*_t[3]*_t[5]]], plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1]), 0
value remembered (in initf4): LeadingTermProc:-ModuleApply(plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])) -> proc (f) lcoeff(f, vars, 'lm'), lm end proc
{--> enter ShortMonomialOrders:-VerifyOrder, args = plex(_t[6], _t[5], _t[4], _t[3], _t[2], _t[1])
<-- exit ShortMonomialOrders:-VerifyOrder (now in initf4) = true}
<-- exit F4:-NormalForm (now in Groebner:-Reduce) = [_t[2]*c[1]+_t[4]*c[2]]}
<-- exit Groebner:-Reduce (now in Groebner:-NormalForm) = [_t[2]*c[1]+_t[4]*c[2]]}
<-- exit Groebner:-NormalForm (now in simplify/siderels:-Reduce) = [_t[2]*c[1]+_t[4]*c[2]]}

 

Note that it is only at an exit point that we see the name of the procedure which made the call.

R;

true, [e/a, h/c]

 

 

Download trace.mw

Here's a first draft of a solution procedure. For clarity, I changed the names of your and W to Null and NotNull, and I made them the fourth and fifth (optional) arguments, respectively, and I made them sets with the empty set as the default value.

I don't know how to effectively utilize the NotNull conditions. The two commented-out lines are my attempt. They check that all denomibators are provably nonzero under the given conditions. The problem is that there are equivalent answer forms with different denominators. For example, in your example problem, the coeffcient of F[2] would probably be computed by hand as h/c, but this is equivalent, under the Null condition, to -b*e/(a*d). In the first form, we can use the NotNull condition to prove that the denominator c can't be 0, but we can't do that for the second form.

In the case of a true answer, I'd like to return numeric values for the coefficients, but I don't know how. Specifically,

Is there any Maple command that can return an exact representation of just one feasible point for a system of polynomial equations?

In other words, given any feasible point for Null, I can give you numeric values for the linear dependency coefficients. With the huge number of commands available in the relatively new package RegularChains, I'd be a little surprised if there was no feasible-point command. But I've barely scratched the surface of the help pages for this package.

ExtPolyLinearCombo:= proc(
     F::list(polynom),
     f::polynom,
     V::set(name),
     Null::set(polynom):= {},
     NotNull::set(polynom):= {}
)
local
     c, k, C:= {c[k] $ k= 1..nops(F)},
     S:= eliminate({coeffs(expand(`+`((C*~F)[]) - f), V)}, C)
;
     if
          lhs~(S[1]) <> C or
          simplify(S[2], Null) <> {0}
          # or not andmap(s-> is(denom(rhs(s)) <> 0), S[1])
          # assuming (NotNull <>~ 0)[], (Null =~ 0)[]
     then
          return false, []
     end if;

     true, eval([C[]], S[1])
end proc:

First 255 256 257 258 259 260 261 Last Page 257 of 395