<s>[INST] Finding extrema of sublevel set of the Hénon-Heiles potential function The inequality $$\frac{1}{2}(x^2+y^2)+x^2y-\frac{1}{3}y^3 \lt C$$ produces a somewhat triangular shape near the origin for $C \le \frac 16$, where $C$ is a constant.

Example when $C = 1/10$:


I am trying to find a closed form expression for the $(x,y)$ coordinate of the top of the "triangle" in terms of the constant $C$.  
$y = 0$ when $C = 0$ and $y=1$ when $C = \frac 16$.  
Background: This is the Henon-Heiles potential function
 [/INST] Assuming that the maximum can be found when $x=0$ and using the formulas of the "casus irreducibilis" (https://en.wikipedia.org/wiki/Casus_irreducibilis) I get
$$
y=\frac{1}{2}-\cos\left(\frac{1}{3} \arccos\left(1-12C\right)+\frac{\pi}{3}\right)
$$
The details:
Setting $x=0$ results in $y^3-\frac{3}{2}y^2+3C=0$. We substitute $y=t+\frac{1}{2}$ and get the "depressed" polynomial
$$
t^3-\frac{3}{4}t-\frac{1}{4}+3C=0
$$
We set $p=-\frac{3}{4}$ and $q=-\frac{1}{4}+3C$. It can easily be shown that
$$
\left(\frac{q}{2}\right)^2+\left(\frac{p}{3}\right)^3 \leq 0\;\; \mbox{for}\;\;0\leq C\leq \frac{1}{6}
$$
so the conditions for using the trigonometric method of the "casus irreducibilis" are fulfilled. The formula is as follows:
$$
t_k = 2\sqrt{-\frac{p}{3}}\cos\left(\frac{1}{3}\arccos\left(\frac{3q}{2p}\sqrt{-\frac{3}{p}}\right)-k\frac{2\pi}{3}\right)\;\;\mbox{for}\;\;k=0,1,2.
$$
We are lucky, because the coefficients of the depressed polynomial allow a lot of simplifications in this formula.
Finally, we only have to consider our initial substitution $y=t+\frac{1}{2}$ and find the appropriate $k$ for the root we are looking for. It turns out that $k=1$ is the correct choice. Additionally, I have used $\cos(\alpha) = -\cos(\alpha+\pi)$ to replace the $-\frac{2\pi}{3}$ with $\frac{\pi}{3}$, which is just a matter of personal preference.
</s>