{
  "id": "eulers-method",
  "title": "Euler's Method",
  "lang": "en",
  "source_lang": "en",
  "summary": "Euler's method is a first-order numerical procedure for approximating solutions of ordinary differential equations by advancing along locally estimated slopes.",
  "category": "mathematics",
  "subcategory": "applied",
  "type": "concept",
  "aliases": [
    "Euler method",
    "Forward Euler method",
    "Explicit Euler method"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/eulers-method/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/eulers-method/",
      "json": "https://aiwiki.page/zh/eulers-method.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Euler's method is a numerical technique for approximating the solution of an ordinary differential equation when an initial value is known. Starting from that value, it repeatedly advances a short distance using the slope prescribed by the equation at the current point. Named after Leonhard Euler, it is one of the simplest methods in numerical analysis and a basic example of a first-order, explicit, one-step integration method. Unless otherwise qualified, “Euler's method” usually means the forward Euler method, rather than the related backward Euler method."
    },
    {
      "heading": "Definition and construction",
      "text": "Consider the initial-value problem\n\n\\[y'(t)=f(t,y(t)),\\qquad y(t_0)=y_0.\\]\n\nHere \\(t\\) is the independent variable, often time, and \\(f\\) specifies the derivative of the unknown function \\(y\\). Choose a positive step size \\(h\\) and define grid points\n\n\\[t_n=t_0+nh.\\]\n\nEuler's method constructs approximations \\(y_n\\approx y(t_n)\\) through the recurrence relation\n\n\\[\\boxed{y_{n+1}=y_n+h f(t_n,y_n).}\\]\n\nThe quantity \\(f(t_n,y_n)\\) is the estimated slope at the current numerical state. Multiplying it by \\(h\\) estimates the change in \\(y\\) over the next step.\n\nThe method is:\n\n- Explicit: the next value is obtained directly from already known quantities, without solving an equation for \\(y_{n+1}\\).\n- One-step: the next value depends only on the current state and current time, not on a history of earlier numerical values.\n- First-order: under suitable regularity assumptions, its error over a fixed integration interval is proportional to \\(h\\) as \\(h\\) tends to zero.\n\nA variable grid is also possible. With \\(h_n=t_{n+1}-t_n\\), the update becomes\n\n\\[y_{n+1}=y_n+h_n f(t_n,y_n).\\]"
    },
    {
      "heading": "Geometric and analytic interpretations",
      "text": "Tangent-line approximation\n\nAt a point on the exact solution, the differential equation gives the slope of the tangent line. Euler's method follows that tangent for one step, then recomputes the slope at the new approximate point.\n\nConnecting successive numerical points by straight segments produces an Euler polygon. The polygon does not generally lie on the exact solution curve: each segment uses a slope frozen at its left endpoint, even though the true slope may change throughout the step.\n\nTaylor expansion\n\nIf the exact solution is sufficiently smooth, its Taylor expansion gives\n\n\\[y(t_n+h) = y(t_n)+h y'(t_n)+\\frac{h^2}{2}y''(t_n)+O(h^3).\\]\n\nSubstituting \\(y'(t_n)=f(t_n,y(t_n))\\) and discarding terms of degree two and higher yields Euler's update. The notation \\(O(h^p)\\), an instance of big-O notation, describes how a quantity is bounded as \\(h\\) becomes small.\n\nIntegral approximation\n\nThe fundamental theorem of calculus gives\n\n\\[y(t_{n+1})-y(t_n) = \\int_{t_n}^{t_{n+1}} f(s,y(s))\\,ds.\\]\n\nApproximating this integral by a left-endpoint rectangle gives\n\n\\[\\int_{t_n}^{t_{n+1}} f(s,y(s))\\,ds \\approx h f(t_n,y(t_n)).\\]\n\nReplacing the exact current value with the numerical approximation produces Euler's method. When \\(f\\) depends only on time, the method reduces to accumulating a left-endpoint Riemann sum."
    },
    {
      "heading": "Worked example",
      "text": "Consider\n\n\\[y'=y,\\qquad y(0)=1,\\]\n\nwhose exact solution is the exponential function \\(y(t)=e^t\\). Euler's method gives\n\n\\[y_{n+1}=(1+h)y_n,\\]\n\nso that\n\n\\[y_n=(1+h)^n.\\]\n\nFor \\(h=0.1\\), the first few values are:\n\n\\(t_n\\) | Euler approximation \\(y_n\\) | Exact value \\(e^{t_n}\\), rounded\n0.0 | 1.000000 | 1.000000\n0.1 | 1.100000 | 1.105171\n0.2 | 1.210000 | 1.221403\n0.3 | 1.331000 | 1.349859\n\nAt \\(t=1\\), ten steps give\n\n\\[y_{10}=1.1^{10}\\approx 2.593742,\\]\n\ncompared with \\(e\\approx 2.718282\\). Reducing the step size to \\(0.05\\) gives\n\n\\[y_{20}=1.05^{20}\\approx 2.653298.\\]\n\nThe error decreases by approximately a factor of two, consistent with first-order convergence. For this particular problem, the method underestimates the solution because the slope increases during each step; Euler's method does not underestimate solutions in general."
    },
    {
      "heading": "Accuracy and convergence",
      "text": "Two distinct errors are important.\n\nLocal error\n\nThe local one-step error is the error made by a single Euler step when it starts from the exact value:\n\n\\[\\delta_{n+1} = y(t_{n+1})-y(t_n)-h f(t_n,y(t_n)).\\]\n\nIf \\(y''\\) is bounded, then\n\n\\[\\delta_{n+1}=O(h^2).\\]\n\nTerminology varies: some texts call this the local truncation error, while others use that term for the normalized quantity \\(\\delta_{n+1}/h\\), which is \\(O(h)\\).\n\nGlobal error\n\nThe global error compares the computed and exact solutions after many steps:\n\n\\[e_n=y(t_n)-y_n.\\]\n\nSuppose \\(f\\) satisfies a Lipschitz condition in its second argument, with constant \\(L\\), and the exact solution has \\(\\lVert y''(t)\\rVert\\le M\\) on the interval of interest. Then\n\n\\[\\lVert e_{n+1}\\rVert \\le (1+hL)\\lVert e_n\\rVert+\\frac{M}{2}h^2.\\]\n\nStarting from an exact initial value, for \\(L>0\\) this implies\n\n\\[\\lVert e_n\\rVert \\le \\frac{Mh}{2L} \\left(e^{L(t_n-t_0)}-1\\right).\\]\n\nConsequently, on a fixed finite interval,\n\n\\[\\max_n \\lVert e_n\\rVert=O(h).\\]\n\nThe \\(O(h^2)\\) errors introduced at individual steps accumulate and propagate through approximately \\(1/h\\) steps, producing an \\(O(h)\\) global error. The bound also shows that first-order convergence alone does not guarantee a small error: the interval length and the sensitivity of the underlying equation matter."
    },
    {
      "heading": "Numerical stability",
      "text": "Numerical stability concerns how a numerical method propagates perturbations and errors. Its behavior is commonly examined using the scalar test equation\n\n\\[y'=\\lambda y,\\]\n\nwhere \\(\\lambda\\) may be a complex number. Euler's method gives\n\n\\[y_{n+1}=(1+h\\lambda)y_n.\\]\n\nThus its amplification factor is\n\n\\[R(z)=1+z,\\qquad z=h\\lambda.\\]\n\nThe region of absolute stability is\n\n\\[|1+z|\\le 1,\\]\n\nthe closed disk centered at \\(-1\\) with radius \\(1\\) in the complex plane. Strict inequality gives decay of the numerical solution.\n\nFor real \\(\\lambda<0\\), numerical decay requires\n\n\\[0<h<\\frac{2}{|\\lambda|}.\\]\n\nAt the upper boundary, the numerical solution alternates sign without decaying. Above it, the numerical solution grows in magnitude even though the exact solution decays.\n\nStiff equations\n\nA stiff differential equation contains rapidly decaying modes that can impose severe stability restrictions on explicit methods, even when the solution of interest changes slowly. Forward Euler may then require extremely small steps for stability rather than for accuracy, making it computationally inefficient.\n\nOscillatory systems\n\nFor a purely imaginary \\(\\lambda=i\\omega\\), with real nonzero \\(\\omega\\),\n\n\\[|1+ih\\omega|=\\sqrt{1+h^2\\omega^2}>1.\\]\n\nForward Euler therefore amplifies an undamped oscillatory mode for every positive step size. This makes it poorly suited to long-time simulation of conservative oscillations: apparent energy growth can be a numerical artifact rather than a property of the model."
    },
    {
      "heading": "Systems of equations and implementation",
      "text": "For a system with state vector \\(\\mathbf y(t)\\),\n\n\\[\\mathbf y'=\\mathbf f(t,\\mathbf y),\\]\n\nthe same formula applies componentwise:\n\n\\[\\mathbf y_{n+1} = \\mathbf y_n+h\\mathbf f(t_n,\\mathbf y_n).\\]\n\nHigher-order ordinary differential equations can first be rewritten as first-order systems. For example,\n\n\\[x''=g(t,x,x')\\]\n\nbecomes\n\n\\[x'=v,\\qquad v'=g(t,x,v).\\]\n\nForward Euler then updates both components from the same old state:\n\n\\[x_{n+1}=x_n+h v_n, \\qquad v_{n+1}=v_n+h g(t_n,x_n,v_n).\\]\n\nUsing the newly computed velocity in the position update would define a different scheme.\n\nFor a constant linear system \\(\\mathbf y'=A\\mathbf y\\), where \\(A\\) is a matrix,\n\n\\[\\mathbf y_{n+1}=(I+hA)\\mathbf y_n.\\]\n\nIts eigenvalues help identify step-size restrictions, although nonnormal matrices can also exhibit transient amplification that eigenvalues alone do not describe.\n\nEach Euler step requires one evaluation of \\(\\mathbf f\\). Only the current state needs to be retained unless the full trajectory is required. In floating-point arithmetic, decreasing the step size indefinitely is not guaranteed to improve results: more steps introduce more rounding operations, and very small increments may be lost when added to much larger state values."
    },
    {
      "heading": "Related methods",
      "text": "Backward Euler\n\nThe backward Euler method uses the slope at the new point:\n\n\\[y_{n+1}=y_n+h f(t_{n+1},y_{n+1}).\\]\n\nIt is implicit and generally requires solving an algebraic equation, often with Newton's method for nonlinear problems. It is also first-order, but its stability region contains the entire left half-plane, making it useful for many stiff problems.\n\nHigher-order explicit methods\n\nEuler's method is the simplest member of the Runge–Kutta family. Additional slope evaluations can improve accuracy. One example is Heun's method:\n\n\\[\\widetilde y_{n+1}=y_n+h f(t_n,y_n),\\]\n\n\\[y_{n+1} = y_n+\\frac{h}{2} \\left[ f(t_n,y_n)+f(t_{n+1},\\widetilde y_{n+1}) \\right].\\]\n\nUnder suitable smoothness assumptions, this method has second-order global accuracy. The phrase “improved Euler method” is used inconsistently, sometimes for Heun's method and sometimes for the explicit midpoint method; the update formula is therefore more precise than the informal name."
    },
    {
      "heading": "History and applications",
      "text": "Euler developed the method in his eighteenth-century work on differential equations. Its simple construction made it a foundational example in the development and teaching of numerical integration.\n\nIt remains useful for introductory computation, simple nonstiff simulations, and analysis of more elaborate algorithms. Applying forward Euler in time after a spatial finite-difference discretization is a basic approach to time-dependent partial differential equations, although spatial discretization may impose increasingly restrictive time-step limits.\n\nEuler's method also connects continuous and discrete models. Applying it to the gradient flow\n\n\\[\\mathbf x'=-\\nabla V(\\mathbf x)\\]\n\ngives\n\n\\[\\mathbf x_{n+1} = \\mathbf x_n-h\\nabla V(\\mathbf x_n),\\]\n\nwhich is gradient descent with a fixed step size. In both settings, the step size influences stability and convergence; a discrete trajectory need not preserve all qualitative properties of its continuous counterpart."
    }
  ],
  "links": [
    "ordinary-differential-equation",
    "leonhard-euler",
    "numerical-analysis",
    "initial-value-problem",
    "derivative",
    "recurrence-relation",
    "taylor-series",
    "big-o-notation",
    "fundamental-theorem-of-calculus",
    "integral",
    "riemann-sum",
    "exponential-function",
    "lipschitz-continuity",
    "numerical-stability",
    "complex-number",
    "matrix",
    "eigenvalues-and-eigenvectors",
    "floating-point-arithmetic",
    "newtons-method",
    "runge-kutta-methods",
    "finite-difference-method",
    "gradient-descent"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}