Excuse the vagueness of this question, but how can you find the equation and distance for the diagonal of any given ellipse, that is, the line from the most-northwestern point to the most southeastern point?
The crude drawing below helps clarify:

Excuse the vagueness of this question, but how can you find the equation and distance for the diagonal of any given ellipse, that is, the line from the most-northwestern point to the most southeastern point?
The crude drawing below helps clarify:

On
Edit: Modified example
for example you have an equation for an ellipse like this: $k=2x^2+8y^2+1$.
k is now 9.
$9=2x^2+8y^2+5x-3y+5$
To find the endings of the axes you can use the Lagrangian Multiplier Method. The Funktion is here $\mathfrak L=x^2+y^2+\lambda (-4+2x^2+8y^2+5x-3y+5)$
If you max/min this function you will get the four coordinates for the endings of the two axis.
greetings,
calculus
Assume the ellipse is given by $$E:\quad{x^2\over a^2}+{y^2\over b^2}=1\ .\tag{1}$$ There are two ways to define the most-northwestern and most-southeastern points. The simpler idea consists in intersecting the $45^\circ$ lines $y=\pm x$ with the ellipse. I'm sure you can do this yourself.
But most probably you want the points where the tangent to $E$ is $45^\circ$ ascending. Intuitively they are the points where a $45^\circ$ line translated towards $E$ from far away first hits the ellipse. In order to determine these points we note that $E$ can be viewed as level line of the function $$f(x,y):={x^2\over a^2}+{y^2\over b^2}\ ,$$ and that at each point ${\bf z}\in E$ the gradient $$\nabla f(x,y)=\left({2x\over a^2},\>{2y\over b^2}\right)$$ is orthogonal to the tangent there. In the points ${\bf z}$ we are after we therefore have $\nabla f({\bf z})\perp(1,1)$. Tthis can be expressed by $\nabla f({\bf z})\cdot(1,1)=0$, or $${2x\over a^2}+{2y\over b^2}=0\ .\tag{2}$$ Equations $(1)$ and $(2)$ together determine the two points ${\bf z}_1$, ${\bf z}_2$ in question.