<s>[INST] Find the shortest distance from the origin to the hyperbola $x^2+8xy+7y^2=225$ 
Find the shortest distance from the origin to the hyperbola $x^2+8xy+7y^2=225$

i know that
$$d(x_0, x) = \sqrt{(x-x_0)^2+(y-y_0)^2+(z-z_0)^2}$$
I also found this formula in my notes
$$ d(x_0,p) = \frac{|ax_0+by_0+cz_{0}-c|}{\sqrt{a^2+b^2+c^2}}$$
I just haven't seen it been applied in class so i'm a bit confused.
This was in a week we were learning about Lagrange Multipliers and we don't seem to be given a constraint.
 [/INST] To minimise the distance, the gradient at that point must be tangent to the circle centred at the origin (*):
$$2x + 8 \left(y + x \frac{dy}{dx} \right) + 14y \frac{dy}{dx} = 0$$
$$\implies (8x + 14y) \frac{dy}{dx} = -(2x+8y)$$
$$\implies \frac{dy}{dx} \frac{y}{x} = -1 \implies -\frac{x+4y}{4x+7y} \frac{y}{x} = -1  \tag{*}$$
$$\implies xy + 4y^2 = 4x^2 + 7xy$$
$$\implies 2(2x^2 + 3xy - 2y^2) = 0 \implies (2x - y)(x + 2y) = 0 \implies y = 2x,-\frac{x}{2}$$
and factorising the condition, $\left(x+y\right)\left(x+7y\right)=225$, thus $(3x)(15x) = 225 \Rightarrow x = ±\sqrt{5}$, $y = ±2 \sqrt{5}$, or $\left(\frac{1}{2} x\right)\left(-\frac{5}{2} x \right) =225$ which is impossible since the LHS is always not positive.
Hence the minimum distance is $\sqrt{x^2+y^2} = \sqrt{5 + 4 \cdot 5} = \boxed{5}$.
</s>