Skip to main content
Mathematics LibreTexts

7.1: The Euler Method

  • Page ID
    96170
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    View tutorial on YouTube

    Although it is not always possible to find an analytical solution of Equation \ref{7.1} for \(y=\) \(y(x)\), it is always possible to determine a unique numerical solution given an initial value \(y\left(x_{0}\right)=y_{0}\), and provided \(f(x, y)\) is a well-behaved function. The differential equation Equation \ref{7.1} gives us the slope \(f\left(x_{0}, y_{0}\right)\) of the tangent line to the solution curve \(y=y(x)\) at the point \(\left(x_{0}, y_{0}\right)\). With a small step size \(\Delta x=x_{1}-x_{0}\), the initial condition \(\left(x_{0}, y_{0}\right)\) can be marched forward to \(\left(x_{1}, y_{1}\right)\) along the tangent line using Euler’s method (see Fig. 7.1)

    \[y_{1}=y_{0}+\Delta x f\left(x_{0}, y_{0}\right) \nonumber \]

    This solution \(\left(x_{1}, y_{1}\right)\) then becomes the new initial condition and is marched forward to \(\left(x_{2}, y_{2}\right)\) along a newly determined tangent line with slope given by \(f\left(x_{1}, y_{1}\right)\). For small enough \(\Delta x\), the numerical solution converges to the exact solution.

    \[y_{1}=y_{0}+\Delta x f\left(x_{0}, y_{0}\right) \nonumber \]

    Screen Shot 2022-05-29 at 8.21.59 PM.png
    Figure 7.1: The differential equation \(d y / d x=f(x, y), y\left(x_{0}\right)=y_{0}\), is integrated to \(x=x_{1}\) using the Euler method \(y_{1}=y_{0}+\Delta x f\left(x_{0}, y_{0}\right)\), with \(\Delta x=x_{1}-x_{0}\).

    This page titled 7.1: The Euler Method is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.