TITLE: How to get the limits of rotated ellipse?
QUESTION [14 upvotes]: The box that an ellipse fits is easily calculated if there are no rotation, or if the rotation is ${x*90^o}$ (where x is an integer) is easy.
For a (major radius) and b (minor radius), it is :  
Xmax = a
Ymax = b

or it is :  
Xmax = b
Ymax = a

But how to do it in a general case, when the rotation angle is not a multiple of 90 degrees?
The limits to ellipse are like on the next image:

I am given all ellipse's parameter (as described in wiki) :

ellipses formula:
  $x_{0}=a\cdot \cos (\varphi )$
  $y_{0}=b\cdot \sin (\varphi )$


where: a=major radius, b=minor radius, $\varphi \in  [0,\pi ]$

rotation formula:
  $x_{1}=x_{0}\cdot \cos (\Theta )-y_{0}\cdot \sin (\Theta )$
  $y_{1}=x_{0}\cdot \sin (\Theta )+y_{0}\cdot \cos (\Theta )$  


where $\Theta$=ellipse's rotation


All parameters (a, b and $\Theta$) are known.
If you like you can also use the canonical form for ellipse: $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$

REPLY [7 votes]: You don't need calculus here, just a little geometry.  
Let $c$ be the (positive) $x$-coordinate of the vertical tangent, and let $d$ be the (positive) $y$-coordinate where the rotated ellipse meets the $y$-axis. Apply a vertical shear transformation, of the form $(x,y) \mapsto (x,y+ux)$, to transform the rotated ellipse into an ellipse with horizontal major axis $c$ and vertical minor axis $d$. This transformation is area-preserving, so $\pi cd = \pi ab$. Thus $c = ab/d$.  
To find $d$, take the equation of the rotated ellipse (filched from J.M.'s answer):
$$\frac{(x\cos\theta-y\sin\theta)^2}{a^2}+\frac{(x\sin\theta+y\cos\theta)^2}{b^2}=1$$
and set $x = 0$:
$$\frac{(d\sin\theta)^2}{a^2}+\frac{(d\cos\theta)^2}{b^2}=1$$
Hence
$$\frac{d^2}{a^2b^2}(b^2\sin^2\theta+a^2\cos^2\theta) = 1$$
giving
$$c = \frac{ab}{d} = \sqrt{b^2\sin^2\theta+a^2\cos^2\theta}$$
Similarly, using a horizontal shear transformation, the $y$-coordinate of the horizontal tangent is $\sqrt{a^2\sin^2\theta+b^2\cos^2\theta}$.