Quadratic equations in Banach spaces