## I. INTRODUCTION

In a recent paper,^{1} Smith and Matlis presented an interesting experiment about fluid oscillations in a drinking straw. They employed an approach using only Newton's second law, making it considerably simpler than the fluid mechanics-based solution given by a previous study.^{2} This paper offers an alternative approach—one using Lagrangian mechanics. It involves a modified form of the well-known Euler–Lagrange equation needed to accurately account for non-conservative forces and variable masses. This is pedagogically valuable as physics undergraduate students are generally less familiar with the modified forms.

## II. PROBLEM STATEMENT

Consider the setup shown in Fig. 1. If a straw is capped with a finger and immersed in a liquid bath up to a depth *d* and then the cap is suddenly released, the liquid rushes into the straw until it reaches its maximum height. The liquid level inside the straw *z* then undergoes a damped oscillation until it eventually settles to the level of the liquid bath. The question of how *z* varies with time, therefore, arises. In this paper, we will derive, using Lagrangian mechanics, the equation presented in Ref. 1 that models how *z* varies with time.

## III. THE LAGRANGIAN METHOD

The Euler–Lagrange equation is widely known among undergraduates as

where $L\u2261T\u2212V$ is the Lagrangian, which is defined as the difference between the kinetic energy *T* and the potential energy *V*, and *q _{i}* is a generalized coordinate.

Less familiar, however, are the modified forms that account for non-conservative forces, such as friction and/or variable masses. This is both unsurprising and undesirable, because such forms are often omitted from physics textbooks, leading some students to falsely assume that the Lagrangian method does not apply at all to those systems.^{4}

To properly incorporate non-conservative forces and variable masses, Eq. (1) must be modified into

as given in Ref. 5. In the above equation, $Qqi$ is the sum of the generalized forces for variable *q _{i}*, which act on the system, and it includes the momentum flux term

where *m* is the variable mass, *u* is the speed of the mass entering the system (liquid column in the straw), and *v* is the speed of the variable mass.^{5} The first term $m\u0307u$ is a reactive force, which arises from the accretion or excretion of mass by a system. The second term $(v2/2)(\u2202m/\u2202qi)$ describes the momentum flux force that originates from the mass's explicit dependence on position. These momentum flux forces are mathematically derived from D'Alembert's principle of virtual work and are discussed in greater depth by Pesce.^{6,7}

Modelling the oscillation requires the use of the extended Euler–Lagrange equation, because the mass of the liquid in the drinking straw varies explicitly with position and a velocity-dependent damping force acts on the liquid during the oscillation. Here, *q _{i}* is simply

*z*, and the variable mass is given by $m=\rho Az$. Thus, the kinetic energy

*T*is given by

and the sum of the external generalized forces is

where *ρ* is the density of the liquid, *A* is the cross-sectional area of the straw, and $b\u2032$ is the phenomenological damping coefficient.

The Appendix shows that the fourth term of Eq. (5), $\rho z\u0307Au$, is a second-order correction, which Smith and Matlis's model inherently neglected. Here, we also neglect this second-order term. This is equivalent to approximating the speed *u* that the liquid enters the straw as zero, after which that liquid is instantaneously accelerated to the speed of the liquid in the straw, *v*. Moreover, the speed *v* is equal to the time derivative $z\u0307$. Hence, we have

where $b\u2261b\u2032/\rho A$. Dividing through by *z*, we obtain the equation

which describes the damped oscillations discussed in greater detail in Ref. 1.

## IV. CONCLUSION

Students could be asked to solve the differential equation above numerically to discover the damped oscillatory behaviour exhibited by this setup. This is a didactic task that would teach students a useful tool that is applicable to the study of many other physical phenomena. Furthermore, solving this problem using the Lagrangian formulation gives students the opportunity to apply the extended Euler–Lagrange equation and, therefore, better grasp the true power of the Lagrangian method.

### APPENDIX: EXPLANATION FOR WHY THE NEWTONIAN MODEL ASSUMES *u* = 0

Recall that Smith and Matlis^{1} modelled the oscillation with the equation

Multiplying through by *dt*, we obtain

This Appendix explains why this model inherently assumes that the mass enters the straw at speed *u *=* *0, which we have substituted into Eq. (5) to obtain Eq. (6).

Consider the mass *m* inside the straw and an infinitesimal mass *dm* entering the straw during the time interval *t* to *t* + *dt*. The forces acting on this system are the weight $Fg=\u2212mg$, the force due to hydrostatic pressure at the bottom of the liquid in the straw $Fpressure=\rho gAd$, and the velocity-dependent damping force $Fdamping=\u2212b\u2032z\u0307$. From the impulse-momentum theorem, the change in momentum during the time interval *t* to *t* + *dt* is given by

Conversely, we can calculate $pfinal$ at time *t* + *dt* by using the mass *m* + *dm* inside the straw moving at velocity $z\u0307+dz\u0307$, which gives $pfinal=(m+dm)(z\u0307+dz\u0307)=mz\u0307+z\u0307\u2009dm+m\u2009dz\u0307+\u2009dmdz\u0307$. Neglecting the last term, which is second order, gives the same final momentum as Eq. (A4). This implies that the infinitesimal mass *dm* has speed *u *=* *0 at time *t*. Hence, Smith and Matlis' model assumes that the liquid enters the straw at speed *u *=* *0 and is instantaneously accelerated to speed $z\u0307$.

Note that it does not matter whether we use *m* or *m* + *dm* when calculating $Fg$ and whether we use $z\u0307$ or $z\u0307+dz\u0307$ when calculating $Fdamping$. This is because the differences in momentum arising from these (*dmdt* and $dz\u0307dt$) are second order and can, therefore, be neglected.