I have a sphere of radius $r$, whose spherical cap has a height $h$:
Say I have the volume $V$ of another spherical cap (on the same sphere), whose height is $h_2<h$ (just to make this more interesting, say water filling a spherical pond to some height).
I wish to express $h_2$ as a function of $V$ and $r$. In a previous answer, the solution was given in the form of a cubic equation, which I understand. Plugging this equation into Wolfram gives an expression with a term,
$$ \sqrt{3V^2-4 \pi r^3 V} $$
where again $V$ is the (given) volume of the spherical cap and $r$ is the radius of the sphere. Taking out $3V$ (positive by definition) from the radical we get,
$$ \sqrt{3V}\sqrt{V-\frac{4}{3} \pi r^3} $$
which will always be complex if the volume of the sphere is greater than the volume in question. I may be missing something, but I don't understand how that's possible (how can we distribute a volume greater than a volume of the sphere in a fraction of that sphere...?) - I assume I just have a mistake somewhere. Would be great to get reprimanded as long as I figure this out... :-). Thanks.

Ok, I realized what's wrong (just in case someone Googles it in the future).
The answer contains two complex numbers whose imaginary parts cancel one another, making the total answer a real number.