This is a second follow-up to this question. For the ellipse centered at $(h,k)$ defined implicitly as
$$ \frac{(x-h)^2}{a^2}+\frac{(y-k)^2}{b^2}-1=0 \tag{1} $$
Please show the steps for calculating its dual curve and provide the equation for the dual curve. Do not solve by redefining the function parametrically. I know how to solve for parametric functions, but need to see the general algorithm for implicit functions.
Wikipedia provides a trivial example that does not help me.
My Attempt
At point $(p,q)$,
$$ X = \lambda \frac{2(p-h)}{a^2} \implies p = h + \left( \frac{a^2}{2\lambda} \right) X $$
$$ Y = \lambda \frac{2(q-k)}{b^2} \implies q = k + \left( \frac{b^2}{2\lambda} \right) Y $$
For incidence to occur, the inner product of the line $[X,Y]$ and point $(p,q)$ must be zero:
$$ \frac{a^2}{2\lambda}X^2 + hX + \frac{b^2}{2\lambda}Y^2 + kY = 0 $$
$$ a^2X^2 + b^2Y^2 + 2\lambda (hX + kY) = 0 \tag{2} $$
How should $\lambda$ be eliminated at this point?
Thought 1:
Can we homogenize the linear terms by $\frac{\left( hX + kY \right)}{-2\lambda}$? If so, we get
$$ a^2X^2 + b^2Y^2 - (hX+kY)^2 = 0 $$
$$ a^2X^2 + b^2Y^2 - (h^2X^2 + 2hkXY + k^2Y^2) = 0 $$
$$ (a^2-h^2)X^2 + (b^2-k^2)Y^2 - 2hkXY = 0 $$
but I'm not sure if this is the correct equation for the dual. Is there a way to check?
Thought 2:
Alternatively, can I just say that $\lambda = 1$? In this case, I get:
$$ a^2X^2+b^2Y^2+2(hX+kY)=0 $$
However, now my answer in Thought 1 is different from Thought 2.
The dual conics are for $ax^2+bxy+cy^2+dx+ey+f=0$ given by $$ (-\frac14e^2+cf)x^2+(\frac12de-bf)xy+(-\frac14d^2+af)y^2+(-cd+\frac12be)x+(\frac12bd-ae)y-\frac14b^2+ac=0$$ or $\begin{pmatrix}x&y&1\end{pmatrix}\begin{pmatrix}a&\frac{b}{2}&\frac{d}{2}\\\frac{b}{2}&c&\frac{e}{2}\\\frac{d}{2}&\frac{e}{2}&f\end{pmatrix}\begin{pmatrix}x\\y\\1\end{pmatrix}$ to $$\begin{pmatrix}x&y&1\end{pmatrix}\begin{pmatrix}-\frac14e^2+cf&\frac{\frac12de-bf}{2}&\frac{-cd+\frac12be}{2}\\\frac{\frac12de-bf}{2}&-\frac14d^2+af&\frac{\frac12bd-ae}{2}\\\frac{-cd+\frac12be}{2}&\frac{\frac12bd-ae}{2}&-\frac14b^2+ac\end{pmatrix}\begin{pmatrix}x\\y\\1\end{pmatrix}$$
from which you can see it's to do with the matrix of a conic and it's adjoint matrix which is the inverse when divided by the determinant.
For an explicit derivation see Perspectives on Projective Geometry by Jürgen Richter-Gebert:
Edit:
The $\lambda$-method works in Macaulay2:
$$(e^2-4cf)X^2+(-2de+4bf)XY+(4cd-2be)XZ+(d^2-4af)Y^2+(-2bd+4ae)YZ+(b^2-4ac)Z^2=0$$
It even gives you via
the combination of the generators that give this relation:
$$(X-\lambda (2ap+bq+dr))((e^2-4cf)X+(-de+2bf)Y+(2cd-be)Z)\\+(Y-\lambda (bp+2qc+er))((-de+2bf)X+(d^2-4af)Y+(-bd+2ae)Z)\\+(Z-\lambda (dp+eq+2fr))((2cd-be)X+(-bd+2ae)Y+(b^2-4ac)Z)\\ + (pX + qY + rZ)((2cd^2-2bde+2ae^2+2b^2f-8acf)\lambda)$$