Passage: The law was first formulated by Joseph-Louis Lagrange in 1773, followed by Carl Friedrich Gauss in 1813, both in the context of the attraction of ellipsoids. It is one of Maxwell's four equations, which form the basis of classical electrodynamics. Gauss's law can be used to derive Coulomb's law, and vice versa.

Question: In what context was the law formulated?
context of the attraction of ellipsoids