From this result we can analyze the run time of BuildHeap.

Note that
, for
. The derivative of both sides,

, is equal to
.

Multiplying both sides of the equivalence by x we get

.

In our case k = h and x = 1/2.

Thus
= 2,
x = 1/2.

Thus the run time is