2

Suppose you're given the ellipse

$$ (r - H)^T Q (r - H) = 1 $$

where $r = [x, y]^T $, $Q $ is positive definite, and $H$ is the center of the ellipse, and a point $A$ lying outside the ellipse (i.e. $(A-H)^T Q (A-H) \gt 1 $). I'd like to find the equations of the two tangents to the ellipse passing through point $A$.

Is there a standard way to do this? As a numerical example, take an ellipse with semi-major axis of $3$ and semi-minor axis of $2$ and a tilt angle of $\dfrac{\pi}{4}$ from the $x$ axis, then

$$Q = \dfrac{1}{72} \begin{bmatrix} 13 && -5 \\ -5 && 13 \end{bmatrix} $$

And let the ellipse be centered at the origin, so that

$$H = \begin{bmatrix} 0 \\ 0 \end{bmatrix} $$

And point $A$ is given by

$$A = \begin{bmatrix} -10 \\ 5 \end{bmatrix} $$

What are the equations of the tangents in this case ?

What I've tried:

The equations of the tangents are given by

$$ \left( (r - H)^T Q (r - H) - 1 \right) \left((A - H)^T Q (A - H) - 1\right) = \left( (r - H)^T Q (A - H) - 1\right)^2 $$

But this method leads to a quadratic equation in $r$ that has to be factored into two linear factors each giving one equation of the tangents.

Is there a more direct way to do this ?

enter image description here

Hosam Hajeer
  • 21,978
  • for an ellipse of equation $\frac{x^2}{a^2} + \frac{y^2}{b^2} =1$ the equation of the tangent line through point $(x_0,y_0)$ in the ellipse is $\frac{xx_0}{a^2} + \frac{yy_0}{b^2} = 1$. Hopefully it will help. – hellofriends Mar 04 '22 at 07:32

2 Answers2

2

Incomplete answer and is too long to post as comments.

  • There're always two tangents (real or complex) from the pole $\vec r_1$, the chord of contacts are the polar $s_1=0$ of the pole.

  • If we extend the ideas to quadrics, the quadratic form will be the enveloping cone whereas the contact is a touching conic.

  • You can always solve the tangent pair $s_1^2=s_{11}s$ explicitly for $y$ as quadratic in $x$ or vice versa.

  • Alternatively but indirect, with Joachimsthal's notations, solve the contact points first: $$\vec r_2, \vec r_3 \in s_1=0 \cap s=0$$ and then express the tangent one by one, that is $s_2$ and $s_3$.

See also one example in my post here, the usage of Joachimsthal's notations here and the case of hyperbola's asymptotes here.

Ng Chung Tak
  • 18,990
0

With $H = [0, 0]^T$, the equation of the tangents becomes

$ \left( r^T Q r - 1 \right) \left( A^T Q A - 1 \right) = \left(r^T Q A - 1\right)^2 $

where $ r= [x, y]^T $

Direct evaluation gives, term by term

$ r^T Q r = \dfrac{1}{72} ( 13 x^2 + 13 y^2 - 10 x y ) $

$ A^T Q A = \dfrac{2125}{72} $

$ r^T Q A = \dfrac{1}{72} ( -155 x + 115 y )$

Using these expressions and multiplying through by $(72)^2$, the equation becomes

$ ( 13 x^2 + 13 y^2 - 10 xy - 72) (2125 - 72) = (-155 x + 115 y -72)^2$

Evaluation of the above terms results in the following equation in simplest terms

$ 37 x^2 + 187 y^2 + 210 xy - 310 x + 230 y - 2125 = 0 $

Now this can be written as the following

$ r^T Q' r + r^T b' + c' = 0 $

with

$Q' = \begin{bmatrix} 37 && 105 \\ 105 && 187 \end{bmatrix} $

$b' = \begin{bmatrix} -310 && 230 \end{bmatrix} ^T$

$ c' = -2125 $

The center of this conic is at

$ r_0 = - \dfrac{1}{2} Q'^{-1} b' = [-10, 5]^T $

So we can write

$ (r - r_0)^T Q' (r - r_0) = 0 $

because $r_0^T Q' r_0 = c'$

Next we need to diagonalize $Q'$ into $R D' R^T $, then

$ (r - r_0)^T R D' R^T (r - r0) = 0 $

Define the vector $v = R^T (r - r_0) $, then

$ v^T D v = 0 $

which translates into $ D_{11} v_1^2 + D_{22} v_2^2 = 0 $

Analyzing matrix $Q'$ we find that its eigenvalues are

$ D_{11} = 112 - 15 \sqrt{74} $ and $D_{22} = 112 + 15 \sqrt{74} $

Note that $D_{11} \lt 0 , D_{22} \gt 0 $

Therefore, the solution to the quadratic equation in $v_1$ and $v_2 $ is

$ v_2 =\displaystyle \pm \sqrt{- \dfrac{ D_{11}}{D_{22}} } v_1 $

And finally, $ r = r_0 + R v $ gives the parametric equation of the two tangents.

A much better way to solve the problem is to take

a general line through point $A$ whose unit direction vector is $ d = [\cos \theta, \sin \theta ]^T $, then

$ r = A + t d $

If we intersect this line with the ellipse, we get

$ (A - H + t d)^T Q (A - H + t d ) = 1 $

Expanding this becomes

$ t^2 (d^T Q d) + 2 t d^T Q (A - H) + (A-H)^t Q (A - H) - 1 = 0 $

And we want to solve for $\theta $ that will result in a zero discriminant of this quadratic, i.e.

$ \left( d^T Q (A - H) \right)^2 - (d^T Q d) ( (A-H)^T Q (A - H) -1) = 0$

We have the following

$ d^T Q d = \dfrac{1}{72} ( 13 \cos^2 \theta + 13 \sin^2 \theta - 10 \cos \theta \sin \theta ) $

$ (A-H)^T Q (A-H) = \dfrac{2125}{72} $

$ d^T Q (A-H) = \dfrac{1}{72} ( -155 \cos \theta + 115 \sin \theta )$

Substituting these and multiplying through by $(72)^2$

results in

$ (-155 \cos \theta+ 115 \sin \theta )^2 - 2053 (13 \cos^2 \theta + 13 \sin^2 \theta - 10 \cos \theta \sin \theta ) = 0$

and this simplifies to

$ 37 \cos^2 \theta + 187 \sin^2 \theta + 210 \sin \theta \cos \theta = 0 $

Dividing by $ \cos^2 \theta$ we get

$ 187 \tan^2 \theta + 210 \tan \theta + 37 = 0 $

whose roots are

$ \tan \theta_1 = \dfrac{1}{187} \left(-105 - \sqrt{4106} \right) \approx -0.90416 $

$ \tan \theta_2 = \dfrac{1}{187} \left( -105 + \sqrt{4106} \right) \approx -0.21883 $

Now the two tangents are fully specified.

The second method is much much faster than the first one.

Hosam Hajeer
  • 21,978