Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 31 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

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:

I can't be sure about this without seeing the details of your problem, but try this:

G:= subs(FF= F(a,b,l), proc(a,b,N) add(FF, l= 1..N) end proc):

The ability to use subs like this is one of the most powerful features of the Maple language.

Let me know how that goes; like I said, I can't be sure about it. If it does work, then there's little point in having the procedure F, because it fully evaluates when passed fully symbolic arguments.

Another way, using unapply, is

G:= unapply('add'(F(a,b,l), l= 1..N), [a,b,N]);

Note that the add is enclosed in unevaluation quotes.

The default spacestep is 1/20 of the spatial range, which makes it .05 in your case. The default timestep is the spacestep. So the time that you're asking it to plot is less than 1/8 of a single timestep. To correct this, add the options spacestep= 1e-3 and timestep= 1e-3 to the pdsolve command. I have done this, and it does remove the negativity from the graph.

These PDE solvers are not "adaptive" like ODE solvers, meaning that they do not adjust the step size on their own.

You can plot the region separately with plot3d and merge it with the VolumeOfRevolution plot:

R1:= plot3d([x,0,y], x= 1..exp(1), y= -ln(x)..ln(x)):

V1:= Student:-Calculus1:-VolumeOfRevolution(
     ln(x), -ln(x), x= 1..exp(1), scaling= constrained, axis= vertical, output= plot
):

plots:-display(R1,V1);

I don't know what you mean by "avoid the singularity". Your function is singular at t=0, and there's no way to change that. Just don't try to evaluate it at 0.

Your other problem is caused by trying to differentiate with respect to a number. What you need to do is create the procedure E2 with unapply. Then the differentiations will be done symbolically. Here's your code, essentially. I removed superfluous parentheses, the (x,t)->, and the unneeded package loading.

restart:
g1:= -sqrt(t/Pi/r^3)/2 * (sin(r*(x-1)^2/4/t+Pi/4)-sin(r*(x+1)^2/4/t+Pi/4)):
g2:= int(g1, r= 1..infinity):
g3:= diff(g2,t):
g4:= diff(g2,x$2):
g5:= (g3^2+g4^2)/2:

And here's E2:

E2:= unapply(Int(g5, x= 0..100, epsilon= 1e-4, digits= 7), t):

Note the capital-in Int. This will avoid wasting time trying symbolic integration and will go directly to numeric integration when evalf is applied. The epsilon and digits arguments will decrease the precision and increase the speed. The precision will still be adequate for a plot. The plot command is

plot(E2, 0..20, numpoints= 50, labels= [t, ``]);

This will take two to three minutes.

These numbers can be extracted very simply and quickly as map2(-op, 1, roots(numer(q))) and map2(-op, 1, roots(denom(q))) or a slight variation of those if you need the multiplicities and/or assignment to a[1]a[2], ..., b[1]b[2], .... 

To plot column Vector as a function of same-length column Vector X, simply do

plot(< X | A >);

I don't mean to disparage Mac Dude's Answer; certainly it is what one would use in most cases. However, it is so obvious that I'd be surprised if it hadn't already occurred to the OP. Thus, I wonder whether the OP had something else in mind: to express the iteration over two variables with a (single) loop. This is possible, and it can be done for an arbitrary number of variables.

The easiest case is when the set of desired n-tuples can be expressed as a Cartesian product A^for some set A. In the example that the OP gives, this would be {$1..10}^2. For these cases, combinat:-permute can be used. Like this:

for ij in combinat:-permute(op~([[$1..10] $ 2]), 2) do
     (i,j):= ij[];
     #rest of loop
end do:

Cases where the n-tuples are the Cartesian product of different sets can also be handled. This requires an auxillary procedure---a substitute for combinat:-permute---that returns the Cartesian product. Here is one such:

CartProdSeq := proc(L::seq(list))
local Seq,i,j;
option `Copyright (C) 2007, Joseph Riel. All rights reserved.`;
eval([subs(Seq=seq, foldl(Seq
                             , [cat(i,1..nargs)]
                             , seq(cat(i,j)=L[j],j=nargs..1,-1)
                            ))]);
end proc:

And an example of using that in a loop: Suppose we wish to vary from 1 to 10, j from 1 to 9, and k from 1 to 8:

for ijk in CartProdSeq([$1..10], [$1..9], [$1..8]) do
     (i,j,k):= ijk[];
       #rest of loop
end do:

 

MDD, 

Please test the procedures in the attached worksheet. The first procedure, Homogenize, does what you want to the list of polynomials, F. The second procedure, MDD, is just a trivial one-liner that allows for your distinguished single polynomial, f.


restart:

(* In these comments, by "monomial", I always mean a product of powers of variables
without the coefficients. The monomial of the constant term is 1.

This procedure takes a list of polynomials, F, and substitutes an ordered list
created variables for the monomials.
*)
Homogenize:= proc(
     F::list(polynom),
     V::list(name),
     T::ShortMonomialOrder,
     #The prefix of the names that will be substituted for the monomials
     prefix::symbol
)
local
     n:= nops(F),
     k, #integer index into F
     #All tables are indexed by the position in F: k
     Mons:= table(), #The monomials in F[k], with 1 changed to 0
     Cofs:= table(), #The coefficients of F[k]
     Cons:= table(sparse), #The constant term of F[k]
     p, #position of 1 or 0 in M or TM[k]
     M, #Monomials in F[k], or all monomials excluding 1
     m, #nops(M)
     AL, #The homogenized variable for the constant term; the prefix + the highest
         #numbered suffix; prefix||(m+1)
     S #Substitution list of homogenous variables for monomials
;
     for k to n do
          Cofs[k]:= [coeffs(F[k], V, 'M')];
          M:= [M];
          #If M has 1, we need to change it to 0 so that we can later
          #get just the nonconstant terms by multiplication.
          if member(1, M, 'p') then
               M:= subsop(p= 0, M);
               Cons[k]:= Cofs[k][p]
          end if;
          Mons[k]:= M[]
     end do;
     M:= sort(
          [({entries(Mons,'nolist')} minus {0})[]],
          (a,b)-> Groebner:-TestOrder(b,a,T)
     );
     m:= nops(M);
     S:= M=~ [A||(1..m)];
     AL:= A||(m+1);
     [seq(`+`((Cofs[k]*~subs(S,[Mons[k]]))[]) + Cons[k]*AL, k= 1..n)]
end proc:          
                

#A wrapper for the above procedure that allows for one distinguished polynomial
MDD:= (F,f)-> (R-> (R[1],R[2..]))(Homogenize([f,F[]],_rest)):
    

MDD's example:

F:= [a*x^2*y^2+3*b*x*z^3+4, y*z+x*z+c-1];
f:= x^2*y-x*z+x*y*z+z^3-4+b+y*z^2;
V:= [x,y,z]:

[a*x^2*y^2+3*b*x*z^3+4, x*z+y*z+c-1]

x^2*y+x*y*z+y*z^2+z^3-x*z+b-4

(ff,FF):= MDD(F, f, V, plex(V[]), A);

A2+A3-A5+A6+A8+(b-4)*A9, [A1*a+3*A4*b+4*A9, A5+A7+(c-1)*A9]

Roman's example:

Homogenize([a*x^2*y^2+b*x^2*y^2, a*x^2*y^2, b*x^2*y^2], [x,y], plex(x,y), A);

[(a+b)*A1, a*A1, b*A1]

 

``


Download Homogenize.mw

 

Symbolically eliminating the parameter is only possible in very special cases. (Whether this is such a case I don't wish to discuss in this Answer.) Cases where Y can be completely expressed as a function of X are so trivial that they rarely are used in practice. One obstacle is that a range of the parameter must be specified so that Y is indeed a function of X rather than there being possibly multiple Y for each X. However, if you do specify such a range of the parameter, then it may be possible to at least give a numerical procedure that expresses Y as a function of X. Here is one for your example:

X:= (theta)-> cos(theta) + 0.8e-1*cos(3.*theta):
Y:= (theta)-> -sin(theta)+ 0.8e-1*sin(3.*theta):

YY:= proc(XX::numeric, theta_range::range)
local theta;
     Y(fsolve(X(theta)=XX, theta= theta_range))
end proc:

plot('YY(XX, 0..Pi)', XX= -1..1);

This is crude, and can be improved with some error checking, such as making sure that the fsolve actually returns a numeric value. 

To correct the "too many levels of recursion" error, in the definition of function g0, change sum to add. The problem with sum is that it tries to simplify these horrendously long nested piecewise expressions using symbolic j. If you use add, then it only uses definite integer values of j, and the piecewise expressions can be immediately resolved.

Apply CylindricalAlgebraicDecompose separately to the numerator and denominator of your rational function. You can use numer(r) and denom(r) to extract the numerator and denominator of rational function r. In some cases, it may be beneficial to first use normal(...), as in denom(normal(r)). See ?numer for some examples.

If you don't want to go the simplify(..., symbolic) route---which can be risky---it's easy to have a one-liner procedure that extracts all the bases of `^` expressions and and sets them  > 0


restart:

AllBasesPositive:= e-> (map2(op, 1, indets(e,`^`)) >~ 0)[]:

 

z:= ((-u(f,g)+u(h,e))^(1/a))^a+ sin(x)^2+cos(x)^2;

((-u(f, g)+u(h, e))^(1/a))^a+sin(x)^2+cos(x)^2

simplify(z) assuming AllBasesPositive(z);

-u(f, g)+u(h, e)+1

simplify(z, power) assuming AllBasesPositive(z);

-u(f, g)+u(h, e)+sin(x)^2+cos(x)^2

 


Download AllBasesPositive.mw

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