Hi!
I'm trying to simplify expressions in the form of "a*b*c + d*e + f - g*h*h + i*a", basically the terms can be either added or subtracted and each term is a product of some symbols.
For example, I would like to turn the expression:
a**4 - 4*a**3*b + 6*a**2*b**2 - 4*a*b**3 - a + b**4
into:
(a - b)**4 - a
Both "simplify" and "factor" do not work. I tried to ask around about it but so far without luck. And that brings me here...
1. Are there any tricks in SymPy which could simplify the above expression?
2. If no, is it even possible to do such "compressions" in theory? The problem seems to be that sometimes one needs to add an expression only to be able to reduce some other expressions.
3. If I knew that one term is in the form of "(a - b)", would the help?
4. If all the answers turns out to be "no", what can I do? Could someone recommend a strategy on how to tackle such expression?
Thanks!