I have an expression: $p=a\;b\; x + b^2\; y + a\;c\; z$. I want to substitute $a\;b=1$, $b^2 = 2$ and $a\;c = 4$ to obtain $p = x + 2y + 4z$.
How can I tell Mathematica to do that? I dont know how to start.
A reliable approach would use the third argument of
In the former editions of Mathematica (
or even simply appropriate rules replacement (in general this approach cannot be used seamlessly though)
It would be reasonable to mention another two functions useful in similar tasks. Taking this polynomial identiclly equal to zero:
we can rewrite it in terms of another three polynomials which are also identically zeros by the assumptions:
thus we know that the resulting polynomial will be equal to zero as well:
similarily we can find a Groebner basis of polynomials
These two methods are more useful when we want to find different representations of (polynomial) expressions in polynomial rings, thus we needn't assume that polynomials