1.1: Introduction to Differential Equations

Introductory Differential Equations · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    1.1: Introduction to Differential Equations
    Learning Objectives
    • Solve first-order differential equations using analytical techniques and verify solutions against given initial conditions.
    • Examine and interpret the role of differential equations in real-world scenarios, identifying the assumptions and implications of mathematical models.

    Differential Equations

    The laws of physics are generally written down as differential equations. Therefore, all of the science and engineering use differential equations to some degree. Understanding differential equations is essential to understanding almost anything you will study in your science and engineering classes. You can think of mathematics as the language of science, and differential equations are one of the most important parts of this language as far as science and engineering are concerned.

    You saw many differential equations already without perhaps knowing about them. You solved simple differential equations when you took calculus such as modeling the velocity and distance traveled of a free falling object. Let us see an example you may not have seen: \[\label{eq:1} \frac{dx}{dt} + x = 2 \cos t . \] Here \(x\) is the dependent variable and \(t\) is the independent variable. Equation \((1.1.1)\) is a basic example of a differential equation. It is an example of a first-order differential equation since it involves only the first derivative of the dependent variable. This equation arises from Newton’s law of cooling where the ambient temperature oscillates with time.

    Solutions of Differential Equations

    Solving the differential equation means finding \(x\) in terms of \(t\). That is, we want to find a function of \(t\), which we call \(x\), such that when we plug \(x\), \(t\), and \(\frac{dx}{dt}\) into Equation \((1.1.1)\), the equation holds; that is, the left-hand side equals the right-hand side. It is the same idea as it would be for a normal (algebraic) equation of just \(x\) and \(t\). We claim that \[x = x(t) = \cos t + \sin t \nonumber \] is a solution. How do we check? We simply plug \(x\) into Equation \((1.1.1)\)! First we need to compute \(\frac{dx}{dt}\). We find that \(\frac{dx}{dt} = -\sin t + \cos t\). Now let us compute the left-hand side of Equation \((1.1.1)\). \[\frac{dx}{dt} + x = \underbrace{(-\sin t + \cos t)}_{\frac{dx}{dt}} + \underbrace{(\cos t + \sin t)}_{x} = 2\cos t . \nonumber \] Yay! We got precisely the right-hand side. But there is more! We claim \(x = \cos t + \sin t + e^{-t}\) is also a solution. Let us try, \[\frac{dx}{dt} = -\sin t + \cos t - e^{-t} . \nonumber \] We plug into the left-hand side of Equation \((1.1.1)\) \[\frac{dx}{dt} + x = \underbrace{(-\sin t + \cos t - e^{-t})}_{\frac{dx}{dt}} + \underbrace{(\cos t + \sin t + e^{-t})}_{x} = 2\cos t . \nonumber \] And it works yet again!

    So there can be many different solutions. For this equation all solutions can be written in the form \[x = \cos t + \sin t + C e^{-t} , \nonumber \] for some constant \(C\). Different constants \(C\) will give different solutions, so there are infinitely many possible solutions. See Figure \(\PageIndex{1}\) for the graph of a few of these solutions. We will see how we find these solutions a few lectures from now.

    The graphs of three different +C solutions
    Figure \(\PageIndex{1}\): A graph displaying values of t starting from 0 and progressing every 1 to 5 in total on the x-axis and value of the solution of the function \(\frac{dx}{dt}+x=2\cos t\) range of 1 starting from -1 and progressing every 1 to 3 in total on the y-axis. Solutions of \(\frac{dx}{dt} + x=2\cos t\) is \(x = \cos t + \sin t + Ce^{-t}\): Red graph line is the value of \(x\) when \(c=-2\), Blue graph line is the value of x when \(c=0\), green graph line is the value of x when \(c=2\). (CC BY-SA 4.0; Larry Green via Introduction to Differential Equations). Alternate text description of the Figure \(\PageIndex{1}\).

    Solving differential equations can be quite hard. There is no general method that solves every differential equation. We will generally focus on how to get exact formulas for solutions of certain differential equations, but we will also spend a little bit of time on getting approximate solutions. And we will spend some time to understand the equations without solving them.

    Most of this book is dedicated to ordinary differential equations or ODEs, that is, equations with only one independent variable, where derivatives are only with respect to this one variable. If there are several independent variables, we get partial differential equations or PDEs.

    Even for ODEs, which are very well understood, it is not a simple question of turning a crank to get answers. When you can find exact solutions, they are usually preferable to approximate solutions. It is important to understand how such solutions are found. Although in real applications you will leave much of the actual calculations to computers, you need to understand what they are doing. It is often necessary to simplify or transform your equations into something that a computer can understand and solve. You may even need to make certain assumptions and changes in your model to achieve this.

    To be a successful engineer or scientist, you will be required to solve problems in your job that you never saw before. It is important to learn problem-solving techniques, so that you may apply those techniques to new problems. A common mistake is to expect to learn some prescription for solving all the problems you will encounter in your later career. This course is no exception.

    Differential Equations in Practice

    Real World to math model via abstract to math solution via solve back to real world
    Figure \(\PageIndex{2}\): A flowchart illustrating the process of applying differential equations to real-world problems, involving abstraction, modeling, solving, and interpretation. (CC BY-SA 4.0; Larry Green via Introduction to Differential Equations)

    So how do we use differential equations in science and engineering? First, we have some real-world problem we wish to understand. We make some simplifying assumptions and create a mathematical model. That is, we translate the real-world situation into a set of differential equations. Then we apply mathematics to get some sort of a mathematical solution. There is still something left to do. We have to interpret the results. We have to figure out what the mathematical solution says about the real-world problem we started with.

    Learning how to formulate the mathematical model and how to interpret the results is what your physics and engineering classes do. In this course, we will focus mostly on the mathematical analysis. Sometimes we will work with simple real-world examples so that we have some intuition and motivation about what we are doing.

    Let us look at an example of this process. One of the most basic differential equations is the standard exponential growth model. Let \(P\) denote the population of some bacteria on a Petri dish. We assume that there is enough food and enough space. Then the rate of growth of bacteria is proportional to the population—a large population grows quicker. Let \(t\) denote time (say in seconds) and \(P\) the population. Our model is \[\frac{dP}{dt} = kP , \nonumber \] for some positive constant \(k > 0\).

    Example \(\PageIndex{1}\)

    Suppose there are \(100\) bacteria at time \(0\) and \(200\) bacteria \(10\) seconds later. How many bacteria will there be \(1\) minute from time \(0\) (in \(60\) seconds)?


    A graph displaying the exponential function. Details in caption.

    Figure \(\PageIndex{3}\): A graph displaying time in seconds with a range of 60 seconds starting from 0 and progressing every 10 to 60 in total on the x-axis and number of bacteria with a range of 1000 bacteria starting from 0 and progressing every 1000 to 6000 in total on the y-axis. The curve shows a steady growth of bacteria. (CC BY-SA 4.0; Larry Green via Introduction to Differential Equations)
    Solution

    First we need to solve the equation. We claim that a solution is given by \[P(t) = C e^{kt} , \nonumber \] where \(C\) is a constant. Let us try: \[\frac{dP}{dt} = C k e^{kt} = k P . \nonumber \] And it really is a solution.

    OK, now what? We do not know \(C\), and we do not know \(k\). But we know something. We know \(P(0) = 100\), and we know \(P(10) = 200\). Let us plug these conditions in and see what happens. \[\begin{align}\begin{aligned} & 100 = P(0) = C e^{k0} = C ,\\ & 200 = P(10) = 100 \, e^{k10} .\end{aligned}\end{align} \nonumber \] Therefore, \(2 = e^{10k}\) or \(\frac{\ln 2}{10} = k \approx 0.069\). So \[P(t) = 100 \, e^{(\ln 2) t / 10} \approx 100 \, e^{0.069 t} . \nonumber \] At one minute, \(t=60\), the population is \(P(60) = 6400\). See Figure \(\PageIndex{3}\).

    Let us talk about the interpretation of the results. Does our solution mean that there must be exactly \(6400\) bacteria on the plate at \(60\text{s}\)? No! We made assumptions that might not be true exactly, just approximately. If our assumptions are reasonable, then there will be approximately \(6400\) bacteria. Also, in real life \(P\) is a discrete quantity, not a real number. However, our model has no problem saying that for example at \(61\) seconds, \(P(61) \approx 6859.35\).

    Normally, the \(k\) in \(P' = kP\) is known, and we want to solve the equation for different initial conditions. What does that mean? Take \(k=1\) for simplicity. Suppose we want to solve the equation \(\frac{dP}{dt} = P\) subject to \(P(0) = 1000\) (the initial condition). Then the solution turns out to be \[P(t) = 1000 \, e^t . \nonumber \]

    We call \(P(t) = C e^t\) the general solution, as every solution of the equation can be written in this form for some constant \(C\). We need an initial condition to find out what \(C\) is, in order to find the particular solution we are looking for. Generally, when we say "particular solution," we just mean some solution.

    1. Verify that the function \( y=x^2 +\frac {c}{x^2} \) is a solution to the differential equation \[ xy' + 2y = 4x^2\quad (x>0)\nonumber\]
    2. Find the value of C for which the solution satisfies the initial condition \(y(5) = 8\)
    Solution
    • Video Length: 4 minutes 12 seconds
    • Context: verify a solution to a particular differential equation, find a particular solution.

    Fundamental Equations

    A few equations appear often and it is useful to just memorize what their solutions are. Let us call them the four fundamental equations. Their solutions are reasonably easy to guess by recalling the properties of exponential, sines, and cosines functions. They are also simple to check, which is something that you should always do. No need to wonder if you remembered the solution correctly.

    First such equation is \[\frac{dy}{dx} = k y , \nonumber \] for some constant \(k > 0\). Here \(y\) is the dependent and \(x\) the independent variable. The general solution for this equation is \[y(x) = C e^{kx} . \nonumber \] We saw above that this function is a solution, although we used different variable names.

    Next, \[\frac{dy}{dx} = -k y , \nonumber \] for some constant \(k > 0\). The general solution for this equation is \[y(x) = C e^{-kx} . \nonumber \]

    Exercise \(\PageIndex{1}\)

    Check that the \(y\) given is really a solution to the equation.

    Next, take the second order differential equation \[\frac{d^2y}{{dx}^2} = -k^2 y , \nonumber \] for some constant \(k > 0\). The general solution for this equation is \[y(x) = C_1 \cos(kx) + C_2 \sin(kx) . \nonumber \] Since the equation is a second-order differential equation, we have two constants in our general solution.

    Exercise \(\PageIndex{2}\)

    Check that the \(y\) given is really a solution to the equation.

    Finally, consider the second order differential equation \[\frac{d^2y}{{dx}^2} = k^2 y , \nonumber \] for some constant \(k > 0\). The general solution for this equation is \[y(x) = C_1 e^{kx} + C_2 e^{-kx} , \nonumber \] or \[y(x) = D_1 \cosh(kx) + D_2 \sinh(kx) . \nonumber \]

    For those that do not know, \(\cosh\) and \(\sinh\) are defined by \[\cosh x = \frac{e^{x} + e^{-x}}{2} , \qquad \sinh x = \frac{e^{x} - e^{-x}}{2} . \nonumber \] They are called the hyperbolic cosine and hyperbolic sine. These functions are sometimes easier to work with than exponentials. They have some nice familiar properties such as \(\cosh 0 = 1\), \(\sinh 0 = 0\), and \(\frac{d}{dx} \cosh x = \sinh x\) (no that is not a typo) and \(\frac{d}{dx} \sinh x = \cosh x\).

    Exercise \(\PageIndex{3}\)

    Check that both forms of the \(y\) given are the real solutions to the equation.

    In equations of higher order, you get more constants you must solve for to get a particular solution. The equation \(\frac{d^2y}{dx^2} = 0\) has the general solution \(y = C_1 x + C_2\); simply integrate twice and don’t forget about the constant of integration. Consider the initial conditions \(y(0) = 2\) and \(y'(0) = 3\). We plug in our general solution and solve for the constants: \[2 = y(0) = C_1 \cdot 0 + C_2 = C_2, \qquad 3 = y'(0) = C_1 . \nonumber \] In other words, \(y = 3x + 2\) is the particular solution we seek.

    An interesting note about \(\cosh\): The graph of \(\cosh\) is the exact shape of a hanging chain. This shape is called a catenary. Contrary to popular belief this is not a parabola. If you invert the graph of \(\cosh\), it is also the ideal arch for supporting its weight. For example, the gateway arch in Saint Louis is an inverted graph of \(\cosh\)—if it were just a parabola it might fall. The formula used in the design is inscribed inside the arch:

    \(y=-127.7 \cosh{\left(\dfrac{x}{127.7} \right)}+757.7\) ft


    This page titled 1.1: Introduction to Differential Equations was last modified on Fri, 02 Oct 2026 21:21:14 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Vinh Kha Nguyen, Neelam R. Shukla, and Fatemeh Yarahmadi.