Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Inequation solution doesn't isolate the operational variable

One more time I encounter a problem I cannot find a solution by myself. In the following code

D = polytopes.dodecahedron()
DH = D.Hrepresentation()
x = list(var('x_%i' % i) for i in (0..2))
#show(DH)
Ineq=[[el.A()*vector(x) >=-el.b()] for el in DH]
#show(Ineq)
sol=[solve(ieq[0],x[0]) for ieq in Ineq]
sol1=[el[1] for el in sol]
show(sol1)

when ieq[0] doesn't depend of x[0], sol1 is return as entered. It's perfectly normal. But I ask to solve on x[0]. Many answers do not isolate x[0] (for instance, it is the case for sol[2]) which is what I ask for. How can I code in such way that SageMath do it by default ?

Inequation solution doesn't isolate the operational variable

This is a follow-up to

One more time I encounter a problem I cannot find a solution by myself. myself. In the following codecode:

D = polytopes.dodecahedron()
DH = D.Hrepresentation()
x = list(var('x_%i' % i) for i in (0..2))
#show(DH)
# show(DH)
Ineq=[[el.A()*vector(x) >=-el.b()] >= -el.b()] for el in DH]
#show(Ineq)
sol=[solve(ieq[0],x[0]) # show(Ineq)
sol = [solve(ieq[0], x[0]) for ieq in Ineq]
sol1=[el[1] sol1 = [el[1] for el in sol]
show(sol1)

when ieq[0] doesn't depend of x[0], on x[0], sol1 is return is returned as entered. entered. It's perfectly normal. But I ask to solve on x[0]. Many answers do not not isolate x[0] (for instance, it is the case for sol[2]) which is what what I ask for. How can I code in such way that SageMath do does it by default ? default?