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:

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 :)

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).