Files
2nd/10_Wiki/Topics/Computer_Science_and_Theory/Principle-of-Least-Action.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

5.0 KiB
Raw Blame History

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-principle-of-least-action Principle of Least Action 10_Wiki/Topics verified self
Stationary Action
Hamilton's Principle
Maupertuis Principle
none A 0.9 applied
physics
variational-calculus
lagrangian
optimization
2026-05-10 pending
language framework
python jax/sympy

Principle of Least Action

매 한 줄

"매 Nature 의 action S 의 stationary 의 path 의 select". Maupertuis(1744) → Lagrange → Hamilton 의 발전 의 매 classical/quantum/field theory 의 unified backbone — 매 modern ML 의 neural ODEs / Hamiltonian networks 의 기반.

매 핵심

매 정의

  • Action: S[q] = ∫ L(q, q̇, t) dt, 매 L = T V (Lagrangian).
  • Stationary: δS = 0 (not 항상 minimum — 매 stationary point).
  • Euler-Lagrange: d/dt (∂L/∂q̇) ∂L/∂q = 0.
  • Hamiltonian: H(q,p) = p·q̇ L; 매 q̇ = ∂H/∂p, ṗ = −∂H/∂q.

매 형식

  • Lagrangian (q, q̇): 매 generalized coords 의 자연.
  • Hamiltonian (q, p): 매 phase-space 의 symplectic structure.
  • Path Integral (Feynman): 매 amplitude = ∫ Dq exp(iS/ℏ) — 매 quantum extension.

매 응용

  1. 매 classical mechanics 의 EoM 의 derive.
  2. Optical path (Fermat) — light follows least-time.
  3. Geodesics in GR (least proper-time worldline).
  4. Symplectic ODE integrators (leapfrog).
  5. Hamiltonian Neural Networks, Lagrangian NN.

💻 패턴

SymPy — symbolic Euler-Lagrange (pendulum)

import sympy as sp
t, m, g, l = sp.symbols("t m g l", positive=True)
q = sp.Function("q")(t)
T = sp.Rational(1,2) * m * (l*sp.diff(q, t))**2
V = -m*g*l*sp.cos(q)
L = T - V
EL = sp.diff(sp.diff(L, sp.diff(q,t)), t) - sp.diff(L, q)
print(sp.simplify(EL))   # m*l^2*q'' + m*g*l*sin(q) = 0

Symplectic leapfrog integrator (preserves H)

import numpy as np
def leapfrog(q, p, dHdq, dHdp, dt, n):
    for _ in range(n):
        p = p - 0.5 * dt * dHdq(q)
        q = q + dt * dHdp(p)
        p = p - 0.5 * dt * dHdq(q)
    return q, p

JAX — automatic Lagrangian → EL residual

import jax, jax.numpy as jnp
def lagrangian(q, qdot):
    return 0.5*jnp.sum(qdot**2) - potential(q)

def el_residual(q, qdot, qddot):
    dL_dq    = jax.grad(lagrangian, 0)(q, qdot)
    dL_dqdot = jax.grad(lagrangian, 1)(q, qdot)
    # d/dt(∂L/∂q̇) along trajectory:
    H = jax.hessian(lagrangian, argnums=(1,1))(q, qdot)
    d_dt = H @ qddot   # simplified for autonomous L
    return d_dt - dL_dq

Lagrangian Neural Network (Cranmer 2020)

# Parameterize L_θ(q,q̇) by an MLP; learn dynamics by enforcing EL eq.
class LNN(nn.Module):
    def __call__(self, q, qdot):
        return self.mlp(jnp.concatenate([q, qdot]))

def predicted_qddot(params, q, qdot):
    L = lambda q,qd: lnn.apply(params, q, qd)
    H_qd_qd = jax.hessian(L, 1)(q, qdot)
    grad_q  = jax.grad(L, 0)(q, qdot)
    return jnp.linalg.solve(H_qd_qd, grad_q)

Hamiltonian Neural Network

# Greydanus 2019: parameterize H_θ(q,p); use symplectic gradients.
def hnn_dynamics(params, q, p):
    H = lambda q,p: hnn.apply(params, q, p)
    return jax.grad(H, 1)(q,p), -jax.grad(H, 0)(q,p)

Geodesic integration (general metric)

# Christoffel symbols Γ from g; geodesic eq: q̈^μ + Γ^μ_αβ q̇^α q̇^β = 0

매 결정 기준

상황 Approach
매 holonomic constraints Lagrangian (gen coords)
매 phase-space analysis / chaos Hamiltonian
매 long-horizon energy preservation Symplectic integrator (leapfrog, Verlet)
매 learn dynamics from data LNN / HNN / Neural ODE
매 quantum / sum-over-paths Path integral
매 optics / wave fronts Fermat / eikonal form

기본값: 매 Lagrangian + EL → leapfrog symplectic integration.

🔗 Graph

🤖 LLM 활용

언제: 매 conservative system 의 dynamics learn / simulate — 매 long-horizon stability 의 priority. 매 physics-informed ML. 언제 X: 매 strongly dissipative / non-conservative — 매 Hamiltonian assumption 의 violate. 매 stochastic — 매 Langevin / SDE.

안티패턴

  • "Least" action 으로 misinterpret: 매 stationary, 매 not 항상 min — 매 saddle 도 valid.
  • Non-symplectic integrator + long horizon: 매 energy drift.
  • Constraints 의 ad-hoc 처리: 매 generalized coords 또는 Lagrange multipliers 의 use.
  • Time-dependent L 의 Hamiltonian 으로 conserve assume: 매 ∂L/∂t ≠ 0 → H 의 not conserved.

🧪 검증 / 중복

  • Verified (Goldstein Classical Mechanics 3e; Arnold Mathematical Methods of CM; Feynman Vol II).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — Lagrangian/Hamiltonian/symplectic + LNN/HNN modern ML link