Dividing a unit square into rectangles I've been given this task: 

A unit square is cut into rectangles. Each of them is coloured by either yellow or blue and inside it a number is written. If the color of the rectangle is blue then its number is equal to rectangle’s width divided by its height. If the color is yellow, the number is rectangle’s height divided by its width. Let $x$ be the sum of the numbers in all rectangles. Assuming the blue area is equal to the yellow one, what is the smallest possible $x$?

I've came with the solution below:  I've simply split the unit square in half and assigned the colors. The reasoning behind that is that I want to have the blue side as high as possible (to make the $x$ as low as possible) and the yellow side as wide as possible (for the same reason). I didn't divide the square into rectangles with infinitely small height or width, because no matter how small they are, they eventually add up and form the two big rectangles that are on my picture.
I feel my solution is wrong though, because it is stupidly easy (you have to admit, that often means it's wrong). Is there anything I'm missing here?
 

Assuming that width and height refer to the 'longer' and 'shorter' dimension respectively

Why does this assumption seem what the OP had in mind?
Because his "solution" implicitly takes this to be true. If the OP has $X$ and $Y$ directions in mind, he would have written the same number on both of the rectangles in his solution.

Let number of blue triangles be $p$ and number of yellow triangles be $q$.
The number written inside a blue triangle will always be greater than or equal to $1$. Hence, 
$$
x \geq p 
$$
You have already found a solution for which $x=2.5$. 
Also, this is the best solution for the case $p=1$
Hence we need to only examine the case $p=2$ since for $p>2$, $x$ will be greater than $2.5$.
Again, we have to prove all the cases when $p=2$, ie, $q$ can be any finite number while $p=2$.

Case 1
$q$ is $I$.
This means the unit square is divided into $3$ rectangles. The only way in which we can divide a square into 3 rectangle is given below. Three rectangles are named accordingly. Notice that there will be two more sub cases. One where the $q$ rectangle is upright and another where the $q$ rectangle is either the one named or $III$. $q$ cannot be $II$ since then its area will always be less than $0.5$.

Note that $b \leq 0.5$ in the above image.
Case 1.1 
$q$ rectangle is upright.
Here it is trivial that $a=0.5$ (by equating the areas). Hence, $x= 0.5 + \frac{1}{2b} + \frac{1-b}{\frac{1}{2}} = 2.5 + \frac{1}{2b} + 2b$
Hence this case is proved since it is trivial that $x \geq 2.5$.
In fact, we have another possible solution candidate when $b=0.5$.
Case 2
$q$ is $III$.
By equating area of blue rectangles equal to $0.5$, we get,
$$
a+b-ab=0.5
$$
or, 
$$
a=\frac{0.5-b}{1-b}
$$
The number written on triangle $I$ will be $\frac{1}{a}$.
The number written on triangle $II$ will depend on whether $1-a$ or $b$ is greater. Keep in mind that $b \leq 0.5$. This graph tells us that $1-a \geq b$.
Hence, the number written on triangle $II$ will be $\frac{1-a}{b}$.
The number on triangle $III$ will again depend on which dimension is greater. This graph tells us that 
$1-a \geq 1-b$ when $1-b \leq 0.709$ or $0.2929 < b < 0.5$
In such a case, the number written will be $\frac{1-b}{1-a}$.
This graph tells is that in such a case $x \geq 6.518$. Not a problem!
When $0 < b < 0.2929$, then the number written will be $\frac{1-a}{1-b}$.
This graph tells is that in such a case $x \geq 6.775$. Not a problem again!
Hence all the cases when $p=2$ and $q=1$ are proved! 
I am trying to prove this for higher cases of $q$, any ideas anyone?
