{
  "aliases": null,
  "backlinks": [
    {
      "field": "about",
      "target": "ESWE8Y3JD4"
    },
    {
      "field": "uses",
      "target": "ESWE8Y3JD4"
    }
  ],
  "body": "\n## Statement\n\nLet $V \\colon \\R^d \\to \\R$ be three times continuously differentiable, put $a = -\\nabla V$, and consider the equation $x'' = a(x)$ with $x(0) = x_0$ and $x'(0) = v_0$.\nFix a step size $h \u003e 0$.\nThe leapfrog method, in its kick-drift-kick form, maps $(x_n, v_n)$ to $(x_{n+1}, v_{n+1})$ by\n$$v_{n+1/2} = v_n + \\tfrac{h}{2} a(x_n), \\qquad x_{n+1} = x_n + h\\, v_{n+1/2}, \\qquad v_{n+1} = v_{n+1/2} + \\tfrac{h}{2} a(x_{n+1}).$$\nLet $\\Phi_h \\colon \\R^{2d} \\to \\R^{2d}$ denote this map.\n\n1. $\\Phi_h$ is symplectic: it preserves the symplectic form $\\sum_{i=1}^d dx_i \\wedge dv_i$.\n2. $\\Phi_h$ is time-reversible: $\\Phi_{-h}(\\Phi_h(x, v)) = (x, v)$ for all $(x, v)$.\n3. The method has order $2$: on a bounded time interval $[0, T]$, the error $\\max_{nh \\le T} \\abs{(x_n, v_n) - (x(nh), x'(nh))}$ is $O(h^2)$ as $h \\to 0$.\n\n## Remarks\n\nThe equation is the [[Hamiltonian system|0EDKGA2FAK]] with $H(x, v) = \\frac12 \\abs{v}^2 + V(x)$.\nEach of the three substeps is the exact flow, for time $h/2$, $h$ or $h/2$, of the Hamiltonian $V(x)$ or $\\frac12\\abs{v}^2$.\nExact Hamiltonian flows are symplectic, and so is their composition, which gives clause 1.\nThe composition is symmetric, which gives clause 2, and a symmetric method has even order, which together with consistency gives clause 3.\nSo leapfrog is a [[symplectic integrator|B4C25SXFRE]], and its energy error stays bounded over very long times instead of growing.\nExample: for $a(x) = -x$ in one dimension, $\\Phi_h$ is a linear map with determinant $1$ and trace $2 - h^2$.\nFor $0 \u003c h \u003c 2$ its eigenvalues are distinct and lie on the unit circle, so all orbits stay bounded.\n\n## Explanations\n\n### L1 human\n\nPositions and velocities are updated in turn, as if they leapt over each other.\nThe velocity takes half a kick from the force, the position drifts for a full step, and the velocity takes the second half kick.\nThe method costs one force evaluation per step, and it keeps the energy of a planet or a molecule from slowly creeping away.\n\n### L2 human\n\nLeapfrog is the Störmer–Verlet method written in one-step form, and it is the standard integrator of molecular dynamics and of $N$-body simulations.\nIt is the simplest example of a splitting method: it is the Strang composition of the kinetic and potential flows.\nHigher-order symplectic methods are often built by composing leapfrog steps with well-chosen step sizes.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "B4C25SXFRE"
    ],
    "kind": "statement",
    "msc": [
      "65P10",
      "65L06",
      "37M15"
    ],
    "name": "Leapfrog integration",
    "role": "proposition",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Leapfrog_integration"
      }
    ],
    "tag": "3HGJCQBWVY",
    "uses": [
      "0EDKGA2FAK",
      "B4C25SXFRE",
      "0FXDW992DS"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/3HGJCQBWVY/",
  "links": [
    {
      "field": "about",
      "target": "B4C25SXFRE"
    },
    {
      "field": "uses",
      "target": "0EDKGA2FAK"
    },
    {
      "field": "uses",
      "target": "B4C25SXFRE"
    },
    {
      "field": "uses",
      "target": "0FXDW992DS"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/3HGJCQBWVY.md",
  "msc": [
    "65P10",
    "65L06",
    "37M15"
  ],
  "name": "Leapfrog integration",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/3HG/3HGJCQBWVY.md",
  "status": null,
  "tag": "3HGJCQBWVY",
  "uri": "m2://3HGJCQBWVY",
  "url": "https://tamnd.github.io/math2/wiki/leapfrog-integration/",
  "writing": {
    "tag": "3HGJCQBWVY",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
