Calculus – Finding Extrema of Ellipse from Parametric Form

calculusgeometrytrigonometry

I'm trying to derive a formula to determine a tight bounding box for an ellipse. This is trivial for non-rotated ellipses, but I'm having trouble figuring out how to compute bounds for ellipses that have been rotated about their center.

Consider an ellipse $E$ centered at the origin with $x$ and $y$ radii $r_x$ and $r_y$ respectively. Then a point on $E$ is given by the parametric coordinate pair $\left[\begin{matrix}r_x \cos t \\ r_y \sin t\end{matrix}\right]$ for $t \in [0, 2\pi]$.

Suppose we rotate $E$ about the origin by $\theta$ radians. Then a point on $E$ has the coordinates $$\left[ \begin{matrix} x(t) \\ y(t) \end{matrix} \right] = \left[\begin{matrix}r_x \cos \theta \cos t – r_y \sin \theta \sin t \\ r_x \sin \theta \cos t + r_y \cos \theta \sin t \end{matrix}\right]$$

My approach to determine extrema was to consider each coordinate separately, take the derivative and set it equal to zero. For instance, we have $$x'(t) = -r_x \cos \theta \sin t – r_y \sin \theta \cos t$$
and setting $x'(t) = 0$ yields:

$$
\begin{align}
-r_x \cos \theta \sin t – r_y \sin \theta \cos t &= 0 \\
-r_x \cos \theta \sin t &= r_y \sin \theta \cos t \\
\tan t &= -\frac{r_y \sin \theta}{r_x \cos \theta}
\end{align}
$$

I don't know how to go from this equation to the actual extreme values of $x$ for the rotated ellipse. I'm assuming it's something easy that I've just forgotten how to do.

Edit: I'm looking for tight axis-aligned bounds. Rotating the bounds of a non-rotated ellipse and then computing axis-aligned bounds of the rotated bounding box doesn't result in tight bounds. Here is a diagram to illustrate:

enter image description here

Best Answer

You're basically done: all you need to do is solve for your values of $t$, and substitute them into your $x(t)$ to obtain your extreme $x$ values:

$$t = \tan^{-1} \left(-\frac{r_y \sin \theta}{r_x \cos \theta}\right)$$

However, $\tan^{-1}$ has an infinite number of solutions of the form $t + \pi n$, for $n \in \mathbb{Z}$. This set of solutions can be divided into two sets: $A$, which contains values of the form $t + 2 \pi n$ and $B$, which contains values of the form $t + \pi + 2 \pi n$.

The only part you need to be careful of is to take one value of each of $A$ and $B$. One of these two sets of solutions will correspond to the lower extreme, and the other will correspond to the upper extreme.

If you want to know which set of values of $t$ corresponds to the minimum or maximum, you could use the second derivative test to find out.