Group the first two terms and the last two terms.

Factor out the greatest common factor (GCF) from each group.

Factor the polynomial by factoring out the greatest common factor, .

Rewrite as .

Rewrite as .

Since both terms are perfect squares, factor using the difference of squares formula, where and .

Remove unnecessary parentheses.

Factor over the Complex Numbers 18x^3-9x^2y-2xy^2+y^3