{
  "id": "lagrangian-mechanics",
  "title": "Lagrangian Mechanics",
  "lang": "en",
  "source_lang": "en",
  "summary": "Lagrangian mechanics formulates dynamics through generalized coordinates and stationary action, linking classical motion to conservation laws, relativity, and field theory.",
  "category": "science",
  "subcategory": "physics",
  "type": "concept",
  "aliases": [
    "Lagrangian dynamics",
    "Lagrange’s formulation of mechanics"
  ],
  "generated_at": "2026-11-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/lagrangian-mechanics/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/lagrangian-mechanics/",
      "json": "https://aiwiki.page/zh/lagrangian-mechanics.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Lagrangian mechanics is a formulation of classical mechanics in which the motion of a system is determined by a scalar function called the Lagrangian. Instead of resolving all forces into Cartesian components, it describes configurations using suitable coordinates and obtains their evolution from differential equations or an equivalent variational principle. For many mechanical systems, the Lagrangian is the difference between kinetic energy and potential energy, although its general definition is not restricted to this form.\n\nDeveloped from eighteenth-century analytical mechanics and systematized by Joseph-Louis Lagrange, the method is particularly effective for interconnected bodies, constrained motion, and systems whose geometry suggests coordinates other than Cartesian position. It also reveals relationships that are less apparent in a direct force-based description: continuous symmetries imply conservation laws, mechanical motion has a geometric interpretation, and particle dynamics and classical field equations share a common mathematical structure.\n\nLagrangian mechanics is ordinarily equivalent to Newtonian mechanics when both are applied to the same system under the same assumptions. Its importance lies in its organization and generality rather than in different predictions for ordinary mechanical motion. Extensions of the framework underpin relativistic mechanics, electromagnetism, and much of modern theoretical physics."
    },
    {
      "heading": "Historical development",
      "text": "The origins of Lagrangian mechanics lie in several attempts to express mechanical laws through general mathematical principles. In the seventeenth century, Isaac Newton established a force-based account of motion, published in the Principia in 1687. At approximately the same period, developments in calculus made it possible to describe entire trajectories analytically. Problems involving pendulums, planetary orbits, vibrating strings, and constrained bodies increasingly required techniques that went beyond writing independent Cartesian force equations.\n\nOne important predecessor was the principle of virtual work. In a static equilibrium, the total work of the applied forces vanishes for every infinitesimal displacement compatible with the constraints, provided the constraint reactions themselves do no virtual work. Jean le Rond d’Alembert extended this reasoning to dynamics in his Traité de dynamique of 1743. By including inertial terms alongside applied forces, he expressed motion in a form resembling equilibrium. This allowed many unknown constraint reactions to disappear before the equations were solved.\n\nA second line of development concerned variational principles. Pierre-Louis Moreau de Maupertuis advanced a principle of least action in the 1740s, while Leonhard Euler developed systematic methods for finding functions that extremize integrals. Lagrange’s work in the 1750s provided a more general analytical method for such problems. These developments formed the foundation of the calculus of variations, in which the unknown object is a function or path rather than a finite collection of numbers.\n\nLagrange’s Mécanique analytique, published in 1788, organized mechanics around generalized coordinates and analytical operations. Its characteristic achievement was to replace problem-specific geometric constructions with a common procedure. Once the kinetic energy, applied forces, and constraints were expressed in suitable variables, the equations of motion could be obtained systematically. The formulation did not eliminate physical modeling: choosing the coordinates, identifying the forces, and deciding which constraints are ideal remained essential steps.\n\nThe modern stationary-action presentation also reflects nineteenth-century developments. William Rowan Hamilton formulated his principle in 1834–1835 and developed the related Hamiltonian description. In 1918, Emmy Noether established a precise connection between continuous variational symmetries and conservation laws. During the twentieth century, action-based methods became central to relativity and quantum field theory. The contemporary subject therefore combines Lagrange’s analytical treatment of mechanical systems with later work on variational principles, geometry, symmetry, and fields."
    },
    {
      "heading": "Generalized coordinates and the mechanical Lagrangian",
      "text": "A system’s configuration space is the collection of its possible configurations. A point in this space specifies positions or orientations, but not velocities. For \\(N\\) unconstrained point particles in three-dimensional space, \\(3N\\) Cartesian coordinates are sufficient. Independent constraints can reduce the number of coordinates required. A particle confined to a sphere, for example, needs only two angular coordinates even though its position has three Cartesian components.\n\nCoordinates on configuration space are called generalized coordinates and are conventionally written \\(q_1,\\ldots,q_n\\). They may be distances, angles, or other parameters. Particle positions are expressed as\n\n\\[\\mathbf r_a=\\mathbf r_a(q_1,\\ldots,q_n,t),\\]\n\nso their velocities follow by differentiation:\n\n\\[\\dot{\\mathbf r}_a = \\sum_i\\frac{\\partial\\mathbf r_a}{\\partial q_i}\\dot q_i + \\frac{\\partial\\mathbf r_a}{\\partial t}.\\]\n\nThe explicit time dependence allows the coordinate description to incorporate moving supports or prescribed moving constraints.\n\nFor particles with fixed masses \\(m_a\\), the kinetic energy is\n\n\\[T=\\frac12\\sum_a m_a\\dot{\\mathbf r}_a^{\\,2}.\\]\n\nWhen the position mapping has no explicit time dependence, this becomes a quadratic form,\n\n\\[T=\\frac12\\sum_{i,j}M_{ij}(q)\\dot q_i\\dot q_j.\\]\n\nThe coefficients \\(M_{ij}\\) constitute the mass matrix. Their dependence on configuration accounts for many coupling and inertial effects that would otherwise appear as separate force terms. For suitable independent coordinates and positive masses, the matrix is positive definite.\n\nIf the applied forces derive from a position-dependent potential \\(V(q,t)\\), the standard mechanical Lagrangian is\n\n\\[L(q,\\dot q,t)=T(q,\\dot q,t)-V(q,t).\\]\n\nFor a pendulum with bob mass \\(m\\), length \\(\\ell\\), and angle \\(\\theta\\) measured from the downward vertical, one convenient choice is\n\n\\[L=\\frac12m\\ell^2\\dot\\theta^2-mg\\ell(1-\\cos\\theta).\\]\n\nThe fixed length has already been incorporated into the coordinate choice. The string tension therefore need not appear in the equation determining \\(\\theta\\).\n\nThe expression \\(L=T-V\\) is important but not universal. Velocity-dependent interactions, relativistic particles, and fields require more general functions. Nor is a Lagrangian unique. Adding a constant changes no equation of motion, and adding a total time derivative \\(dF(q,t)/dt\\) also leaves the fixed-endpoint variational equations unchanged. Thus, the physical content belongs to a class of equivalent Lagrangians rather than to a single algebraic expression."
    },
    {
      "heading": "Stationary action and the Euler–Lagrange equations",
      "text": "The action associated with a path \\(q(t)\\) is the time integral of its Lagrangian:\n\n\\[S[q]=\\int_{t_1}^{t_2}L(q,\\dot q,t)\\,dt.\\]\n\nIn ordinary mechanical applications, action has dimensions of energy multiplied by time. Hamilton’s principle states that the physical path makes this functional stationary under sufficiently small admissible variations that keep the endpoint configurations fixed. “Stationary” means that the first-order change vanishes; it does not necessarily mean that the action is the smallest possible value.\n\nTo obtain the equations of motion, consider neighboring paths\n\n\\[q_i(t)\\longrightarrow q_i(t)+\\varepsilon\\eta_i(t), \\qquad \\eta_i(t_1)=\\eta_i(t_2)=0.\\]\n\nDifferentiating the action with respect to \\(\\varepsilon\\) at zero gives\n\n\\[\\delta S = \\int_{t_1}^{t_2} \\sum_i \\left( \\frac{\\partial L}{\\partial q_i}\\eta_i + \\frac{\\partial L}{\\partial\\dot q_i}\\dot\\eta_i \\right)dt.\\]\n\nAn integration by parts moves the time derivative from \\(\\eta_i\\) to its coefficient. The boundary term vanishes because the endpoint variations are zero. Since the remaining variations are arbitrary, each coefficient must vanish:\n\n\\[\\frac{d}{dt}\\frac{\\partial L}{\\partial\\dot q_i} - \\frac{\\partial L}{\\partial q_i} =0.\\]\n\nThese are the Euler–Lagrange equations. For a particle in Cartesian coordinates with \\(L=m\\dot{\\mathbf r}^{\\,2}/2-V(\\mathbf r)\\), they reduce to \\(m\\ddot{\\mathbf r}=-\\nabla V\\), reproducing Newton’s laws of motion for a conservative force.\n\nThe derivation also establishes the importance of boundary conditions. Fixing positions at both endpoints removes the boundary contribution automatically. If endpoints are free to move, additional endpoint conditions arise. A variational problem with prescribed endpoint positions is mathematically different from an initial-value problem, although both can describe the same differential equations. In practical mechanics, an initial position and velocity usually determine a local trajectory when the equations are regular.\n\nStationary action should not be interpreted as a particle anticipating its destination or comparing future paths. It is a compact mathematical characterization of local differential equations. Likewise, the phrase “least action” requires caution: depending on the trajectory and time interval, a stationary path may be a local minimum or a saddle point. The vanishing of the first variation alone does not determine which case occurs."
    },
    {
      "heading": "Constraints, virtual work, and nonconservative forces",
      "text": "Constraints restrict either configurations or velocities. A holonomic constraint can be written as\n\n\\[f_\\alpha(q,t)=0.\\]\n\nExamples include a particle confined to a surface or two points kept at a fixed separation. When independent holonomic constraints are incorporated directly into the coordinates, fewer variables are needed. Alternatively, redundant coordinates can be retained and the constraints enforced through Lagrange multipliers.\n\nFor constraints depending only on coordinates and time, the multiplier equations take the form\n\n\\[\\frac{d}{dt}\\frac{\\partial L}{\\partial\\dot q_i} - \\frac{\\partial L}{\\partial q_i} = \\sum_\\alpha\\lambda_\\alpha \\frac{\\partial f_\\alpha}{\\partial q_i},\\]\n\ntogether with the constraint equations themselves. The multipliers parameterize the constraint reactions. Their numerical values depend on how the constraint functions are normalized, but the resulting generalized reaction forces have physical significance. This method is useful when tensions or normal forces are required in addition to the motion.\n\nThe usual elimination of constraint reactions relies on ideality. For ideal constraints, the reactions do no work on admissible virtual displacements at a fixed time. A virtual displacement is therefore not necessarily the displacement that occurs during a small time interval. A moving constraint can transfer actual energy to a system even when its reaction does zero virtual work. A pendulum with a prescribed moving pivot illustrates this distinction.\n\nSome velocity constraints cannot be integrated into restrictions on position alone. Such nonholonomic constraints occur in rolling without slipping. For a constraint of the form\n\n\\[\\sum_i a_{\\alpha i}(q,t)\\dot q_i+a_{\\alpha0}(q,t)=0,\\]\n\nthe standard ideal Lagrange–d’Alembert formulation restricts virtual displacements by \\(\\sum_i a_{\\alpha i}\\delta q_i=0\\). Simply inserting the velocity constraint into an unconstrained action principle is not generally equivalent. Varying an action over velocity-constrained paths can produce different equations, often called vakonomic equations.\n\nForces not represented by the chosen Lagrangian appear as generalized forces:\n\n\\[\\frac{d}{dt}\\frac{\\partial L}{\\partial\\dot q_i} - \\frac{\\partial L}{\\partial q_i} =Q_i, \\qquad Q_i=\\sum_a\\mathbf F_a\\cdot \\frac{\\partial\\mathbf r_a}{\\partial q_i}.\\]\n\nLinear viscous damping can often be represented by a Rayleigh dissipation function \\(\\mathcal R=\\tfrac12\\sum_{ij}b_{ij}\\dot q_i\\dot q_j\\), with \\(Q_i=-\\partial\\mathcal R/\\partial\\dot q_i\\). This is an extension of the equations of motion, not a claim that dissipative motion follows from the ordinary conservative action. Dry friction, impacts, and changing contacts generally require additional constitutive laws or nonsmooth formulations."
    },
    {
      "heading": "Pendulums, orbital motion, and small oscillations",
      "text": "The pendulum illustrates how a compact Lagrangian produces nonlinear dynamics. Substituting its Lagrangian into the Euler–Lagrange equation gives\n\n\\[m\\ell^2\\ddot\\theta+mg\\ell\\sin\\theta=0.\\]\n\nFor small angular amplitudes, \\(\\sin\\theta\\approx\\theta\\), and the angular frequency is \\(\\omega_0=\\sqrt{g/\\ell}\\). The corresponding small-amplitude period is \\(2\\pi\\sqrt{\\ell/g}\\). At larger amplitudes, the approximation fails and the period increases. The nonlinearity lies in the potential rather than in any complication of the variational procedure.\n\nCentral-force motion demonstrates the value of symmetry-adapted coordinates. After separating the center-of-mass motion of two interacting bodies, their relative planar motion can be described using radius \\(r\\), angle \\(\\phi\\), and reduced mass \\(\\mu=m_1m_2/(m_1+m_2)\\):\n\n\\[L=\\frac12\\mu(\\dot r^2+r^2\\dot\\phi^2)-V(r).\\]\n\nBecause \\(L\\) does not depend explicitly on \\(\\phi\\), its conjugate momentum is constant:\n\n\\[p_\\phi=\\mu r^2\\dot\\phi=\\ell_z.\\]\n\nThis is the angular momentum perpendicular to the orbital plane.\n\nThe radial equation can then be interpreted using an effective potential,\n\n\\[V_{\\mathrm{eff}}(r)=V(r)+\\frac{\\ell_z^2}{2\\mu r^2}.\\]\n\nThe second term is the centrifugal contribution. For Newtonian gravity, \\(V(r)=-Gm_1m_2/r\\), and the effective potential helps classify bound motion, escape, and circular orbits. A circular orbit occurs where \\(dV_{\\mathrm{eff}}/dr=0\\), while its response to small radial perturbations depends on the curvature of the effective potential.\n\nCoupled small oscillations provide another major application. Near a stable equilibrium, write the coordinate deviations as \\(\\eta_i\\). To quadratic order, a conservative system has\n\n\\[L=\\frac12\\dot{\\boldsymbol\\eta}^{\\,T}M\\dot{\\boldsymbol\\eta} -\\frac12\\boldsymbol\\eta^{T}K\\boldsymbol\\eta,\\]\n\nwhere \\(M\\) is the mass matrix and \\(K\\) is the stiffness matrix. The equations are\n\n\\[M\\ddot{\\boldsymbol\\eta}+K\\boldsymbol\\eta=0.\\]\n\nSeeking a motion proportional to \\(e^{i\\omega t}\\) gives the generalized eigenvalue problem\n\n\\[K\\mathbf a=\\omega^2M\\mathbf a.\\]\n\nIts eigenvectors specify normal modes: collective patterns in which the system oscillates at a single frequency. This approach applies to coupled pendulums, elastic structures, and molecular vibrations. It also exposes the limits of linearization. Zero-frequency modes may reflect a continuous symmetry or an unconstrained motion; negative values of \\(\\omega^2\\) indicate exponential instability rather than oscillation. At larger amplitudes, neglected higher-order terms couple modes and can produce resonances and more complicated dynamics."
    },
    {
      "heading": "Symmetry, momentum, and conservation laws",
      "text": "The generalized momentum conjugate to \\(q_i\\) is\n\n\\[p_i=\\frac{\\partial L}{\\partial\\dot q_i}.\\]\n\nIt need not equal a mass multiplied by the coordinate velocity. For an angular coordinate it may be an angular momentum, and in a velocity-dependent interaction it may contain an additional field contribution. Its definition follows from the structure of the Lagrangian rather than from the coordinate’s name or physical units.\n\nA coordinate is cyclic, or ignorable, when the Lagrangian does not depend on it explicitly. The Euler–Lagrange equation then gives \\(\\dot p_i=0\\). This makes an appropriate coordinate choice a powerful analytical tool: a symmetry that is obscure in Cartesian coordinates may become an immediate conservation law in polar or other adapted coordinates.\n\nNoether’s theorem generalizes this observation. Every continuous symmetry of an action, subject to the theorem’s assumptions, determines a conserved quantity along solutions. In ordinary isolated systems, spatial translation symmetry leads to conservation of linear momentum, rotational symmetry leads to conservation of angular momentum, and time-translation symmetry leads to conservation of energy. Symmetry concerns the complete physical system, including external fields and constraints. A particle in a fixed external potential need not conserve its own momentum because the environment can exchange momentum with it.\n\nFor a mechanical Lagrangian, define the energy function\n\n\\[E_L=\\sum_i\\dot q_i p_i-L.\\]\n\nAlong solutions of the unforced Euler–Lagrange equations,\n\n\\[\\frac{dE_L}{dt}=-\\frac{\\partial L}{\\partial t}.\\]\n\nThus, the absence of explicit time dependence guarantees conservation of \\(E_L\\). For a standard system with time-independent coordinates, quadratic kinetic energy, and a velocity-independent potential, this quantity is \\(T+V\\). With moving coordinates or more general interactions, its identification with physical energy requires greater care.\n\nThe action can be invariant even when the Lagrangian changes by a total derivative. For an infinitesimal fixed-time transformation \\(\\delta q_i=\\varepsilon\\xi_i\\), if \\(\\delta L=\\varepsilon\\,dB/dt\\), the conserved quantity is\n\n\\[J=\\sum_i p_i\\xi_i-B.\\]\n\nThe boundary contribution \\(B\\) is therefore part of the conservation law. Transformations that also change time have a corresponding extension involving \\(E_L\\).\n\nThese distinctions are visible in electromagnetism. For charge \\(e\\) moving in scalar and vector potentials \\(\\phi\\) and \\(\\mathbf A\\),\n\n\\[L=\\frac12m\\mathbf v^2+e\\mathbf A\\cdot\\mathbf v-e\\phi, \\qquad \\mathbf p=m\\mathbf v+e\\mathbf A.\\]\n\nThe canonical momentum differs from mechanical momentum. Under \\(\\mathbf A\\to\\mathbf A+\\nabla\\chi\\) and \\(\\phi\\to\\phi-\\partial_t\\chi\\), the Lagrangian changes only by \\(e\\,d\\chi/dt\\). This gauge freedom leaves the equations of motion and the observable Lorentz force unchanged."
    },
    {
      "heading": "Hamiltonian formulation and geometric structure",
      "text": "The relationship to Hamiltonian mechanics is established through a Legendre transformation. Starting with \\(p_i=\\partial L/\\partial\\dot q_i\\), suppose these equations can locally be solved for the velocities as functions of \\(q,p,t\\). The Hamiltonian is then\n\n\\[H(q,p,t)=\\sum_i p_i\\dot q_i-L(q,\\dot q,t),\\]\n\nwith the velocities replaced by those functions. The resulting equations are\n\n\\[\\dot q_i=\\frac{\\partial H}{\\partial p_i}, \\qquad \\dot p_i=-\\frac{\\partial H}{\\partial q_i}.\\]\n\nFor a regular system with \\(n\\) coordinates, the Lagrangian formulation ordinarily supplies \\(n\\) second-order differential equations, while the Hamiltonian formulation supplies \\(2n\\) first-order equations. They describe the same dynamics in different variables.\n\nRegularity is determined by the velocity Hessian,\n\n\\[W_{ij}= \\frac{\\partial^2L}{\\partial\\dot q_i\\partial\\dot q_j}.\\]\n\nIf this matrix is nonsingular, the inverse-function theorem guarantees a local transformation between velocities and momenta. If it is singular, not all canonical variables are independent. Relations among positions and momenta become constraints, and the ordinary Legendre transformation must be replaced by a constrained analysis. Gauge field theories provide important examples; the Dirac–Bergmann method organizes their primary constraints, consistency conditions, and gauge freedoms.\n\nThe geometric distinction is between position–velocity space and phase space. If configuration space is a manifold \\(Q\\), positions and velocities form its tangent bundle \\(TQ\\). Positions and covectors representing canonical momenta form the cotangent bundle \\(T^*Q\\). The Lagrangian naturally acts on \\(TQ\\), whereas the Hamiltonian naturally acts on \\(T^*Q\\). For a time-dependent system, time appears as an additional argument.\n\nIn an unforced system whose kinetic energy is purely quadratic,\n\n\\[L=\\frac12g_{ij}(q)\\dot q_i\\dot q_j,\\]\n\nthe coefficients \\(g_{ij}\\) define a metric on configuration space, and the trajectories are affinely parameterized geodesics of that metric. The metric contains masses and geometric factors, so it is not necessarily the metric of ordinary physical space. For example, two angles describing an articulated mechanism can constitute coordinates on a curved configuration space even though every component moves in Euclidean space.\n\nThis viewpoint explains why coordinate-dependent inertial terms need not represent new interactions. They can arise from the geometry of the chosen variables. It also clarifies coordinate singularities: a failure of angular coordinates at a pole is not a failure of the physical dynamics. Hamiltonian and Lagrangian descriptions provide complementary tools—one emphasizing phase-space structure and canonical transformations, the other often preserving a more direct connection to constraints, geometry, and model construction."
    },
    {
      "heading": "Relativistic particles and classical fields",
      "text": "The variational framework extends beyond Newtonian kinetic energy. In special relativity, a free massive particle has the coordinate-time Lagrangian\n\n\\[L=-mc^2\\sqrt{1-\\frac{v^2}{c^2}},\\]\n\nwhere \\(c\\) is the speed of light. The resulting momentum is \\(\\mathbf p=\\gamma m\\mathbf v\\), and the Hamiltonian is \\(H=\\gamma mc^2\\), with \\(\\gamma=(1-v^2/c^2)^{-1/2}\\). At speeds much smaller than \\(c\\),\n\n\\[L=-mc^2+\\frac12mv^2+\\text{higher-order terms}.\\]\n\nThe constant rest-energy term does not affect the equations of motion, so the Newtonian free-particle Lagrangian emerges in the low-speed limit.\n\nAn invariant form of the particle action is\n\n\\[S=-mc^2\\int d\\tau,\\]\n\nwhere \\(\\tau\\) is proper time along the worldline. In general relativity, the same construction uses the spacetime metric to define proper time. Its stationary paths are geodesics for freely falling massive test particles. This unifies the description of inertia and gravity at the level of the action, while massless trajectories require a different, suitably constrained formulation.\n\nFor continuous fields, a finite set of coordinates is replaced by quantities \\(\\phi_a(x)\\) defined at points of spacetime. The action is an integral of a Lagrangian density:\n\n\\[S[\\phi]=\\int d^4x\\,\\mathcal L(\\phi_a,\\partial_\\mu\\phi_a,x).\\]\n\nThe choice of spacetime coordinates and units determines any factors of \\(c\\) in the measure. The field Euler–Lagrange equations are\n\n\\[\\partial_\\mu \\left( \\frac{\\partial\\mathcal L}{\\partial(\\partial_\\mu\\phi_a)} \\right) - \\frac{\\partial\\mathcal L}{\\partial\\phi_a} =0.\\]\n\nThey are partial differential equations rather than ordinary differential equations because fields vary across space as well as time.\n\nA vibrating string gives a direct mechanical example. For transverse displacement \\(u(x,t)\\), linear mass density \\(\\rho\\), and constant tension \\(\\mathcal T\\), the small-amplitude Lagrangian density is\n\n\\[\\mathcal L= \\frac12\\rho(\\partial_tu)^2 -\\frac12\\mathcal T(\\partial_xu)^2.\\]\n\nVariation gives the wave equation \\(\\rho\\,\\partial_t^2u-\\mathcal T\\,\\partial_x^2u=0\\), with wave speed \\(\\sqrt{\\mathcal T/\\rho}\\). Field theory is therefore a natural extension of coupled mechanical degrees of freedom.\n\nElectromagnetic potentials likewise admit a Lagrangian density whose variation produces Maxwell’s equations. In quantum field theory, Lagrangian densities organize fields, symmetries, and interactions. In quantum mechanics, the path-integral formulation associates paths with phases involving \\(S/\\hbar\\). Classical stationary-action behavior emerges through interference in appropriate semiclassical regimes; quantum theory does not restrict contributions to the single classical path."
    },
    {
      "heading": "Engineering applications, computation, and limits",
      "text": "Lagrangian methods are widely used in multibody engineering because they organize the dynamics of connected components. Robot arms, vehicle suspensions, spacecraft mechanisms, and biomechanical models can be described using joint coordinates and body orientations. For a typical mechanical system, the equations can be arranged as\n\n\\[M(q)\\ddot q+C(q,\\dot q)\\dot q+g(q)=\\tau,\\]\n\nwhere \\(M\\) is the mass matrix, \\(C\\dot q\\) collects velocity-dependent inertial terms, \\(g\\) contains gravitational contributions, and \\(\\tau\\) represents applied generalized forces. The matrix \\(C\\) is not unique, although the complete modeled inertial force is fixed.\n\nIn structural mechanics, approximating a displacement field by finitely many basis functions converts a continuum Lagrangian into a finite-dimensional one. The coefficients become generalized coordinates. This is one route to the mass and stiffness matrices used in finite-element vibration analysis. Electrical circuits also admit analogous formulations: for suitable circuits, node fluxes or branch charges act as generalized coordinates, while inductive and capacitive energies provide the storage terms. Resistive losses must be included separately or represented through an extended model.\n\nComputational methods can exploit the variational structure rather than merely discretizing the differential equations. A variational integrator begins with a discrete action,\n\n\\[S_d=\\sum_k L_d(q_k,q_{k+1};h),\\]\n\nwhere \\(L_d\\) approximates the action over a time step \\(h\\). Requiring stationarity with respect to the intermediate configurations gives discrete Euler–Lagrange equations. For regular unconstrained systems, the resulting evolution preserves an appropriate symplectic structure. If the discrete action preserves a continuous symmetry, a corresponding discrete momentum is conserved.\n\nSuch schemes can have good long-time behavior in conservative orbital and molecular simulations, but they do not ordinarily conserve the original continuous energy exactly. Their performance still depends on step size, smoothness, constraints, and implementation. Structure preservation is not equivalent to exact trajectories, and close encounters or rapidly changing forces can remain computationally demanding.\n\nThe framework also has conceptual limits. A closed conservative mechanical model does not by itself describe entropy production, random thermal forcing, irreversible material response, or the loss of energy into unresolved degrees of freedom. Effective equations may require damping, noise, memory kernels, or coupling to additional variables. Thermodynamic consistency then places requirements beyond the ordinary stationary-action principle.\n\nContact and impact create a different difficulty: velocities may jump, admissible configurations may change, and the equations may involve inequalities rather than smooth equalities. Flexible bodies undergoing large deformation require suitable constitutive laws, while higher-time-derivative Lagrangians require additional boundary data and can introduce instabilities absent from ordinary first-derivative mechanics. In these cases, the central task remains the specification of a physically appropriate model; the variational formalism organizes its consequences but does not supply the missing material laws, interaction rules, or environmental assumptions."
    }
  ],
  "links": [
    "classical-mechanics",
    "lagrangian",
    "kinetic-energy",
    "potential-energy",
    "isaac-newton",
    "calculus-of-variations",
    "configuration-space",
    "generalized-coordinates",
    "action-physics",
    "euler-lagrange-equations",
    "newtons-laws-of-motion",
    "lagrange-multipliers",
    "friction",
    "center-of-mass",
    "angular-momentum",
    "gravity",
    "normal-mode",
    "noethers-theorem",
    "momentum",
    "electromagnetism",
    "gauge-theory",
    "lorentz-force",
    "hamiltonian-mechanics",
    "phase-space",
    "special-relativity",
    "speed-of-light",
    "general-relativity",
    "spacetime",
    "maxwells-equations",
    "quantum-field-theory",
    "quantum-mechanics"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}