{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "FWRW7BYX6T"
    },
    {
      "field": "uses",
      "target": "RHQ88QD2BE"
    },
    {
      "field": "about",
      "target": "RHQ88QD2BE"
    }
  ],
  "body": "\n## Statement\n\nLet $a \\colon \\R^d \\to \\R^d$ be twice continuously differentiable, 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 Störmer–Verlet method sets $x_1 = x_0 + h v_0 + \\frac{h^2}{2} a(x_0)$ and\n$$x_{n+1} = 2 x_n - x_{n-1} + h^2 a(x_n), \\qquad n \\ge 1.$$\n\n1. The positions $x_n$ are the same as the positions computed by the [[leapfrog method|3HGJCQBWVY]] (velocity Verlet) from $(x_0, v_0)$ with step size $h$.\n2. On a bounded interval $[0, T]$, the error $\\max_{nh \\le T} \\abs{x_n - x(nh)}$ is $O(h^2)$ as $h \\to 0$.\n\n## Remarks\n\nThe two-step formula comes from adding the Taylor expansions of $x(t + h)$ and $x(t - h)$: the odd powers cancel, and $x(t+h) - 2x(t) + x(t-h) = h^2 x''(t) + O(h^4)$.\nSo the local error is $O(h^4)$.\nIn a two-step recurrence of this kind, a local error made at one step is carried forward with a factor of size at most $O(n)$.\nSumming over $n \\le T/h$ steps gives a global error $O(h^2)$.\nFor clause 1, the leapfrog positions satisfy $x_{n+1} - x_n = h v_{n+1/2}$ and $v_{n+1/2} = v_{n-1/2} + h a(x_n)$, so $x_{n+1} - x_n = x_n - x_{n-1} + h^2 a(x_n)$, and both start from the same $x_1$.\nVelocities do not appear in the two-step form; they can be recovered by $v_n \\approx (x_{n+1} - x_{n-1}) / (2h)$, with error $O(h^2)$.\nExample: for $x'' = 0$ the recurrence gives $x_n = x_0 + n h v_0$, the exact solution.\n\n## Explanations\n\n### L1 human\n\nVerlet integration moves a particle using its last two positions and the current force.\nThe new position is the current one, plus the last displacement, plus a correction from the acceleration.\nIt is cheap, accurate to second order, and does not let energy drift away over long runs.\nThis is why it is the workhorse of molecular dynamics.\n\n### L2 human\n\nThe two-step form needs only positions, which halves the storage.\nIts drawbacks are that velocities are only implicit and that round-off is larger, because a small term $h^2 a$ is added to large positions.\nThe velocity Verlet form fixes both points and is the same method.\nIts good long-time behaviour comes from it being symmetric and symplectic.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "3HGJCQBWVY"
    ],
    "kind": "statement",
    "msc": [
      "65L06",
      "65P10",
      "70-08"
    ],
    "name": "Verlet integration",
    "role": "proposition",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Verlet_integration"
      }
    ],
    "tag": "ESWE8Y3JD4",
    "uses": [
      "0FXDW992DS",
      "3HGJCQBWVY"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/ESWE8Y3JD4/",
  "links": [
    {
      "field": "about",
      "target": "3HGJCQBWVY"
    },
    {
      "field": "uses",
      "target": "0FXDW992DS"
    },
    {
      "field": "uses",
      "target": "3HGJCQBWVY"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/ESWE8Y3JD4.md",
  "msc": [
    "65L06",
    "65P10",
    "70-08"
  ],
  "name": "Verlet integration",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/ESW/ESWE8Y3JD4.md",
  "status": null,
  "tag": "ESWE8Y3JD4",
  "uri": "m2://ESWE8Y3JD4",
  "url": "https://tamnd.github.io/math2/wiki/verlet-integration/",
  "writing": {
    "tag": "ESWE8Y3JD4",
    "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
      }
    ]
  }
}
