Solve by completing the square