{'fraction_non_alphanumeric': 0.04383748331961046, 'fraction_numerical': 0.01641066409244485, 'mean_word_length': 4.150921322023984, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Pulsation and Precession of the Resonant Swinging Spring

When the frequencies of the elastic and pendular oscillations of an elastic pendulum or swinging spring are in the ratio two-to-one, there is a regular exchange of energy between the two modes of oscillation. We refer to this phenomenon as pulsation. Between the horizontal excursions, or pulses, the spring undergoes a change of azimuth which we call the precession angle. The pulsation and stepwise precession are the characteristic features of the dynamics of the swinging spring. The modulation equations for the small-amplitude resonant motion of the system are the well-known three-wave equations. We use Hamiltonian reduction to determine a complete analytical solution. The amplitudes and phases are expressed in terms of both Weierstrass and Jacobi elliptic functions. The strength of the pulsation may be computed from the invariants of the equations. Several analytical formulas are found for the precession angle. We deduce simplified approximate expressions, in terms of elementary functions, for the pulsation amplitude and precession angle and demonstrate their high accuracy by numerical experiments. Thus, for given initial conditions, we can describe the envelope dynamics without solving the equations. Conversely, given the parameters which determine the envelope, we can specify initial conditions which, to a high level of accuracy, yield this envelope.


Introduction
The present work is concerned with the three-dimensional motion of the elastic pendulum or swinging spring in the case of resonance. It continues the investigation described in previous studies by Lynch [13] and by Holm and Lynch [9]. In particular, the exchange of energy between quasi-vertical and quasi-horizontal oscillations and the stepwise precession of the swing plane are investigated.
When the ratio of the normal mode frequencies of the spring is 2:1, a resonance occurs, in which energy is transferred periodically between vertical and horizontal oscillations. The first study of this resonance was that of Vitt and Gorelik [17]. We refer to the regular exchange phenomenon as pulsation. The motion has two distinct characteristic times, that of the fast oscillations and that of the slow pulsation envelope. As the oscillations change from horizontal to vertical and back again, it is observed that each horizontal excursion or pulse is in a different direction. We call this change in azimuth the precession angle. The motion thus has three components: oscillation (fast), pulsation (slow) and precession (slow), closely analogous to the rotation (fast), nutation (slow) and precession (slow) of a spinning top [3]. 1 We consider two complementary questions, one direct and one inverse: Question 1. Given initial conditions, can we describe the envelope dynamics without solving the equations? Question 2. Given the parameters which determine the envelope, can we specify initial conditions which yield this envelope?
We provide a complete answer to Question 1. Analytical expressions are derived for the pulsation amplitude, precession angle and period in terms of the invariants of the motion. We also develop accurate approximate expressions for the pulsation amplitude and precession angle. Thus, the envelope dynamics may be deduced from the initial conditions. Question 2 is more recondite, but we can give a positive answer for the physically interesting case of strong pulsation. We derive approximate expressions for the angular momentum and Hamiltonian in terms of the pulsation amplitude and precession angle. Initial conditions can then be determined which yield the desired envelope to a good level of approximation.
We briefly outline the contents of the paper below. When the amplitude is small, the Lagrangian may be approximated to cubic order. When it is aver-aged over the fast oscillation time, a set of equations for the envelope amplitudes is obtained. These modulation equations, the three-wave equations, are presented in §2. They are found to have three independent constants of motion and are therefore completely integrable. Small-amplitude perturbations about steady-state solutions are studied in §3, and a crude estimate of the precession angle is obtained. The general solution of the three-wave equations for finite-amplitude motions is derived in §4. The amplitudes are expressed in terms of elliptic functions and the phase angles as elliptic integrals. Analytical expressions for the stepwise precession of the swing-plane are then derived.
Recently, Dullin et al. [5] constructed a canonical transformation in which the angle of the swing plane is a coordinate in an action-angle system. They showed that the precession angle is one of the two rotation numbers of the invariant tori of the integrable system. They obtained a simple equation for the precession angle by approximating an elliptic integral. They proved analytically that the resonant swinging spring has monodromy and concluded that the system provides a clear physical demonstration of this phenomenon.
Several approximate expressions for the precession angle, involving only elementary functions, are obtained in §5. One of these is equivalent to the formula reported in [5]. The approximate solutions are compared to the values obtained from the analytical expression, and are found to give remarkably accurate results. The intensity of the pulsation envelope is determined by solving a cubic equation whose coefficients are defined by the invariants. Thus, the direct question is fully answered, in the affirmative.
To answer the inverse question, we assume the pulsation amplitude and precession angle are given and derive expressions for the invariants. From these, appropriate initial conditions are easily determined. The expression for the precession angle is easily inverted. To obtain an invertible expression for the pulsation amplitude, we approximate the cubic by a quadratic, and obtain in §6 simple approximate expressions for the angular momentum and Hamiltonian. These approximations may be used to control the envelope dynamics by an appropriate choice of initial conditions.
In the concluding section, §7, we present a schematic diagram which shows the qualitative dependence of the envelope motion on the values of the invariants. This allows us to determine, at a glance, the general character of the solution for given values of the constants of motion. Several important special solutions are indicated on the diagram.

The Dynamical Equations
The physical system under investigation is an elastic pendulum, or swinging spring, consisting of a heavy mass suspended from a fixed point by a light spring and moving under gravity, g (Fig. 1). We assume an unstretched length ℓ 0 , length ℓ at equilibrium, spring constant k and mass m. The Lagrangian, approximated to cubic order in the amplitudes, is where x, y and z are Cartesian coordinates centered at the point of equilibrium, ω R = g/ℓ is the frequency of linear pendular motion, ω Z = k/m is the frequency of its elastic oscillations and λ = ℓ 0 ω 2 Z /ℓ 2 . The equations of motion in cartesian, spherical and cylindrical coordinates may be found in [13]. There are two constants of the motion, the total energy and the angular momentum about the vertical, and the system is not integrable. Its chaotic motions have been studied by many authors (see Refs. in [14]).

The Time-averaged Equations
We confine attention to the resonant case ω Z = 2ω R and apply the averaged Lagrangian technique. The solution is assumed to be of the form The coefficients a(t), b(t) and c(t) are assumed to vary on a time scale which is much longer than the time-scale of the oscillations, τ = 1/ω R . The Lagrangian is averaged over this time, yielding where κ = λ/(4ω R ). The resulting Euler-Lagrange equations are the modulation equations for the envelope dynamics: iḃ = κb * c ,

The three-wave equations
We now transform to new variables Then the equations for the envelope dynamics take the form These three equations for the slowly-varying complex amplitudes A, B and C are the three-wave equations. The relevance of these equations in various physical contexts is discussed in [9]. They govern quadratic wave resonance in fluids and plasmas. Their application to resonant Rossby wave triads is considered in [15]. In Appendix A, we show that they are a special case of the Nahm equations which are used to construct soliton solutions in certain particle field theories. For further references to the three-wave equations and a discussion of their properties see [2].
The three-wave equations conserve the following three quantities: The equations are completely integrable. The following positive-definite combinations of N and J are physically significant: These combinations are known as the Manley-Rowe relations. Together with the Hamiltonian H, they provide three independent constants of the motion. We note that H is invariant under the symmetry transformations These symmetries are associated, via Noether's theorem, with the three invariants {J, N + , N − }. Any two of the transformations generate the third. This reflects the inter-dependence of J, N + and N − .

Reduction of the system
To reduce the system for H = 0, we express the amplitudes in polar form: In general, the phases of A, B and C are not periodic. However, ζ = γ −(ξ +η) is periodic. The Hamiltonian may be written The amplitude |C| will be obtained in closed form in terms of elliptic functions.
Once |C| is known, |A| and |B| follow immediately from the Manley-Rowe relations The phases ξ and η may now be determined. Using the three-wave equations (9)-(11) together with equations (18)-(20), we finḋ so that ξ and η can be obtained by quadratures. Finally, ζ is determined unambiguously by It also follows from (21) and (22) thaṫ The phase of C follows immediately, γ = ξ +η+ζ, and we can then reconstruct the complete solution using (18)-(20).

The equation for |C| 2
From the equation (11) forĊ, and its complex conjugate we get Using the definition of the Hamiltonian, it follows that Applying this to the square of (24) and using the definitions of the Manley-Rowe quantities immediately yields an equation for |C| 2 alone: We define the cubic polynomial Φ 0 (|C| 2 ) (plotted in Fig. 2) by Then the right hand side of (25) may be written 4 For small H 2 , this cubic has three positive real roots. If these roots, in descending order of magnitude, are denoted C 2 1 , C 2 2 and C 2 3 , it follows that (We have assumed without loss of generality that J ≥ 0). In the case of equality of roots, the solution may be obtained in terms of elementary functions. We assume in general that this is not so and solve for |C| 2 in terms of elliptic functions. However, before doing this, we investigate perturbation motion about steady solutions.

Small-Amplitude Modulation of Steady States
We consider the case where the variations of the amplitudes about their mean values are small. This enables us to make additional approximations and derive simple estimates of the pulsation period and rate of precession. From these two quantities, the precession angle follows immediately.

Steady State Motion
We first consider solutions for which the amplitudes |A|, |B| and |C| are constant. The simplest cases are where the phases are also constant; then the three-wave equations become which give three particular solutions The first two solutions correspond to conical motions: the bob moves in a circle, clockwise or anti-clockwise, while the spring traces out a cone. These solutions are stable to small perturbations. The third particular case represents purely vertical oscillations; this motion is unstable [13].

Differentiating (25), a simple algebraic manipulation yields
The other amplitudes are given by These solutions are the elliptic-parabolic modes (EP-modes) studied by Lynch [13]. The precession rate is given by Ω ≡φ = 1 2 (ξ −η) [9]. From (28) it follows that For J = 0 we have planar motion with These are the cup-like and cap-like solutions of Vitt and Gorelik [17].

Perturbation about Elliptic-Parabolic Motion
We consider small deviations about the steady EP-mode solutions. We write |C| 2 = C 2 0 + ǫ where C 2 0 is given by (29) and |ǫ| ≪ C 2 0 . Then, if (25) is differentiated and nonlinear terms in ǫ are omitted, we obtain The solution is ǫ(t) = ǫ(0) cos ω P t, an oscillation about C 2 0 with the pulsation frequency For the EP-modes, the horizontal projection is an ellipse precessing at a constant rate Ω. The perturbation is a pulsating motion, with sinusoidal time variation, in which the major and minor axes of the ellipse alternately expand and contract with period T P = 2π/ω P . The area of the ellipse is proportional to J and remains constant [9]. It is straightforward to derive expressions in terms of elementary functions for the remaining amplitudes and the phases, but they are not required to determine the precession angle.
Using (29), (30) and (32), this gives us For small angular momentum J ≪ N, the term in square brackets is close to √ N and

Solution in Weierstrass Elliptic Functions
We now derive an explicit analytical solution for |C| 2 , valid for finite amplitudes. The solutions for |A| 2 and |B| 2 follow immediately from the Manley-Rowe relations. Then (21) are integrated for the phases. The integrals turn out to be similar to those occurring for the spherical pendulum, so the approach of Whittaker [18] applies. The required properties of the Weierstrass elliptic functions are given in Whittaker and Watson [19], Ch. 20 and in Lawden [12], Ch. 6 (see also Abramowitz and Stegun [1], Gradshteyn and Ryzhik [7] and Byrd and Friedman [4]).

Solution for the amplitudes
The quadratic term on the right of (25) is removed by a simple transformation This is the standard form of the equation for Weierstrass elliptic functions. The constants g 2 and g 3 , called the invariants, are given by where the summation is over all integral m, n except m = n = 0. It has poles on the real line and is doubly periodic: ℘(z + 2mω 1 + 2nω 2 ) = ℘(z) for all integers m and n. The difficult problem of determining ω 1 and ω 2 from the invariants is discussed in §21.73 of [19]. The quantity ω 3 is defined by requiring ω 1 + ω 2 + ω 3 = 0. It may be shown that In the present case, ω 1 is real and ω 3 is pure imaginary (explicit expressions are given below). On the real line, ℘(z) is real, with values in the range [e 1 , +∞). On the line z = ω 3 + x it takes real values in the interval [e 3 , e 2 ]. Moreover, as z varies along the edge of the rectangle from 0 to ω 1 to ω 1 + ω 3 (= −ω 2 ) to ω 3 to 0, ℘(z) is real and decreases monotonically from +∞ to e 1 to e 2 to e 3 to −∞. To satisfy the initial conditions, we choose α = ω 3 − τ 0 , where τ 0 is real and may be taken as zero by a suitable choice of time origin. Then ℘(τ + ω 3 ) is real and oscillates between e 3 and e 2 . The solution for the amplitude is The behaviour of the Weierstrass ℘-function is shown in Figure 3. For general z it takes complex values. On the line ℑ{z} = ω 3 the function is real with periodic oscillations, as indicated by the heavy lines at the front of the figure.

Solution for the phase angles
Weierstrass's zeta function is defined by It is quasi-periodic in the sense that We note that ζ(z) is an odd function of z and will use the relation The sigma function is defined by It is also quasi-periodic, such that Three other sigma functions may be defined. The relationship between the sigma functions and the Weierstrass ℘-function is similar to that between the theta functions and the Jacobi elliptic functions. We will not require these. We will require the identity (this follows from a consideration of the poles and zeros of the functions on each side).
The solution (38) leads to a solution for |A| 2 : Substituting in the first of (21) we have Now we introduce auxiliary constants κ ± defined by Using (35), it follows that We must determine which sign for the derivatives should be chosen. From (27) the following sequence of inequalities holds: Since e 2 < e − < e + < e 1 , it follows that κ ± lie on the line between ω 1 and ω 1 +ω 3 , which determines the sign of the derivatives to be ℘ ′ (κ ± ) = 2iH/N 3/2 , a positive imaginary number. The equation for ξ thus becomes Using (44) this may be expressed in terms of zeta functions and using (42) it may be integrated immediately to yield A similar expression holds for η − η 0 with κ − replacing κ + . Thus we obtain the expression for the azimuthal angle φ: This is the solution for the azimuth as a function of time. Using the quasiperiodic properties (40) and (43), the change in φ when τ varies by 2ω 1 may be computed: This is the desired analytical expression for the pulsation angle. 2 We note two obvious special cases of (48). When J = 0 we have κ + = κ − , yielding a zero result for ∆φ. When H = 0, we have κ + = ω 1 and κ − = −ω 2 , so where we have used (41). These two special cases intersect in the homoclinic orbit (with J = H = 0) which has an infinite transition time.

Solution in Jacobi Elliptic Functions
While (48) is the analytical solution, it is not immediately obvious how numerical information may be extracted from it. The quantities on the right side are all computable in principle, but at the expense of considerable effort. It is therefore useful to seek an alternative expression, in terms of Jacobi elliptic functions.

Solution for the amplitudes
Recall that with the transformation u = |C| 2 /N − 1/3 and τ = √ N t, (25) was transformed to (35), which we write again for convenience: For solutions of physical interest, H 2 is sufficiently small that the three roots of the cubic are real. Defining the quantities The solution is w = sn(s − s 0 ), or where s 0 is arbitrary. The Jacobi elliptic function sn s has period 4K, where so sn 2 (s − s 0 ) has period 2K. For definiteness, we set s 0 = 0, which means choosing the origin of time where the solution has a minimum: Clearly, |C| oscillates between C 3 and C 2 with physical period The remaining amplitudes, |A| and |B|, follow from the Manley-Rowe relations: They have the same period as |C| but vary in anti-phase with it and in phase with each other. We denote the minimum and maximum values of |A| by A 3 and A 2 , and similarly for |B|. Thus The initial values of the amplitudes (for s 0 = 0) are We note here an important scaling invariance of the three-wave equations. If the amplitudes are magnified by a constant factor and the time is contracted by the same factor, the form of the equations (9)-(11) is unchanged. Thus, the period of the modulation envelope motion varies inversely with its amplitude. The overall scale may be measured by √ N and the inverse dependence of T on this is seen in (54).
The solutions (38) and (53) must be equivalent. This follows from identities relating Weierstrass and Jacobi elliptic functions. The complimentary modulus is defined as k ′ = √ 1 − k 2 , and we write K ′ = K(k ′ ). The parameters are related by But the Jacobi function sn(s + iK ′ ) is given in terms of its value on the real line by sn(s + iK ′ ) = 1 k sn s and the equivalence between the two forms of solution follows immediately.

Solution for the phase angles
It remains to determine the phases. Integration of (21) furnishes the angles ξ and η. We define , .
It follows from (46) that k 2 < γ 2 + < γ 2 − < 1. We may now write (21) in the form The right sides are the integrands occuring in Legendre's elliptic integral of the third kind ( [1], p. 590). They may be put in standard algebraic form by defining x = sn s. Writing the solution for ξ becomes There is an analogous solution for η. The changes in ξ and η over a half period s ∈ [0, K] are 1 2 ∆ξ = −λ + Π(γ 2 + , k) , where the complete elliptic integral is defined as Π(a, k) = Π(K, a, k). The azimuthal angle of the pendulum is φ = 1 2 (ξ − η). Thus, the change in the azimuth over a full pulsation period is In Appendix B, an alternative formula (B.4) is derived from the expression (57), which is structurally similar to (48) obtained above. Using this formula, the limiting cases ∆φ = 0 for J = 0 and ∆φ = π/2 for H = 0 are again derived, in agreement with (49).

Approximate Formulas for the Precession Angle
We have derived an exact analytical expression for the precession angle, involving elliptic integrals. It is of interest to obtain more convenient approximate formulas, involving only elementary functions. It might be expected that the easiest way to do this would be to approximate (57) directly. However, it turns out that it is easier, and more transparent, to return to the differential equations governing the the system, use them to write down an integral for the precession angle and approximate this integral.
The precession angle is φ = 1 2 (ξ − η). Combining the two components of (21), we obtain Eq. (24) may be written Taking the quotient of these two equations, we get The pulsation of the amplitude |C| occurs between C 2 and C 3 , where C 2 3 and C 2 2 are the two smallest zeros of the polynomial It is also useful to is as defined by (26) and illustrated in Fig. 2. The two signs in the differential equation (60) correspond to phase changes during alternate half-cycles of the pulsation. The integral of (60) over a full cycle may be written formally: It is convenient to change the integration limits; to do this, we consider (62) as an integral over the complex Z-plane, where Z = |C| 2 on the positive real axis. This gives The contour C 1 encircles C 2 3 and C 2 2 and the square root in the integrand has two branch cuts, one from C 2 3 to C 2 2 and the other from C 2 1 to +∞. This is illustrated in Fig. 4. In addition to the three branch points, the integrand has two simple poles at Z = N + and Z = N − . In fact, the residues at these two poles sum up to zero: Furthermore, the integrand goes to zero sufficiently fast as |Z| → ∞ that we can replace the contour C 1 by C 2 (Fig. 4). Returning to the original integral (62), this corresponds to a change of integration range to This interval is more convenient than the previous one because the integrand is small everywhere except near the lower limit of integration and because the point of inflection in Φ can cause difficulties when approximating Φ near C 2 2 . Since the integrand is dominated by its behaviour near C 2 1 the obvious approach would be to find a quadratic which approximates Φ near this point. As C 2 1 is the root of a cubic, it can be written in terms of H, J and N, but this expression is cumbersome and does not yield a convenient approximation. It is simpler to consider the behaviour of Φ at N + = (N + J)/2. This point is close to C 2 1 because H 2 must be small compared to N for the periodic motion to exist. 3 Having decided to approximate at N + rather than C 2 1 , the next step is to approximate Φ 0 = Z(Z − N + )(Z − N − ) by a quadratic with a root at N + : It is possible to perform the resulting approximate integral. However, the solution is complicated unless Z 1 = N − (see Appendix C). Thus, we consider The quadratic Ψ 0 and cubic Φ 0 both vanish at Z = N + and Z = N − . They are also equal when Z = Z 0 . We consider two choices of Z 0 .
First, we choose Z 0 to be the mean of Z = N + and Z = N − , that is Z 0 = N/2. The integral (65) becomes where Z + is the larger root of Ψ 0 − H 2 = 0. Defining σ = 2Z − N, we get where σ + = J 2 + 8H 2 /N. This may be integrated analytically ( [6], p. 72) to give Noting that tan −1 x = π 2 − tan −1 1 x , the phase change over a full cycle is This elegant approximate formula for the pulsation angle was reported by Dullin, Giacobbe and Cushman [5], although they did not give the factor √ 8 explicitly, and we refer to it as the DGC formula. Numerical experiments indicate that it is of high accuracy throughout the accessible domain.
An alternative choice of quadratic approximation requires Ψ 0 and Φ 0 to have equal derivatives at Z = N + . In this case Z 0 = N + . We integrate, again taking the lower limit to be the larger root of Ψ 0 − H 2 = 0, to get It will be shown below that this formula is also in resonable agreement with the analytical solution.
The above approximations are subtle: we replace a cubic by a quadratic, changing the integrand, but we also change the lower limit. These effects tend to compensate, resulting in surprisingly accurate approximations. Moreover, it is found that the two approximations (71) and (72) have errors which are of opposite sign and approximately equal. Choosing Z 0 = (N + αJ)/2 in (67), we get the approximation By numerical experiment, we deduce the optimal value α = 0.458. Numerical results using the various approximations will be presented in the following section and (73) will be found to yield remarkably accurate results.

Numerical Experiments
We first compare the precession angle calculated using the exact analytical expression (57) with values extracted from a numerical integration of the threewave equations (9)- (11). For given N and J, the maximum value of the cubic . Thus, the maximum value of H is

Determination of the Precession Angle
We now show that the envelope of the motion may be determined to high accuracy by using approximate formulas involving only elementary functions. We use the analytical values as a reference to evaluate the accuracy of the approximate formulas. In Fig. 6 the differences between the exact and approximate expressions for ∆φ are shown. The absolute values of these errors are plotted. The maximum error in the DGC formula (Fig. 6(A)) is about 2.2 • , and occurs for J ≈ 1 2 and H at its maximum permissible value. The error in the alternative formula (72) is of comparable magnitude, with a maximum of about 2.5 • (Fig. 6(B)), but is of opposite sign. The optimal value α = 0.458 of the parameter in the formula (73) was found by experiment. Fig. 6(C) shows that this formula is significantly more accurate, with a maximum error less than 0.4 • . This is a remarkable level of precision, considering the simplicity of the formula. The compensation of errors leads to what might be described as the unreasonable effectiveness of the approximation.

Determination of the Pulsation Amplitude
The extent to which energy is exchanged between the elastic and pendular modes of oscillation may be measured by the relative pulsation amplitude defined as This quantity varies from P = 0 for no energy exchange to P = 1 for maximal exchange. For H = 0, it reduces to P = 1 − J/N. Given the invariants N, H and J, we may compute P by solving the cubic equation Φ(Z) = 0 where, as before, Φ(Z) = Φ 0 (Z) − H 2 , with Z = |C| 2 and Φ 0 defined by (26). For determination of the envelope, (74) is ideal. However, for the inverse problem, it must be simplified. Noting that C 2 1 + C 2 2 + C 2 3 = N, we may write the pulsation amplitude as We have already introduced in (67) a quadratic Ψ 0 which approximates the cubic Φ 0 in the range [C 2 2 , C 2 1 ]. If we use the roots of Ψ 0 − H 2 = 0 as estimates of C 2 1 and C 2 2 , an approximate expression for P may be obtained: For fixed P this represents an ellipse in (J, H)-space. The great advantage of (75) is that it can be used to solve the inverse problem. Two special cases follow immediately: when H = 0 then P = 1 − J/N (which is exact); when J = 0 then P = 1 − 2H/N √ Z 0 (which is not exact).
We plot the exact values of the pulsation amplitude, obtained by solving the cubic equation Φ(Z) = 0, in Fig. 7(A). Note that P = 0 when H = H 0 and P = 1 when H = J = 0. The approximate values calculated using (75) are shown in Fig. 7(B) and the difference (P approx − P exact ) in Fig. 7(C). The approximation is quite accurate when P is large. This is the region of primary physical interest, corresponding to strongly pulsating motion. For large values of H, the approximation is no longer valid. We have derived several other approximate expressions for P , which are more accurate, but also more complicated, than (75).

Control of the envelope dynamics
The approximate formulas allow us to control the pulsation and precession by a judicious choice of initial conditions. Recall that the precession angle is given, to high accuracy, by (73), which we write where Z 0 = (N + αJ)/2. This may be used in (75) to eliminate either H or J, yielding the two equations But these are instantly invertible, to give equations for J and H in terms of P and ∆φ: To illustrate the effectiveness of these formulas, six values of the precession angle were chosen: ∆φ ∈ {10 • , 20 • , 30 • , 45 • , 60 • , 90 • }. We set N = 1 and fixed the value of the pulsation amplitude to be P = 0.9. We then calculated J and H from (77) and computed the numerical solution of the three-wave equations (9)- (11). The initial value of |C| 2 was taken to be the root C 2 2 of Φ(|C| 2 ) = 0 having intermediate algebraic magnitude. Then |A| 2 and |B| 2 were obtained from the Manley-Rowe relations. The initial phases were all set to zero. Polar plots of A maj against φ are shown in Fig. 8 (the integration time in each case corresponds to a total precession of about 180 • , and both A maj and −A maj are plotted). These plots represent the outer envelope of the horizontal projection of the trajectory of the pendulum bob. It is clear that the precession for the numerical solution is, in each case, close to the value used in (77). We also calculated the pulsation amplitude of the numerical solution and it was, in all cases, within 2% of the prescribed value P = 0.9. This confirms the effectiveness of the inversion formulas as a means of pre-determining the envelope of the motion.
We note that, in general, the horizontal projection of the trajectory is not a closed curve, but densely covers a region of phase-space. The motion is not periodic but quasi-periodic. The horizontal projection is a closed curve only in the exceptional cases when ∆φ and 2π are commensurate, that is, when their ratio is a rational number. In this case the motion is periodic and the horizontal footprint is a star-like graph, as illustrated in Fig. 8. The number of points in the star is the denominator of the rational number ∆φ/2π (e.g., ∆φ = 80 • yields a nine-pointed star).

Conclusion
We have presented a complete analytical solution of the three-wave equations, which govern the small-amplitude dynamics of the resonant swinging spring. The periodic variation of the amplitudes is associated with the characteristic pulsation and precession of the system. Several analytical formulas for the precession angle have been presented. We have also derived simplified approximate expressions in terms of elementary functions. The optimal approximation (73) has been shown by numerical experiments to be remarkably accurate, with a maximum error of only 0.4 • . The amplitude of the pulsation envelope is determined from the roots of a cubic equation whose coefficients are defined by the invariants. Thus, we have provided a complete and positive answer to Question 1 posed in the Introduction.
The inverse question, Question 2 in §1, has also been answered affirmatively. The approximate formulas (77) give values of J and H which lead to a solution having the prescribed pulsation amplitude and precession angle. They are of high accuracy for strongly pulsating motion, which is the case of primary physical interest.
The qualitative features of the envelope dynamics of the swinging spring are depicted schematically in Fig. 9. The axes are normalized angular momentum J/N and normalized Hamiltonian H/H 00 . The physically accessible domain is shaded. The bounding curve is H = H 0 (J, N). The pulsation amplitude vanishes on this curve and the solutions are the elliptic-parabolic modes [13]. Regions of the parameter space are indicated where the pulsation amplitude and precession angle take large or small values. The corners of the accessible region represent special solutions. Thus, (J, H) = (0, H 00 ) corresponds to the cup-like and cap-like solutions of Vitt and Gorelik [17]. For (J, H) = (N, 0), the motion of the spring traces out a cone. Finally (J, H) = (0, 0) represents the homoclinic orbit, and includes the case of (unstable) pure vertical oscillations.
There is a Lax formulation of the Nahm equations and an associated Lax curve of genus (n − 1) 2 . The n = 2 case is elliptic and the solutions are elliptic functions; in fact, for n = 2 the Nahm equations reduce to the Euler-Poinsot equations and are easily solved. Surprisingly, it is sometimes also the case that the Nahm equations for n > 2 can be solved in terms of elliptic functions. This happens when the solution has a symmetry and the quotient of the Lax curve by that symmetry gives a genus-one surface. These symmetries of the Nahm matrices correspond to spatial symmetries of the corresponding monopoles. The group elements act both by conjugation on the Nahm matrices and by rotation of the three-vector of matrices [8,11].
One example is n = 3 D 2 symmetry [10]. The symmetry reduces the Nahm matrices to Substituting these matrices into the Nahm equations gives and two others by cyclic permutation. These equations are the 'explosive interaction' three-wave equations identified in [2]. They are related to the equations studied in the present paper by s = it with F 1 = A * , F 2 = B * and F 3 = C.
B Relationship between Jacobi and Weierstrass forms of the Precession Angle.
To relate the expression (57) obtained by means of Jacobi's elliptic functions to the expression (48) in terms of the Weierstrass form, we introduce auxiliary constants d + and d − defined by sn 2 d + = γ 2 + /k 2 , sn 2 d − = γ 2 − /k 2 .
The elliptic integral of the second kind is defined (with x = sn z) as The complete integral is denoted E = E(K). E(z) is not periodic; the periodic component is represented by Jacobi's zeta function This is an odd function with period 2K. It is related to Jacobi's theta function, also having period 2K, by The elliptic integral of the third kind may now be expressed as follows: Using this in (B.1), we obtain the change over a half-period K: Finally, using the analogous expression for ∆η, we get the precession angle This is the change over the period 2K (for s) or 2K/ν √ N (for t). The structural similarity between this expression and the result (48) in terms of Weierstrass functions is immediate.
C Approximation Integral with Best Fit at Z = N + .
We approximate Φ 0 = Z(Z − N + )(Z − N − ) by a quadratic with a root at Z − N + : To obtain the best fit at Z = N + , we choose Z 0 and Z 1 so that This implies Z 0 = N + + J and Z 1 = N 2 + /(N + + J). Using the software package Maple, it is possible to evaluate the resulting approximate integral where C + is the larger root of Ψ 0 − H 2 = 0. The result is This gives a rather good approximation: the maximum error is about 1.2 • . However, it is not a convenient expression because the factor √ J 3 − H 2 is sometimes real and sometimes imaginary. Moreover, the expression cannot easily be inverted to give H or J in terms of ∆φ. In fact, unless Z 1 = N − , any approximating quadratic (C.1) will give an expression with this problem. Thus, in §5, we choose Z 1 = N − .