General form of an ellipse - where does this error come when calculating $\theta$?

54 Views Asked by At

The « Ellipse » page of Widipedia, https://en.wikipedia.org/wiki/Ellipse, gives a lot of formulas in paragraph General ellipse, to switch between canonical form parameters and general form coefficients. In particular the first and third equations: $$ A=a^2 \, \sin^2 \theta + b^2 \, \cos^2 \theta $$ $$ C=a^2 \, \cos^2 \theta + b^2 \, \sin^2 \theta $$ From which it follows that $$ \sin^2 \theta = \frac{a^2 A – b^2 C}{a^4 – b^4} \qquad \cos^2 \theta = \frac{b^2 A – a^2 C}{b^4 – a^4} $$ Then, by $ \cos 2\theta = cos^2 \theta - \sin^2 \theta $, one obtains: $$ \cos 2\theta = \frac{A-C}{b^2-a^2}$$ Now, the second equation leads to: $$ \sin 2\theta = \frac{B}{b^2-a^2}$$ Following these, we get: $$ \tan 2\theta = \frac{B}{A-C} [*] $$ The same Wikipedia page gives a little further an expression for $\theta$ using “cot”, which I translate using $\tan$ by: $$ \tan \theta = \frac{B}{(C-A) - \sqrt{(A-C)^2 + B^2}} $$ If I compute $\tan 2\theta$ by formula: $$ \frac{2 \tan \theta}{1 + \tan^2 \theta} $$ my calculations lead to: $$ \tan 2\theta = \frac{B}{C-A} [**] $$ So, between results [*] and [**], there is a minus sign which makes the difference.

I don't know what I can be blinded by, but doing the calculations again, I don't see any error.

So, can someone explain to me where this minus sign could come from ?