Skip to main content
Physics LibreTexts

2.3: Ordinary Differential Equations

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

    A differential equation is an equation that involves derivatives of a function. For example, here is a differential equation involving \(f\) and its first derivative: \[\frac{df}{dx} = f(x)\] This is called an ordinary differential equation because it involves a derivative with respect to a single variable \(x\), rather than multiple variables.

    Finding a solution for the differential equation means finding a function that satisfies the equation. There is no single method for solving differential equations. In some cases, we can guess the solution; for example, by trying different elementary functions, we can discover that the above differential equation can be solved by \[f(x) = A \exp(x).\] Certain classes of differential equation can be solved using techniques like Fourier transforms, Green’s functions, etc., some of which will be taught in this course. On the other hand, many differential equations simply have no known exact analytic solution.

    Example \(\PageIndex{1}\)

    The following differential equation describes a damped harmonic oscillator: \[\frac{d^2 x}{dt^2} + 2\gamma\frac{dx}{dt} + \omega_0^2 x(t) = 0.\] In this case, note that \(x(t)\) is the function, and \(t\) is the input variable. This is unlike our previous notation where \(x\) was the input variable, so don’t get confused! This equation is obtained by applying Newton’s second law to an object moving in one dimension subject to both a damping force and a restoring force, with \(x(t)\) representing the position as a function of time.

    Specific solutions and general solutions

    When confronted with an ordinary differential equation, the first thing you should check for is the highest derivative appearing in the equation. This is called the order of the differential equation. If the equation has order \(N\), then its general solution contains \(N\) free parameters that can be assigned any value (this is similar to the concept of integration constants, which we’ll discuss in the next chapter). Therefore, if you happen to guess a solution, but that solution does not contain \(N\) free parameters, then you know the solution isn’t the most general one.

    For example, the ordinary differential equation \[\frac{df}{dx} = f(x)\] has order one. We have previously guessed the solution \(f(x) = A \exp(x)\), which has one free parameter, \(A\). So we know our work is done: there is no solution more general than the one we found.

    A specific solution to a differential equation is a solution containing no free parameters. One way to get a specific solution is to start from a general solution, and assign actual values to each of the free parameters. In physics problems, the assigned values are commonly determined by boundary conditions. For example, you may be asked to solve a second-order differential equation given the boundary conditions \(f(0) = a\) and \(f(1) = b\); alternatively, you might be given the boundary conditions \(f(0) = c\) and \(f'(0) = d\), or any other combination of two conditions. For an ordinary differential equation of order \(N\), we need \(N\) conditions to define a specific solution.


    This page titled 2.3: Ordinary Differential Equations is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Y. D. Chong via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.