I have an equation which Mathematica solves but gives a huge output. However I notice in this output that the same expression occurs many times. Namely:
$E=864 a^6 - 432 a^4 b^2 + 54 a^2 b^4 - b^6 + 54 b^4 x^2$
where $a,b,c$ are constants. However this expression can appear in the form $-E$, $E^2$, $\sqrt{E}$, $4E$, ...
I'm struggling to tell Mathematica to make the replacement
$(864 a^6 - 432 a^4 b^2 + 54 a^2 b^4 - b^6 + 54 b^4 x^2) \space \to \space E$
wherever it appears.
All the ways I've tried (I'm not that handy with Mathematica I note) don't change output. Any ideas?
Ctrl+Shift+CandCtrl+Vto preserve space. – seismatica Aug 08 '14 at 18:25