Skip to main content
Mathematics LibreTexts

3: Numerical Solutions

  • Page ID
    89122
  • \( \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}}\)

    "The laws of mathematics are not merely human inventions or creations. They simply ’are; they exist quite independently of the human intellect." - M. C. Escher (1898-1972)

    SO FAR WE HAVE SEEN SOME OF THE STANDARD METHODS for solving first and second order differential equations. However, we have had to restrict ourselves to special cases in order to get nice analytical solutions to initial value problems. While these are not the only equations for which we can get exact results, there are many cases in which exact solutions are not possible. In such cases we have to rely on approximation techniques, including the numerical solution of the equation at hand.

    The use of numerical methods to obtain approximate solutions of differential equations and systems of differential equations has been known for some time. However, with the advent of powerful computers and desktop computers, we can now solve many of these problems with relative ease. The simple ideas used to solve first order differential equations can be extended to the solutions of more complicated systems of partial differential equations, such as the large scale problems of modeling ocean dynamics, weather systems and even cosmological problems stemming from general relativity.

    • 3.1: Euler’s Method
      In this section we will look at the simplest method for solving first order equations, Euler’s Method. While it is not the most efficient method, it does provide us with a picture of how one proceeds and can be improved by introducing better techniques, which are typically covered in a numerical analysis text.
    • 3.2: Implementation of Numerical Packages
      One can use Matlab to obtain solutions and plots of solutions of differential equations. This can be done either symbolically, using dsolve, or numerically, using numerical solvers like ode45. In this section we will provide examples of using these to solve first order differential equations. We will end with the code for drawing direction fields, which are useful for looking at the general behavior of solutions of first order equations without explicitly finding the solutions.
    • 3.3: Higher Order Taylor Methods
      Euler’s method for solving differential equations is easy to understand but is not efficient in the sense that it is what is called a first order method. The error at each step, the local truncation error, is of order Δx , for x the independent variable. The accumulation of the local truncation errors results in what is called the global error. In order to generalize Euler’s Method, we need to rederive it.
    • 3.4: Runge-Kutta Methods
      In this section we will find approximations of to solutions that avoid the need for computing the derivatives.
    • 3.5: Numerical Applications
      IN THIS SECTION WE APPLY VARIOUS NUMERICAL METHODS to several physics problems after setting them up. We first describe how to work with second order equations, such as the nonlinear pendulum problem. We will see that there is a bit more to numerically solving differential equations than to just running standard routines. As we explore these problems, we will introduce other methods and provide some MATLAB code indicating how one might set up the system.
    • 3.6: Problems


    This page titled 3: Numerical Solutions is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Russell Herman via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?