TITLE: A quote from Arnold
QUESTION [17 upvotes]: Arnold said the following in a talk on teaching:

Jacobi noted, as mathematics' most fascinating property, that in it one and the same function controls both the presentations of a whole number as a sum of four squares and the real movement of a pendulum.

What's the meaning of this? Is the function he mentioned the theta function or something else? What's the relation with the real movement of a pendulum?

REPLY [4 votes]: OP's guess of "theta functions" isn't really that far off; it is well known (to those who know them) that the Jacobian elliptic function $\mathrm{sn}(u\mid m)$, which turns up in the solution of the DE for the pendulum, is expressible as a ratio of theta functions. (It should probably be emphasized that Jacobi studied both the theta functions and the elliptic functions now named after him, so he was certainly well-aware of this connection.)
As for the sum of four squares: as noted in this review article, Jacobi showed that the theta function $\vartheta_3(0,q)^d$ is the generating function for the number of ways to represent $k$ as $d$ squares $r_d(k)$; that is,
$$\vartheta_3(0,q)^d=\sum_{k=0}^\infty r_d(k) q^k$$
There you have it: two seemingly unrelated applications where the theta functions crop up.