I was solving a physics problem using lots of replacements for some expressions to get a manageable equation. Finally I got my answer, but it looked more like a waterfall than an actual result : R = f₁(P, Q) where P=f₂(A, B, C, D) where A=f₃(a, b, c) where a=f₄(R₁, R₂, R₃, R₄, R₅) and Q=[...].
So, I decided to express everything with the initial variables and get the best simplification I can (the intermediary steps do not have any physical meaning). I discovered the SageMath software which helped me to get a good expression (it got rid of a lot of square roots and ratios) but the returned answer was in an expanded form and I wasn't able to factorize it to get the shortest expression.
My only problem is the part inside a cubic root:
a⁶ +6a⁵b +3a⁴b² -28a³b³ -9a²b⁴ +54ab⁵ -27b⁶ +12a⁴bc +48a³b²c -24a²b³c -144ab⁴c +108b⁵c -3a⁴c² -12a³bc² +54a²b²c² +132ab³c² -171b⁴c² -24a²bc³ -48ab²c³ +136b³c³ +3a²c⁴ +6abc⁴ -57b²c⁴ +12bc⁵ -c⁶
It doesn't look that bad since it's just a polynomial expression, but it's huge... My problem is that I have no clue about which software to use or how to use it to get the shortest expression of this result. All I know is that a+b-c was a common pattern so it's probable that it will be in the expression : is there a software where I can input this information ?
Thank you for your answers.
Well, indeed it is possible to quite simplify the expression, as it is equal to : $$(a + 3 b - c)^3 (a - b + c)^3$$ (if I didn't make any error copying your expression).
To get this, I used mathematica and the function FullSimplify. For what I know, mathematica writes expression as trees, starting with the variables and combining them 2 by 2 with operations. It seems that FullSimplify just writes as many trees it can for the expression and chose the smallest one.
Do you have access to Mathematica ? I'm not used to Sage, but I guess it can do similar things.
Edit : I've seen that your expression appears in a cubic root, so I guess it is quite convenient that it is actually a cube (maybe it is not a coïncidence by the way).