Problem 5
Hard Mechanical systems

Pendulum restrained by a horizontal spring

A light rod of length $L$ hangs from a fixed pivot and carries a mass $m$ at its end. A horizontal spring of stiffness $k$ joins the rod to a wall at a distance $a$ below the pivot. In equilibrium the rod is vertical and the spring is unstretched. Determine the equation of motion, including the small-angle case.

Explanation of Method

Take the rod angle as the generalized coordinate. Write the kinetic and potential energy, apply Lagrange's equation, and linearize for small angles. The simulator shows how the spring attachment and the amplitude change the period.

A one-degree-of-freedom system: a mass on a light rod, pivoted at the top and held by a horizontal spring attached part-way down the rod. The nonlinear equation of motion comes from Lagrange's equation and is checked with the variational indicator. It is then linearized for small angles, built as Simulink models, and run in the simulator to see how the parameters, the amplitude, and the spring attachment change the oscillation.

01

Problem statement

The mass of the long uniform rod shown in the figure is negligible compared with the mass \(m\) at its end. Determine the equation of motion of the system, and also consider the case of small angles.

  • The rod has length \(L\) and hangs from a fixed pivot \(O\) on a horizontal support.
  • At distance \(a\) below the support, the rod is connected to a vertical wall by a horizontal spring of stiffness \(k\).
  • In the equilibrium position the rod is vertical and the spring is unstretched.

There is no friction and no external input. The system is conservative and has one degree of freedom.

m θ k a x L O g
Figure 1. Rod of length L (massless) with mass m, pivoted at O; horizontal spring k at depth a; generalized coordinate θ
02

Generalized coordinate and geometry

The rod can only rotate about \(O\), so a single coordinate describes the whole system. The paper chooses the angle \(\theta\) between the rod and the vertical.

Notation: \(x\) is the horizontal displacement of the rod at the spring level, and \(e\) is the spring elongation. For the rod to stay connected to the spring, they must be equal. This is the geometric constraint \(x = e\).

Height of the mass

With \(b\) the vertical distance from the spring level to the displaced mass (Figure 1.3 of the paper), \(a+b = L\cos\theta\) and \(a+b+h = L\). The rise of the mass is therefore

(1.6)$$h = L - L\cos\theta = L(1-\cos\theta)$$

Spring elongation

The paper takes the right triangle formed by the vertical, the spring level and the rod:

(1.9)$$\tan\theta = \frac{x}{a}\quad\Rightarrow\quad x = a\tan\theta$$

This means the spring stays at the fixed depth \(a\) below the support, and its end slides along the rod (like a collar). If instead the spring is fixed to the point of the rod at distance \(a\) from \(O\), that point moves on a circle and \(x = a\sin\theta\). The two readings agree for small angles but not for large ones (see section 8).

03

Energies of the system

TerminologyAs in the course: attractive energy \(\mathcal{A}\) = potential energy, repulsive coenergy \(\mathcal{R}^*\) = kinetic coenergy, \(\mathcal{L}=\mathcal{R}^*-\mathcal{A}\).

3.1 Repulsive (kinetic) coenergy

The rod is massless, so only the mass \(m\) contributes. It moves on a circle of radius \(L\), so \(v = L\dot\theta\):

(1.1)–(1.3)$$\mathcal{R}^* = \tfrac12 m v^2 = \tfrac12 m L^2\dot\theta^2$$

The paper writes the intermediate steps as \(\omega = L\dot\theta\) and \(v = L\cdot L\dot\theta\). These are typos: \(\omega=\dot\theta\) and \(v = L\dot\theta\). The final result (1.3) is correct.

3.2 Attractive (potential) energy

The gravitational energy of the mass (zero at the lowest position) plus the energy of the spring:

(1.7), (1.5)$$\mathcal{A}_m = mgh = mgL(1-\cos\theta),\qquad \mathcal{A}_k = \tfrac12 k e^2 = \tfrac12 k x^2$$
(1.10)$$\mathcal{A} = mgL(1-\cos\theta) + \tfrac12 k a^2\tan^2\theta$$

3.3 Lagrangian

(1.12)$$\mathcal{L} = \tfrac12 mL^2\dot\theta^2 - mgL(1-\cos\theta) - \tfrac12 ka^2\tan^2\theta$$
04

Lagrange equation

There are no non-conservative forces, so the right-hand side is zero:

$$\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot\theta}\right) - \frac{\partial\mathcal{L}}{\partial\theta} = 0$$
(1.13)–(1.15)$$\frac{\partial\mathcal{L}}{\partial\dot\theta} = mL^2\dot\theta,\qquad \frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot\theta} = mL^2\ddot\theta,\qquad \frac{\partial\mathcal{L}}{\partial\theta} = -mgL\sin\theta - ka^2\tan\theta\,\frac{1}{\cos^2\theta}$$
(1.16)$$mL^2\ddot\theta + \sin\theta\left(mgL + \frac{ka^2}{\cos^3\theta}\right) = 0$$

This is a nonlinear second-order differential equation.

Small angles

For \(\theta\ll1\): \(\sin\theta\approx\theta\) and \(\cos\theta\approx1\), which gives

(1.17)$$mL^2\ddot\theta + \left(mgL + ka^2\right)\theta = 0\qquad\Longrightarrow\qquad \omega_0^2 = \frac{g}{L} + \frac{ka^2}{mL^2}$$

The two restoring effects add up: gravity alone would give a simple pendulum (\(g/L\)), and the spring adds stiffness \(ka^2\) about the pivot.

05

Check with the variational indicator

The paper verifies the result with the variational indicator, which has the general form

(2.1)$$\text{V.I.} = \int_{t_1}^{t_2}\Big[\delta(\mathcal{R}^*-\mathcal{A}) + \sum_j \Xi_j\,\delta q_j\Big]dt$$

No forces do work on the variation \(\delta\theta\), so only the first term remains. Using \(\frac{d}{dt}\delta\theta = \delta\dot\theta\):

(2.4)$$\text{V.I.} = \int_{t_1}^{t_2}\Big[mL^2\dot\theta\,\delta\dot\theta - ka^2\frac{\tan\theta}{\cos^2\theta}\delta\theta - mgL\sin\theta\,\delta\theta\Big]dt$$

Integrating the first term by parts, with \(\delta\theta = 0\) at \(t_1\) and \(t_2\):

(2.5)$$\int_{t_1}^{t_2} mL^2\dot\theta\,\frac{d}{dt}\delta\theta\,dt = \Big[mL^2\dot\theta\,\delta\theta\Big]_{t_1}^{t_2} - \int_{t_1}^{t_2} mL^2\ddot\theta\,\delta\theta\,dt$$
(2.6)$$\text{V.I.} = \int_{t_1}^{t_2}\Big(-mL^2\ddot\theta - ka^2\frac{\tan\theta}{\cos^2\theta} - mgL\sin\theta\Big)\delta\theta\,dt$$

The indicator must vanish for every admissible variation \(\delta\theta\), so the bracket must be zero. This gives exactly equation (1.16) again, confirming the derivation.

07

Simulation results from the paper

Reference response

\(\theta_0 = \pi/180\) (1°), released from rest. Undamped oscillation with constant amplitude 0.0175 rad and period ≈ 3.9 s.

Changing m, L, a, k

One parameter changed at a time: \(m\) 0.5→4 kg, \(L\) 10→20 m, \(a\) 4→8 m, \(k\) 5→10 N/m. Only the frequency changes; the amplitude stays equal to the initial angle.

Large initial angle

\(\theta_0 = \pi/4\) (45°) versus 1°. A larger initial angle gives a larger amplitude. The paper's plot also shows a shorter period (≈ 3.1 s) at 45°, a nonlinear effect discussed in section 8.

The paper also compares the nonlinear and linear models for \(\theta_0 = 1^\circ\). The curves are indistinguishable at normal scale, and a strong zoom near \(t\approx6.7\) s is needed to see a time shift of about half a millisecond. It concludes that the approximation error is negligible for small angles. It finally writes the linear model in the form of a second-order inertial block \(T^2\ddot x + 2\xi T\dot x + x = Ku\). There is no \(\dot\theta\) term, so \(\xi = 0\) and the oscillation is undamped.

08

Critical review

The derivation is correctThe Lagrangian derivation and the variational-indicator check of (1.16) and (1.17) are correct for the chosen geometry (\(x = a\tan\theta\)). The reference response, the amplitude study and the 45° plot are reproduced exactly by the simulator.

The stated parameter trends contradict the equation

The paper concludes that increasing \(m\), \(L\) or \(a\) increases the frequency, and that increasing \(k\) decreases it. From \(\omega_0^2 = g/L + ka^2/(mL^2)\):

ChangePeriod T₀ (from the formula)FrequencyPaper says
reference3.91 s––
m: 0.5 → 4 kg5.78 sdecreasesincreases ✗
L: 10 → 20 m6.66 sdecreasesincreases ✗
a: 4 → 8 m2.31 sincreasesincreases ✓
k: 5 → 10 N/m3.07 sincreasesdecreases ✗

In the paper's plots for \(m\) and \(k\), the curve labeled with the changed value has the reference period of 3.9 s, and the other curve has the period predicted for the changed value (5.8 s for \(m=4\), 3.1 s for \(k=10\)). The legend entries appear to be swapped, which led to the wrong conclusions. Intuitively: a heavier mass or a longer rod makes the pendulum slower, and a stiffer spring makes it faster.

Amplitude affects the period in the nonlinear model

The paper states that the amplitude depends only on the initial angle and that the parameters affect only the frequency. This is exact for the linear model. In the nonlinear model the period also depends on the amplitude. With \(x = a\tan\theta\) the spring torque \(ka^2\sin\theta/\cos^3\theta\) grows faster than linearly (a hardening spring), so the 45° oscillation has a period of 3.09 s instead of 3.91 s. This is visible in the paper's own 45° plot, but not commented on.

How the spring is attached matters at large angles

The problem says the spring is attached to the rod "at distance \(a\) from the support". If the attachment point is fixed on the rod, it moves on a circle of radius \(a\). The elongation of a long horizontal spring is then \(x = a\sin\theta\), and the equation becomes

$$mL^2\ddot\theta + mgL\sin\theta + ka^2\sin\theta\cos\theta = 0$$

This spring torque grows more slowly than linearly (softening), and at 45° the period becomes 4.38 s. Both models have the same linearization (1.17), so the distinction only matters for large angles. The simulator offers both.

Minor slips: the typos \(\omega = L\dot\theta\) and \(v = L\cdot L\dot\theta\) (section 3); (1.14) labeled \(\partial\mathcal{L}/\partial\dot\theta\) instead of \(\partial\mathcal{L}/\partial\theta\); and the total potential energy described as a "sum of kinetic energies". The units of \(k\) are not stated (N/m).

09

Interactive simulator

The simulator solves the equation numerically (4th-order Runge–Kutta, 2 ms step). The initial angle is entered in degrees, and plots show radians as in the paper. An optional viscous damping coefficient \(b\) adds a torque \(-b\dot\theta\), so you can see what the paper's last remark about real, damped systems looks like.

Cases

System parameters

Initial conditions

Parameter comparison

The defaults are the paper's values: m = 4, L = 20, a = 8, k = 10.

Angle θ(t)
Parameter comparison
Period vs. amplitude
Released from rest at θ₀ (no damping)
Phase portrait θ̇(θ)
Energy balance (selected model)
\(\mathcal{R}^*+\mathcal{A}+W_b\) must stay constant (\(W_b\) = energy dissipated by damping).
Animation (selected model)
Results table (every 0.1 s)
10

Review questions

Why does the system have only one degree of freedom?

The rod is rigid and pivoted at a fixed point, so the mass and the spring end are fully determined by the angle \(\theta\). The spring adds no freedom because of the constraint \(x = e\).

What does the small-angle frequency \(\omega_0^2 = g/L + ka^2/(mL^2)\) tell us?

Gravity and the spring act in parallel as restoring stiffnesses about the pivot: \(mgL\) and \(ka^2\). Both are divided by the moment of inertia \(mL^2\). A heavier mass or a longer rod lowers the frequency; a stiffer spring or a lower attachment point (larger \(a\)) raises it.

Why does the period at 45° differ from the small-angle period?

The restoring torque is no longer proportional to \(\theta\). With \(x = a\tan\theta\) it grows faster (hardening), so the period gets shorter. With \(x = a\sin\theta\), and from gravity's \(\sin\theta\), it grows slower (softening), so the period gets longer.

What does the variational indicator add to the Lagrangian derivation?

It is an independent route from the same energies to the equation of motion, via Hamilton's principle with integration by parts. Getting the same result is a consistency check on the derivatives.

How do you write the linear model as a second-order inertial block?

Divide (1.17) by \(mgL + ka^2\): \(T^2\ddot\theta + \theta = 0\) with \(T = 1/\omega_0\) and \(\xi = 0\). With damping \(b\), the term \(b\dot\theta\) gives \(\xi = b/(2mL^2\omega_0)\).

How could you have caught the wrong parameter trends without a simulation?

From the formula for \(\omega_0\), or from dimensional and physical intuition: a heavier mass is harder to accelerate, so it oscillates more slowly, and a stiffer spring pulls back harder, so it oscillates faster. Checking a plot against such a simple prediction is a good habit, and it also catches swapped legends.