Factorising by completing the square