Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to determine the maximum area in a specific ellipse that can be filled with any 3 (horizontally aligned) rectangles. $$Ellipse: \frac{x^2}{36}+\frac{y^2}{16}=1$$ $$Area: A=4(x_1*y_1+(x_2-x_1)*y_2)$$

Here's an image:

ellipse and rectangles

By substituting $y_1$ and $y_2$ with a function of $x_1$ and $x_2$ (with the equation of the ellipse), differentiating that and equal it to 0, I get $x_1$ as a function of $x_2$. I don't think that's the solution, so how can I solve this? Is there even a finite number of solutions?

Hope you can/will help me :)

share|cite|improve this question
I only see two rectangles, beige and violet, and your expression for the area only contains two terms -- where's the third rectangle? – joriki May 12 '12 at 10:56
@joriki: Cee is assuming symmetry (probably correctly) so looking at the area in one quadrant and multiplying by 4. The third rectangle would be to the left and the same as the violet one on the right. – Henry May 12 '12 at 11:00
I considered only one quadrant of the ellipse, because I think it would look the same at the other 3 quadrants...arrr, too slow. thanks Henry, that's what I ment ;) – Cee May 12 '12 at 11:00
Cee: If you have $x_1$ as a function of $x_2$ (and $0 \le x_1 \le x_2 \le 6$) then you can put this back into your equation for the area and now have the maximum area as a function of $x_2$. Now optimise again. – Henry May 12 '12 at 11:02
So is there an infinite number of solutions? Or is there any way to calculate x2? If this is already the solution, I think x1 with x2=0 should be the same as x2 with x1=0, which is not the case – Cee May 12 '12 at 11:07
up vote 1 down vote accepted

The simpler solution for me is the following one:

First, note that this problem is about area, which changes linearly with stretching, so you can solve the problem in the unit circle ($x^2+y^2=1$), and then find the solution by multiplying the $x$ by $6$ and the $y$ by $4$.

Next, note that the solution doesn't change if the biggest rectangle is horizontal or vertical, so the solution should not change if you swap $x$ and $y$ (otherwise, this can't be a maximum), so $y_1=\sqrt{1-x_1}$ should be equal to $x_2$, so we have to fix only $x_1$, and then $x_2=\sqrt{1-x_1}$ and $y_2=x_1$.

Now you have an equation of a single variable: $f(x)=4\left(x\sqrt{1-x^2}+\left(\sqrt{1-x^2}-x\right)x\right)$, so you can find the derivative, and then its root, which is $\sqrt{\frac{1}{10}\left(5 - \sqrt{5}\right)} = 0.525731 \dots$

This gives a maximal area of $4\cdot 6\cdot f(x)=59.3312\dots$ for $x_1=x\cdot6=3.15439$ and $x_2=\sqrt{1-x^2}\cdot6=5.1039$ (the same result as Henry and craftsman.don).

share|cite|improve this answer
+1 for the "Next..." paragraph – Henry May 12 '12 at 13:50

(It seems that I do not have privilege to post this partial solution as a comment to your problem, so I write it here. Wish it can help you)

First I assume that all of the vertices of the middle rectangle touch the ellipse, that is, the middle rectangle is symmetrical along the $X$ axis.

Secondly, I set $x1$ $x2$ $x3$ as bellow: enter image description here

Then you need to maximize the area: $S=2*(x1-x2)*y1 + 4*x2*y2 + 2(-x2-x3)*y3$

theoretically you can use Lagrange Multiplier to solve this problem, but it has too many variables for computing by hand.

So I use Mathematica here:

NMaximize[ {2 (x1 - x2)*y1 + 4*x2*y2 - 2 (x2 + x3)*y3, (x1^2)/36 + (y1^2)/16 - 1 == 0 && (x2^2)/36 + (y2^2)/16 - 1 == 0 && (x3^2)/36 + (y3^2)/16 - 1 == 0 && y1 > 0 && y2 > 0 && y3 > 0}, {x1, x2, x3, y1, y2, y3}]

It gives that

{59.3313, {x1 -> 5.10391, x2 -> 3.15439, x3 -> -5.1039, y1 -> 2.10292, y2 -> 3.4026, y3 -> 2.10292}}

Above solution bases on the assumption that the middle rectangle is symmetrical along the $x$ axis. So it still needs some discuss on the non-symmetrical situation.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.