Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Don't expect a clean expression from the output of solve. Instead, print (or show) the solution by substitution and apply additional methods to simplify the expressions. In this case, you can replace the last line by

good1step4 = solve(step2[0].subs(good2step3),x1)
print("x2 =", x2.subs(good2step3).canonicalize_radical())
print("x1 =", x1.subs(good1step4).canonicalize_radical())