So I've got Mathematica to handle the grunt work for me to obtain expression:
Root[ (* blah, blah *) + #^2 + (* etc, etc *) ]
Now, the value inside Root is a polynomial whose all coefficients are at a range of values that Root cannot evaluate symbolically. I actually tried to it forcefully (that is, numerically), but the computer just keeps at it for hours. So I gave up on that.
Anyways, for further processing, I just extract the arguments of Root -- which can be done with function substitution and a some simple text manipulation:
sol = (* blah, blah *) + #^2 + (* etc, etc *)
Then I want to replace slot # and other slots so I can then apply more operations. And, this is where I get stuck... I don't know how to do it. I've tried:
sol & [x] (* say I want all # to be x *)
So how do I do this?
EDIT: I've editted #3 to #. I really don't know why I didn't do so in the first place, but I soon as I noticed possible misconstrusion, I just panicked.
#3
tells me that you do not have a simpleRoot[]
object, but a "triangular" one obtained from not finishing the Gröbner basis reduction in full. Why not share the entire thing? Alternatively, you might first want to do aRootReduce[]
to turn it into a simpleRoot[]
object where all the slots are of the form#1
and the polynomial inside is really the minimal polynomial corresponding to the root. $\endgroup$#3
is a short way to refer to the third argument of a pure function. I don't think anyone here will fault you for using#1
. $\endgroup$MinimalPolynomial[]
. $\endgroup$