{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $I$ be an open interval, let $p, q : I \\to \\mathbb{R}$ be continuous, let $x_0 \\in I$ and let $y_0 \\in \\mathbb{R}$.\nLet $P(x) = \\int_{x_0}^{x} p(s)\\, ds$ for $x \\in I$.\nThen the [[initial value problem|075VBY4K4X]] $y' + p(x)\\, y = q(x)$, $y(x_0) = y_0$ has exactly one solution on $I$, and it is\n$$y(x) = e^{-P(x)} \\left( y_0 + \\int_{x_0}^{x} e^{P(s)}\\, q(s)\\, ds \\right), \\qquad x \\in I.$$\n\n## Remarks\n\nProof idea: $\\mu = e^{P}$ is an [[integrating factor|01THH3Y3YP]], so a solution satisfies $(\\mu y)' = \\mu q$. Integrate from $x_0$ to $x$ and use $\\mu(x_0) = 1$.\nThe solution exists on all of $I$. A linear equation has no solution that blows up inside the interval of continuity of $p$ and $q$.\nExample: for $y' + y = 1$, $y(0) = 0$, the formula gives $y(x) = 1 - e^{-x}$.\n\n## Explanations\n\n### L1 human\n\nThe formula has two parts.\nThe term $y_0 e^{-P(x)}$ is the solution of the equation without the right side $q$.\nThe integral term adds the effect of $q$, collected over the time from $x_0$ to $x$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "kind": "statement",
    "msc": [
      "34A30"
    ],
    "name": "Solution formula for linear first-order equations",
    "role": "theorem",
    "sources": [
      {
        "locator": "Solving first order linear ordinary differential equations",
        "url": "https://en.wikipedia.org/wiki/Integrating_factor"
      },
      {
        "locator": "First-order equation with variable coefficients",
        "url": "https://en.wikipedia.org/wiki/Linear_differential_equation"
      }
    ],
    "tag": "06B9W45XV0",
    "uses": [
      "0Z3YKRQZ48",
      "01THH3Y3YP",
      "075VBY4K4X"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/06B9W45XV0/",
  "links": [
    {
      "field": "uses",
      "target": "0Z3YKRQZ48"
    },
    {
      "field": "uses",
      "target": "01THH3Y3YP"
    },
    {
      "field": "uses",
      "target": "075VBY4K4X"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/06B9W45XV0.md",
  "msc": [
    "34A30"
  ],
  "name": "Solution formula for linear first-order equations",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/06B/06B9W45XV0.md",
  "status": null,
  "tag": "06B9W45XV0",
  "uri": "m2://06B9W45XV0",
  "url": "https://math2.tamnd.com/wiki/solution-formula-for-linear-first-order-equations/",
  "writing": {
    "tag": "06B9W45XV0",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
