I have made a copy of
Rochester/setAlgebra35SystemMatrices/solve_RREF.pg
which I am trying to modify.
This is a problem involving a set of linear equations in six variables, x1,x2,... x6, some of which are free.
The original code is quite complicated and I do not understand how to edit it.
To the point: What students will see as the value for x1, what Webwork generates from
ANS(fun_cmp(($ans[1]),var=>["x1","x2","x3","x4","x5","x6"]));is
−7−(−9)x2−(−1)(5−(−6)(1−(−5)x5−(−2)x6)−1x5−0x6)−(−9)(1−(−5)x5−(−2)x6)−(−2)x5−(−6)x6
which simplifies to
13 + 9 x2 + 76 x5 + 36 x6
How can I get work to change $ans[1] from the former messy form to the latter simplified form?
Thanks in advance,
Jimmy Mc Laughlin
PS I don't know if it is necessary to show more of the problem code, or if there is a standard WebWork command like Simplify[ ] in Mathematica that will simplify any algebraic expression.