\[a^{3}b - 2a^{2}b^{2} + ab^{3} =\]
\[= \text{ab}\left( a^{2} - 2ab + b^{2} \right) =\]
\[= ab(a - b)²\]