A contribution to the theory of eclipsing binaries