A branch and bound algorithm is developed for the global optimization problem of minimizing a weakly convex function

$f$ over a compact set

${\Omega}$ from

${\mathbb{R}}^{n}$. Starting with a known ellipsoid

$E$ containing

${\Omega}$, the algorithm uses successive ellipsoidal bisections of

$E$ as proposed by

*L. T. H. An* [Math. Progr. 87, 401–426 (2000;

Zbl 0952.90031)]. To obtain a lower bound for

$f\left(x\right)$ over an ellipsoid,

$f$ is written as the sum of a convex and a concave function and the concave term is underestimated by an affine function. Convergence of the general algorithm is verified. Furthermore, for the special case that both

$f$ and

${\Omega}$ are convex, an algorithm is presented which generalizes the ball approximation algorithm by

*A. Lin* and

*S.P. Han* [SIAM J. Optim. 15, 129–138 (2005;

Zbl 1077.90045)] in the sense that the norm objective in the original algorithm is replaced by an arbitrary convex function. The numerical performance of this new ball approximation algorithm is compared with that of SEDUMI 1.1 (see

http://sedumi.ie.lehigh.edu/) and that of two gradient projection algorithms where the algorithms are applied to a number of quadratically constrained quadratic optimization problems. Moreover, the branch and bound algorithm is compared with a scheme given in the above mentioned paper by

*L. T. H. An* [loc. cit.].