Finding the points on the curve $ax^2 -xy+c=0$ closest to the origin 
Given $a > 0$ and $c > 0$, find the two points on the curve $$ax^2 -xy+c=0$$ that are closest to the origin, in terms of $a$ and $c$.

I am stuck. I figured I could take the consider the square of the distance of the vector $(x,\frac{ax^2+c}{x})$ and try and minimize, but I seem to come to the quintic
$$2x^5a^2-2ax^4-2x^3-2cx^2-c^2=0$$
which I don't know how to factor. Is there something I'm doing wrong? When graphing the function I do indeed see two closest points.
 A: You have to minimize the function $$f(x)=\sqrt{x^2+\left(\frac{ax^2+c}{x}\right)^2}$$
You can instead take the function $$g(x)=x^2+\left(\frac{ax^2+c}{x}\right)^2$$
$$g'(x)=2\,x+4\,{\frac { \left( a{x}^{2}+c \right) a}{x}}-2\,{\frac { \left( a
{x}^{2}+c \right) ^{2}}{{x}^{3}}}
$$
Factorizing and simplifying we have to solve $$2\,{\frac {{a}^{2}{x}^{4}+{x}^{4}-{c}^{2}}{{x}^{3}}}=0$$
then you will have the following equation
$$x^4=\frac{c^2}{a^2+1}$$
A: So you want to find the minimum of:
$$d(x) = x^2 + \left(\frac{ax^{2} + c}{x}\right)^{2} = (a^2 + 1)x^2 + 2ac + \frac{c^2}{x^2}$$
Writing $x^2 = u$, we can take the derivative with respect to $u$ and get:
$$d(u) = (a^2 + 1)u + 2ac + \frac{c^2}{u} \Rightarrow d'(u) = a^2 + 1 - \frac{c^2}{u^2}$$
Since $u > 0$ and $c > 0$, this gives $u = \frac{c}{\sqrt{a^2 + 1}}$, and $x = \pm \sqrt{u}$
A: By AM-GM:
$$\require{cancel}
x^2+\left(ax+\frac{c}{x}\right)^2 = (a^2+1)x^2 + \frac{c^2}{x^2}+2ac \;\ge\; 2 \cdot\sqrt{(a^2+1)\cancel{x^2}\cdot \frac{c^2}{\cancel{x^2}}} + 2ac$$
The equality case of AM-GM holds for $\displaystyle\,(a^2+1)x^2 = \frac{c^2}{x^2}\,$.
A: We have the following quadratically constrained quadratic program (QCQP) in $(x,y) \in \mathbb R^2$
$$\begin{array}{ll} \text{minimize} & x^2 + y^2\\ \text{subject to} & a x^2 - xy + c = 0\end{array}$$
where $a > 0$ and $c > 0$. Let the Lagrangian be
$$\mathcal L (x,y,\mu) := x^2 + y^2 + \mu \left( a x^2 - xy + c \right)$$
Taking the partial derivatives of $\mathcal L$ with respect to $x$ and $y$ and finding where they vanish, we obtain the following homogeneous linear system
$$\begin{bmatrix} 2 (1 + a \mu) & -\mu\\ -\mu & 2 \end{bmatrix} \begin{bmatrix} x\\ y\end{bmatrix} = \begin{bmatrix} 0\\ 0\end{bmatrix}$$
Since $c > 0$, we are interested in solutions other than $(x,y) = (0,0)$. Thus, the determinant of the matrix must be zero, which produces the quadratic polynomial in $\mu$
$$\mu^2 - 4 a \mu - 4 = 0$$
Using the quadratic formula, we obtain
$$\mu = 2 \left(a \pm \sqrt{a^2+1}\right)$$
From the 2nd equation in the linear system, we obtain
$$y = \left(a  + \sigma \sqrt{a^2+1}\right) x$$
where $\sigma \in \{\pm 1\}$. Lastly, from the equality constraint $a x^2 - xy + c = 0$, we obtain
$$x^2 = \dfrac{\sigma \, c}{\sqrt{a^2+1}}$$
and, since $c > 0$, we have $\sigma = 1$. Thus, the points on the given curve closest to the origin are
$$\pm \left( \sqrt{\dfrac{c}{\sqrt{a^2+1}}}, \left(a + \sqrt{a^2+1}\right) \sqrt{\dfrac{c}{\sqrt{a^2+1}}} \right)$$
