  The "square peg problem" or "inscribed square problem" of Toeplitz asks if
every simple closed curve in the plane inscribes a (non-degenerate) square, in
the sense that all four vertices of that square lie on the curve. By a variety
of arguments of a "homological" nature, it is known that the answer to this
question is positive if the curve is sufficiently regular. The regularity
hypotheses are needed to rule out the possibility of arbitrarily small squares
that are inscribed or almost inscribed on the curve; because of this, these
arguments do not appear to be robust enough to handle arbitrarily rough curves.
  In this paper we augment the homological approach by introducing certain
integrals associated to the curve. This approach is able to give positive
answers to the square peg problem in some new cases, for instance if the curve
is the union of two Lipschitz graphs $f, g \colon [t_0,t_1] \to \mathbf{R}$
that agree at the endpoints, and whose Lipschitz constants are strictly less
than one. We also present some simpler variants of the square problem which
seem particularly amenable to this integration approach, including a a periodic
version of the problem that is not subject to the problem of arbitrarily small
squares (and remains open even for regular curves), as well as an almost purely
combinatorial conjecture regarding the sign patterns of sums $y_1+y_2+y_3$ for
$y_1,y_2,y_3$ ranging in finite sets of real numbers.
