A solid cube of side $2a$ and mass $M$ (moment of inertia for a cube of side $s$ about its center of mass is $I=1/6 Ms^2$) is sliding on a frictionless surface with constant velocity. It hits a small obstacle (inelastic collision) at the end of the table that causes the cube to tilt over as shown. Show that the minimum speed that the cube needs to tip over and fall of the table is: (Hint: you’ll need to use energy here)

$\displaystyle v\_{min}=4\sqrt{\frac{ga}{3}(\sqrt{2}-1)}$

[![enter image description here](https://i.stack.imgur.com/CCBGa.png)](https://i.stack.imgur.com/CCBGa.png)

**My attempt:**

For minimum initial velocity, the cube should have zero velocity when it is just about to tip over. So, the initial kinetic energy must be completely converted into potential energy. Initially, the cube's center of mass is at a height $a$ (measured from the top of the table). The length of a diagonal of a side of the cube is $2\sqrt 2a$. So, when the cube is about to tip over, the center of mass is at a height of $\sqrt 2a$.

$\frac{1}{2}mv^2=mg(\sqrt 2a-a)$

$v^2=2g(\sqrt 2a-a)$

$v=\sqrt{2ga(\sqrt 2-1)}$

This is not the answer given, so my approach is obviously wrong. Can someone tell me how to solve this problem?