I have a somewhat lengthy expression, looking like
expr = 1 + x + b + Pi + 2*a
Is there some way of generating a relationship between
b that makes the parameters fall away? In the example above, that condition could look like
a -> -b/2 or
2*a == -b, because inserting that yields the new expression
expr2 = 1 + Pi
which is independent of both
b. Note that the relationship contains only the two variables; it leaves the terms not involving them intact (namely
x), in other words:
a can depend only on
b in the desired solution (if there is one of course).
I tried my best using the usual suspects (
SolveAlways, ...), but couldn't come up with a solution.
Background: My expression is a physical quantity that has certain mathematical parameters left in it. Being physical, it may not depend on the choice of the leftover parameters, ergo these parameters are not independent of each other. I would like to get rid of these placeholders, and doing so will tell me something about the physics in the ansatz that lead to the whole calculation.