Consider the following two
a^2 q^2 + q^4 c^2 // FullSimplify
q^2 (a^2 + c^2 q^2)
a^2 q^2 + q^4 (1 + c)^2 // FullSimplify
a^2 q^2 + (1 + c)^2 q^4
I would like the output of the second example to factor out the
q^2 just like in the first example. Is there a way to make
FullSimplify do that?
Note that the examples above are very simple just to illustrate the point. Ideally, I would like to apply the simplification to very large (rational) expressions that cannot be inspected visually.