Question 255485
<pre>
{{{p^3-4q^2+p^2-8q^3}}}

{{{p^3+p^2-4q^2-8q^3}}}

{{{p^3-8q^3+p^2-4q^2)}}}

{{{(p^3-8q^3)+(p^2-4q^2)}}}

Factor the first parentheses as the difference
of two cubes and the second as the difference of two
squares:

{{{(p^3-(2q)^3)+(p^2-(2q)^2)}}}

{{{(p-2q)(p^2+2pq+4q^2)+(p-2q)(p+2q)}}}

Now notice the red factors are the same:

{{{red((p-2q))(p^2+2pq+4q^2)+red((p-2q))(p+2q)}}}

so I can factor out the common red factor:

{{{red((p-2q))((p^2+2pq+4q^2)+(p+2q))}}}


{{{(p-2q)(p^2+2pq+4q^2+p+2q)}}}

Edwin</pre>