3
$\begingroup$

I have an ellipse that is defined by center, width and height. The axes of the ellipse parallel to the x and y. I want to find the largest rectangle that completely fits inside this ellipse. Is there an easy way to do this?

And sorry if my terminology is a bit off... it's been a long time since I last tackled with geometry

  • 0
    sorry. edited the question.2012-10-10
  • 0
    What do you mean by "largest" - area or perimeter?2015-10-26

3 Answers 3

10

The naive thing is to see the ellipse as a stretched circle. We know the size of the largest rectangle that fits in a circle of radius $r$ is a square of side ${\sqrt 2}r$. If the semi-axes are $a$ and $b$ we would expect the rectangle to be ${\sqrt 2}a \times {\sqrt 2}b$.

To prove this, let us put the center at the origin. The equation of the ellipse is $\left(\frac xa\right)^2+\left(\frac yb\right)^2=1$. The area of the rectangle is $4xy,$ where $(x,y)$ is a point on the ellipse and we choose the point to maximize it. The area is then $4xb\sqrt{1-\left(\frac xa\right)^2}$. The derivative of this is $\frac {4b(a^2-2x^2)}{\sqrt{1-\left(\frac xa\right)^2}}$ which is duly zero at $x=\frac a{\sqrt 2}$, giving a side of $\sqrt 2 a$

  • 0
    Sorry, but I lost you at "to prove this"... why do I need to prove things to calculate a rectangle?2012-10-10
  • 0
    @vainolo: I wanted to prove that the rectangle cited in the first paragraph is in fact the largest rectangle that fits in the ellipse. If you believe it from the first paragraph, you don't need to prove it.2012-10-10
  • 0
    OK, so you mean that the rectangle is $w=\sqrt{2}a, h=\sqrt{2}b$ centered like the ellipse?2012-10-10
  • 0
    @vainolo: Correct2012-10-10
  • 0
    For a proof, it is sufficient to observe that stretching will scale the areas of all rectangles by the same factor.2014-07-22
  • 0
    How do you know that the sides of the largest rectangle are parallel to the axes?2015-10-26
3

Top right corner on the ellipse (centered on origin): $x = a \cos \theta$ and $y=b\sin\theta$

where $0\le \theta \le \frac{\pi}{2}, a=\frac{width}{2}$ and $b = \frac{height}{2}$

So area:$$A(\theta) = 4xy=4ab\sin\theta\cos\theta = 2ab\sin2\theta$$ Maximum of sin is at $2\theta=\frac{\pi}{2}$. So, we have $\theta = \frac{\pi}{4}$. Therefore the 4 corners are: $$(a\cos \frac{\pi}{4},b\sin \frac{\pi}{4}), (a\cos \frac{3\pi}{4},b\sin \frac{3\pi}{4}), (a\cos \frac{5\pi}{4},b\sin \frac{5\pi}{4}), (a\cos \frac{7\pi}{4},b\sin \frac{7\pi}{4}),$$

which are of course equal to:

$$(\frac{a\sqrt{2}}{2},\frac{b\sqrt{2}}{2}), (-\frac{a\sqrt{2}}{2},\frac{b\sqrt{2}}{2}), (-\frac{a\sqrt{2}}{2},-\frac{b\sqrt{2}}{2}), (\frac{a\sqrt{2}}{2},-\frac{b\sqrt{2}}{2}),$$

And it's area is: $a\sqrt{2}\cdot b\sqrt{2}=2ab$

0

Using the equation $1 = y^2/n + x^2/m$ for the ellipse, write definitions for side lengths as $2(y^2/n)$ and $2(x^2/m)$. Area equals the product of these sides. Using substitution assert that $(1 - x^2/m) = y^2/m$ and in turn the area = $2(y^2/n) \cdot 2(1 - x^2/m)$. Graph this function and find the maximi. These are your coordinate values. Use +/- in front of these values to form a set of coordinates.