Integer Dimensions

A large rectangle is partitioned into smaller rectangles, each of which has integer length or integer width. Prove that the large rectangle also has integer length or integer width.


This problem can be solved using graph theory, but the most elegant solution is based on some basic calculus.

Place the big rectangle in the plane so that its sides are parallel to the X and Y axises. Now integrate the function f(x)=sin(πx)sin(πy) over the boundary of any small rectangle. Since at least one of its sides has integer length, the result will be 0. If you sum all integrals taken over the boundaries of the small rectangles and cancel the opposite terms, you will get that the integral of f(x) over the boundary of the large rectangle is also equal to 0. Therefore at least one of its sides has integer length.