There is an exercise in "Modern Graph Theory" by Bollobas section II.4 pg 63 that is essentially the same argument, but eliminates the trigonometric functions. For each rectangle $U = [x_1, x_2] \times [y_1, y_2]$ let $\psi(U) = (x_2 - x_1) \otimes (y_2 - y_1)$ in $\mathbb{Z}(\mathbb{R}/\mathbb{Z}) \otimes \mathbb{Z}(\mathbb{R}/\mathbb{Z})$ (viewed as a $\mathbb{Z}$ module). Then $\sum_{U} \psi(U) = 0$ so the original rectangle must have an integer side.
[Edited after Reid's comment. Here $\mathbb{Z}(\mathbb{R}/\mathbb{Z})$ is the free $\mathbb{Z}$ module with basis $\mathbb{R}/\mathbb{Z}$]