0

Is there a derivation for the formula $ tan2θ = \frac{B}{A-C} $ relationship used to find an angle of rotation at which the coordinate axes for a conic containing an xy term can be rotated to eliminate the xy term? I only see sources that directly show the formula and say that it is derived by setting $ x'y' = 0 $ but I want to see the actual derivation.

3 Answers3

2

You start with the general equation of a conic

$A x^2 + B x y + C y^2 + D x + E y + F = 0 $

Define the vector $r = [x, y]^T $ , then the above can be written in compact form as

$ r^T Q r + b^T r + c = 0 \hspace{10pt}(1) $

with

$Q = \begin{bmatrix} A && \dfrac{B}{2} \\ \dfrac{B}{2} && C \end{bmatrix}$ , $ b = \begin{bmatrix} D \\ E \end{bmatrix}$, $c = F $

Now rotate the axes by an angle $\theta$ , then in terms of the rotated coordinates $r'=[x',y']^T$ , we have

$r = {R r}' \hspace{10pt}(2) $

where

$R = \begin{bmatrix} \cos \theta && - \sin \theta \\ \sin \theta && \cos \theta \end{bmatrix} \hspace{10pt}(3)$

Using $(2)$ in $(1)$ gives

$ r'^T R^T Q R r' + b^T R r' + c = 0 \hspace{10pt} (4) $

Now the matrix $R^T Q R$ is given by

$ Q' = R^T Q R =\begin{bmatrix} \cos \theta && \sin \theta \\ -\sin \theta && \cos \theta \end{bmatrix} \begin{bmatrix} A && \dfrac{B}{2} \\ \dfrac{B}{2} && C \end{bmatrix} \begin{bmatrix} \cos \theta && - \sin \theta \\ \sin \theta && \cos \theta \end{bmatrix} $

Multiplying out this triple product, we get

$Q'= R^T Q R = \begin{bmatrix} A \cos^2 \theta + C \sin^2 \theta + B \sin\theta \cos\theta && (C - A)\sin \theta \cos \theta + \dfrac{B}{2} (\cos^2 \theta - \sin^2 \theta) \\(C - A)\sin \theta \cos \theta + \dfrac{B}{2} (\cos^2 \theta - \sin^2 \theta) && A \sin^2 \theta + C \cos^2 \theta - B \sin \theta \cos \theta \end{bmatrix} $

To eliminate the off-diagonal elements, we have to select $\theta$ such that

$ (C - A)\sin \theta \cos \theta + \dfrac{B}{2} (\cos^2 \theta - \sin^2 \theta) = 0 $

Using the double angle formula, this simplifies to

$ \dfrac{1}{2} (C - A) \sin(2 \theta) + \dfrac{B}{2} \cos(2 \theta) = 0 $

From which it follows that we must have

$ \tan(2 \theta) = \dfrac{ B }{A - C} $

Hosam Hajeer
  • 21,978
1

Let's first recall some concepts.

  1. If the $x$ and $y$-axes are rotated by some angle $\theta$, then the coordinate axes $x$ and $y$ will be defined in terms of the unrotated coordinate axes $x'$ and $y'$ in the form \begin{align*} x &= x' \cos\theta - y'\sin\theta \\ y &= x' \sin\theta - y'\cos\theta \end{align*}

  2. The general formula of a conic section is $$Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.$$


Now, let's apply the rotation formula to the general formula of a conic.

\begin{align*} A(x' \cos\theta - y'\sin\theta)^2 + B(x' \cos\theta - y'\sin\theta)(x' \sin\theta - y'\cos\theta) + C(x' \sin\theta - y'\cos\theta)^2 + D(x' \cos\theta - y'\sin\theta) + E(x' \sin\theta - y'\cos\theta) + F &= 0 \\ \end{align*}

By grouping in terms of $(x')^2$, $(y')^2$, $x'$, and $y'$, we must have \begin{align*} (A\cos^2\theta + B\sin\theta\cos\theta + C\sin^2\theta)(x')^2 + \left((C-A)2\sin\theta\cos\theta + B(\cos^2\theta - \sin^2\theta)\right)x'y' + (A\sin^2\theta - B\sin\theta\cos\theta + C\cos^2\theta)(y')^2 + (D\cos\theta + E\sin\theta)x' + (E\cos\theta - D\sin\theta)y' + F &= 0 \\ (A\cos^2\theta + B\sin\theta\cos\theta + C\sin^2\theta)(x')^2 + \left((C-A)\sin 2\theta + B\cos 2\theta\right)x'y' + (A\sin^2\theta - B\sin\theta\cos\theta + C\cos^2\theta)(y')^2 + (D\cos\theta + E\sin\theta)x' + (E\cos\theta - D\sin\theta)y' + F &= 0 \\ \end{align*}

To remove the $x'y'$ term, we must have $(C-A)\sin 2\theta + B\cos 2\theta = 0$. Then, \begin{align*} (C-A)\sin 2\theta + B\cos 2\theta &= 0 \\ (C-A)\sin 2\theta &= -B\cos 2\theta \\ (A-C)\sin 2\theta &= B\cos\theta \\ \frac{\sin 2\theta}{\cos 2\theta} &= \frac{B}{A - C} \\ \tan 2\theta &= \frac{B}{A - C} \end{align*}

soupless
  • 2,344
1

A useful way to proceed is to derive the equation of a conic in general position.


Consider a conic with eccentricity $e>0$ (no circles), semi-latus rectum $s$, focus $(f_x, f_y)$, and major radius direction vector $(\cos\theta,\sin\theta)$. The focus-directrix definition of the (non-circle) conic $$\text{distance to focus} = \text{eccentricity}\cdot(\text{distance to directrix}) \tag0$$ tells us that the distance from the endpoints of the latus rectum (and thus also the focus) to the directrix is $s/e$. Therefore, we can write the equation of the directrix, whose normal vector is $(\cos\theta,\sin\theta)$, as $$ (x-f_x)\cos\theta+(y-f_y)\sin\theta-\frac{s}{e} = 0 \tag1$$ Since $\sin^2\theta+\cos^2\theta=1$, the (signed) distance from $(x,y)$ to the directrix is the left-hand side of $(1)$. Substituting into the square of $(0)$ and lightly simplifying, we have this equation for a conic (that happens to work for circles): $$(x-f_x)^2+(y-f_y)^2 \;=\; \left(\; (x-f_x)e\cos\theta+(y-f_y)e\sin\theta-s \;\right)^2 \tag{2}$$ Expanding $(2)$, gathering terms, and allowing for having multiplied-through by an arbitrary constant $k\neq 0$, gives us the representation $K(x,y)=0$, with polynomial $K$ given by \begin{equation} K(x,y) := k_{20}x^2+2k_{11}x y+k_{02}y^2+2k_{10}x+2k_{01}y+k_{00} \end{equation} whose coefficients are the following expressions in the conic's parameters (and $k$): $$\begin{align} k_{20} &:= \phantom{-}k (1 - e^2 \cos^2\theta)\\[0.25em] k_{02} &:= \phantom{-}k (1 - e^2 \sin^2\theta)\\[0.25em] k_{11} &:= -k e^2 \cos\theta\sin\theta \\[1em] k_{10} &:= \phantom{-}k e s \cos\theta - k_{20}f_x - k_{11}f_y \\[0.25em] k_{01} &:= \phantom{-}k e s \sin\theta - k_{11}f_x - k_{02}f_y \\[0.25em] k_{00} &:= -k s^2 - k_{20}f_x^2 - k_{02}f_y^2 - 2 k_{11}f_x f_y - 2 k_{10}f_x - 2 k_{01}f_y \end{align} \tag3$$ From here, we see that the $xy$ term vanishes when $e=0$ (the circle case we're ignoring) or when $\theta$ is a multiple of a right angle (ie, when the conic's axes are aligned with the coordinate axes). And we see that we can retrieve that angle via $$\frac{2k_{11}}{k_{20}-k_{02}}=\frac{-e^2\cdot 2\sin\theta\cos\theta}{-e^2(\cos^2\theta-\sin^2\theta)}=\frac{\sin2\theta}{\cos2\theta}=\tan2\theta \tag4$$ This is the desired relation. It may help to use a form that avoids problematic zero denominators: $$\sin2\theta : \cos2\theta \;=\; 2k_{11}:k_{20}-k_{02}\tag{4'}$$


Note that having the coefficients expressed in terms of the conic's parameters readily confirms another helpful fact. The discriminant of $K$ reduces to $$k_{20}k_{02}-k_{11}^2=k^2(1-e^2) \tag5$$ so that the type of conic (ellipse, parabola, hyperbola) is "obviously" determined by the discriminant's sign (positive, zero, negative).

Of course, since $K$ encodes a conic, it must be possible to retrieve all parameters of that conic from the coefficients, solving the system $(3)$ for those parameters. (There are ambiguities. $K$ can't distinguish between the foci, for instance.) Doing so leads to some complicated formulas, as shown in, say, this answer, so deriving them can be tricky. Nevertheless, system $(3)$ provides some insight into the formulas and, as with $(4)$ and $(5)$, can make confirming them relatively straightforward.

Blue
  • 75,673