# DE Tutorial - Chapter 1: The Basics of Ordinary Differential Equations

Status
Not open for further replies.

#### Chris L T521

##### Well-known member
Staff member
Hello everybody! This is the first post for the differential equations tutorial. Unlike the one on MHF, I've decided to take this project a little more seriously and have taken on the task of making a book based on these posts (well, it's really the other way around - the posts will be the contents of the book with the exception of exercises that will be included at the end of each chapter/section).

For each chapter, a thread will be made and for each section, a post will be made. So for example, subsequent posts made in this thread will be material from the first chapter. Attached to each post will be the entire [updated] book as a .pdf (all nicely TeXed up and everything) so you can download it and have it for easy access.

I would also like to extend my thanks to Adrian for revising what I'm about to post and [hopefully] what I'll be posting in the future. In addition, I would also like to thank Fantini for volunteering to help revise future posts I make in this tutorial.

With all that said, let's get this thing started.

--------------------

Section 1: What Is a Differential Equation?

What is a differential equation? The adjective "differential'' seems to suggest that we will be dealing with derivatives...but derivatives of what? It turns out that a differential equation relates an unknown function with its derivatives. For a more formal definition, let us consider the following:

--

Definition 1.1: Let $f$ be a function. Let $x:\mathbb{R}\rightarrow\mathbb{R}$ be an unknown differentiable function in variable $t\in\mathbb{R}$, and let $x^{\prime}(t),x^{\prime\prime}(t),\ldots,x^{(n)}(t)$ denote the derivatives of $x(t)$. Then the equation
$f(t,x,x^{\prime},x^{\prime\prime},\ldots,x^{(n)}) = 0\qquad\qquad(1.1)$
is called a ordinary differential equation (which we will abbreviate as ODE). We define the order of a differential equation to be the highest order derivative it contains.

--

Definition 1.2: Let $u:\mathbb{R}^{n}\to\mathbb{R}$ be an unknown differentiable function of the multiple independent variables $x_{1},\dots,x_{n}$. Then the equation
$F\left(u,x_{1},\dots,x_{n},\frac{\partial u}{\partial x_{1}},\dots,\frac{\partial u}{\partial x_{n}},\frac{\partial^{2}u}{\partial x_{1}\partial x_{1}},\dots,\frac{\partial^{2}u}{\partial x_{1}\partial x_{n}},\dots\right)=0\qquad\qquad(1.2)$
is called a partial differential equation (which we will abbreviate as PDE). Again, the order of the partial differential equation is the order of the highest derivative appearing in the partial differential equation.

--

By the above definition, (1.1) would be an $n$-th order ODE since $x^{(n)}(t)$ is the highest order derivative of $x(t)$. Likewise, (1.2) would be an $n$-th order PDE. ODEs and PDEs are the two most common types of differential equations. Both types of differential equations are useful in their own ways, but we will focus only on ODEs for the time being (the first part of this book/tutorial will be on ODEs only; part 2 will cover topics in PDEs).

Within each of these main classes, we can further categorize a differential equation by determining whether or not an ODE or PDE is linear or non-linear. An ODE is said to be linear if the function $f$ is a linear function in $x(t)$ and its derivatives. A function $f:\mathbb{R}\to\mathbb{R}$ is linear if for all $c,x,y\in\mathbb{R}$, it is true that $f(x+y)=f(x)+f(y)$ and $f(cx)=cf(x)$. A linear ODE can be written as
$a_{n}(t)\,x^{(n)}+a_{n-1}(t)\,x^{(n-1)}+\dots+a_{1}(t)\,x'+a_{0}(t)\,x=g(t).\qquad \qquad(1.3)$
A PDE is linear if the function $F$ is a linear function of $u$ and all its derivatives.

Otherwise, the ODE or PDE is said to be non-linear. To get a better understanding of what this means, let's look at a few examples.

--

Example 1.1 (Harmonic Oscillator): The differential equation
$\frac{d^2x}{dt^2}+\omega^2x = 0\qquad\qquad(1.4)$
is a second order linear ODE. This models the motion of a spring mass system without any damping factors.

--

Example 1.2 (Two-dimensional Wave Equation): The differential equation
$\frac{\partial^2 u}{\partial t^2} = c^2\left(\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}\right)\qquad\qquad(1.5)$
is a second order linear PDE. This models the vibration of a membrane.

--

Example 1.3 (Navier-Stokes Equations): The differential equation
$\rho\left(\frac{\partial\mathbf{v}}{\partial t}+\mathbf{v}\cdot\nabla\mathbf{v}\right) = -\nabla p + \mu\nabla^2 + \mathbf{f}\qquad\qquad(1.6)$
is a second order non-linear PDE. It's second order due to the fact that
$\nabla^2 = \nabla\cdot\nabla = \sum_{i=1}^n\frac{\partial^{2}}{\partial x_i^2}$
in $\mathbb{R}^n$. This is the Navier-Stokes equation for an incompressible fluid, and is the subject of one of the seven Millennium Prize Problems proposed by the Clay Mathematics Institute.

--

Example 1.4 (Motion of a Pendulum): The differential equation
$\frac{d^2u}{dt^2}+\frac{g}{L}\sin(u) = 0\qquad\qquad(1.7)$
is a second order non-linear ODE. This models the motion of a pendulum with length $L$.

--

Now that we have a better understanding for what a differential equation is, we should now discuss a special type of ODE or PDE -- the initial value problem.

--

Definition 1.3 (Initial Value Problem): An initial value problem (abbreviated as IVP) is a differential equation coupled with an initial condition $f(x_0)=y_0$, where $f$ is the solution of our ODE (or PDE) with $x_0\in\mathbb{R}^n$ and $y_0\in\mathbb{R}$.

--

The thing that makes an IVP different from the general ODE or PDE is that a solution of the IVP is said to be a particular solution (i.e., the solution contains no arbitrary constants that may arise from techniques needed to solve the equation). A solution of an ODE or PDE (given that one exists to begin with) with no initial conditions is called a general solution. For example, if we have the differential equation
$\frac{dy}{dx}+y=x,\qquad\qquad(1.8)$

it's general solution is $y(x)=x-1+Ce^{-x}$. However, if we couple it with the initial condition $y(0)=0$, we then end up with the particular solution $y(x) = x-1+e^{-x}$. For various initial conditions, however, the solution to an ODE or PDE may or may not exist! This leads into the next important topic -- existence and uniqueness of solutions to differential equations. For now, we will restrict ourselves to the case of first order ODEs. We will state the theorem on existence and uniqueness of solutions, but will continue the discussion of existence and uniqueness in the next section, once we have a means for solving simple ODEs.

--

Theorem 1.1 (Existence and Uniqueness of Solutions): Let $f:\mathbb{R}^2\rightarrow\mathbb{R}$ be a differentiable function with partial derivative $f_y$. Suppose that both $f(x,y)$ and $f_y(x,y)$ are continuous on some rectangle $R\subset\mathbb{R}^2$ such that for some $(a,b)\in\mathbb{R}^2$, we have $(a,b)\in R$. Then, for some open interval $I$ containing the point $a$, the IVP
$\frac{dy}{dx} = f(x,y),\quad y(a) = b\qquad\qquad(1.9)$
has exactly one solution that is defined on the interval $I$.

--

We should now have a much better understanding for what differential equations are and what their various characteristics are. We will now start the long journey of understanding how to solve different kinds of differential equations. I hope you're ready to march forward with me!

--------------------

Stay tuned for the second post, which deals with equations of the form $\dfrac{dy}{dx} = f(x)$ (you can currently see part of it done in the file, but I plan to make changes to it...so yea).

Comments and questions should be posted here:

http://mathhelpboards.com/commentar...ics-ordinary-differential-equations-4233.html

#### Attachments

• 165 KB Views: 43
Last edited by a moderator:

#### Chris L T521

##### Well-known member
Staff member
With this post, the Differential Equations tutorial is back with a vengeance!

I can't believe it's been about a year and a half now since I made the first post...anyways, I'm glad to present you with the following post.

You can find an updated version of the pdf file here.

I'm also interested in recruiting a couple members that would be interested in contributing to the tutorial either by helping me edit things or even assisting with writing the material for each post. Please send me a PM if you'd like to help out! .

[HR][/HR]
Section 2: ODEs of the Form $\frac{dy}{dx}=f(x)$.

In the previous section, we learned about what differential equations were. In this section, we first focus on the most basic of ODEs. First, let us consider differential equations of the form
$\frac{dy}{dx}=f(x,y)\tag{2.1}$

In the scenario where $f(x,y)$ isn't dependent on the variable $y$, we are left with the much simpler differential equation

$\frac{dy}{dx}=f(x).\tag{2.2}$

The solution to this differential equation is found by integrating both sides of $(2.1)$. The general solution would be

$y(x) = \int f(x)\,dx + C\tag{2.3}$

and thus would define a one parameter family of solutions dependent on $C$. If $(2.2)$ was coupled with the initial condition $y(x_0)=y_0$ and we defined $G(x)\equiv \int f(x)\,dx$, then the general solution would become the particular solution

$y(x) = G(x) + y_0-G(x_0).\tag{2.4}$

As we solve any ODE, we will always end up finding the general solution first. If the problem is an IVP, we then couple the general solution we found with the initial condition to find the particular solution. We now consider the following examples.

[HR][/HR]
Example 2.1: Solve the initial value problem

$\frac{dy}{dx}=2x+3,\quad y(1)=2.\tag{2.5}$

Solution: Integrating both sides of $(2.5)$ yields

$\int\frac{dy}{dx}\,dx = \int 2x+3\,dx \implies y(x)=x^2+3x+C.\tag{2.6}$

Applying the initial condition $y(1)=2$ to $(2.6)$ gives us

$2=y(1) = (1)^2+3(1)+C \implies 2=4+C \implies C=-2.\tag{2.7}$

Therefore, putting together $(2.6)$ and $(2.7)$ gives us the particular solution
$y(x)=x^2+3x-2$

[HR][/HR]
Example 2.2: Solve the differential equation

$\frac{dy}{dx}=-\frac{1}{1+x^2}\tag{2.8}$

and plot solution curves for $C=-2$ to $C=2$ in increments of $0.5$ on the same graph.

Solution: Integrating both sides of $(2.8)$ yields

$\int\frac{dy}{dx}\,dx = -\int\frac{1}{1+x^2}\,dx \implies y(x) = -\arctan(x) + C$

The solution curves for $C=-2$ to $C=2$ in increments of $0.5$ can be found in Figure 1.

[HR][/HR]

It turns out that we can solve second order equations of the form

$\frac{d^2y}{dx^2}=f(x)\tag{2.9}$

or initial value problems of the form

$\frac{d^2y}{dx^2}=f(x),\quad y(x_0)=y_0,\,y^{\prime}(x_0)=y_0^{\prime}\tag{2.10}$

in a similar fashion. Let us consider the substitution $t(x)=\dfrac{dy}{dx}$. We now observe that $\dfrac{dt}{dx}=\dfrac{d^2y}{dx^2}$ and thus we can rewrite $(2.9)$ as a coupled system (this will be elaborated more upon in Chapter [thread] 6)

\left\{\begin{aligned} \frac{dy}{dx} &= t(x)\\ \frac{dt}{dx} &= f(x). \end{aligned}\right. \tag{2.11}

Similarly, we can rewrite $(2.10)$ as the coupled IVP

\left\{\begin{aligned} \frac{dy}{dx} &= t(x)\\ \frac{dt}{dx} &= f(x). \end{aligned}\right.,\qquad y(x_0)=y_0,\,t(x_0)=y_0^{\prime}\tag{2.12}

Let $F(x)$ denote the anti-derivative of $f(x)$, i.e.

$F(x)=\int f(x)\,dx.$

To solve $(2.11)$, we first solve the second equation by integrating both sides. This yields the solution

$\int\frac{dt}{dx}\,dx = \int f(x)\,dx \implies t(x)=\int f(x)\,dx + C_1 = F(x)+C_1\tag{2.13}$

With this, the first equation now becomes

$\frac{dy}{dx}=F(x)+C_1\tag{2.14}$

Integrating both sides again yields

$\int\frac{dy}{dx}\,dx = \int F(x)+C_1\,dx \implies y(x)= \int F(x)\,dx + C_1x + C_2\tag{2.15}$

which is the solution to $(2.11)$. To solve $(2.12)$, apply the initial conditions $t(x_0)=y_0^{\prime}$ to $(2.13)$ and $y(x_0)=y_0$ to $(2.15)$.

You may now be wondering why I mentioned systems so early in this text; the short response is that I thought it would be a nice way of rewriting a simplistic second order equation as two first order equations which we already know how to solve (hopefully). In fact, I wouldn't recommend doing it this way, but instead doing it in a nicer, slicker way (its pretty much the same idea, except you don't have to rewrite the second order ODE as a coupled system of first order ODES). With all of that said, we now summarize the process of solving equations of the forms seen in $(2.9)$ or $(2.10)$:

Summary

Step 1: Integrate both sides of the differential equation to obtain

$\int\frac{d^2y}{dx^2}\,dx = \int f(x)\,dx \implies \frac{dy}{dx} = \int f(x)\,dx + C_1 = F(x)+C_1 \tag{2.16}$

At this time, you would apply the appropriate initial condition (if given) to find $C_1$.

Step 2: Integrate both sides again to obtain

$\int\frac{dy}{dx}\,dx = \int F(x)+C_1\,dx \implies y(x)=\int F(x)\,dx + C_1x + C_2 \tag{2.17}$

At this time, you would apply the appropriate initial condition (if given) to find $C_2$. Thus, you have found either the general solution to $(2.9)$ or the particular solution to $(2.10)$

[HR][/HR]
Let us now apply this process of solving second order ODEs to problems related to the motion of a particle. Let $x=f(t)$ denote the position of our particle at some time $t$. Then the velocity of this particle is defined to be

$v(t) = f^{\prime}(t)\quad\text{ or } \quad v(t)=\frac{dx}{dt}.\tag{2.18}$

It's acceleration is given by

$a(t) = v^{\prime}(t)\quad\text{ or } \quad a(t)=\frac{dv}{dt}=\frac{d^2x}{dt^2} \tag{2.19}$

Recall from physics that if $F(t)$ is a force that acts on a particle $x(t)$ and is directed along its line of motion, then Newton's Second Law says that
$F(t)=ma(t),\text{commonly written as } F=ma$
where $m$ is a constant mass. If the force $F(t)$ is known, we can rewrite Newton's Second Law as

$F(t)=ma(t)\implies m\frac{d^2x}{dt^2}=F(t)\implies \frac{d^2x}{dt^2}=\frac{F(t)}{m}\tag{2.20}$

Integrating $(2.20)$ twice will give us the position of the particle $x(t)$ which is dependent on two arbitrary constants. These arbitrary constants are usually determined by applying the initial conditions $x(0)=x_0$ (called initial position) and $v(0)=v_0$ (called initial velocity). Suppose for the time being that the force $F(t)$ is constant. Then $a(t)=F(t)/m$ is clearly a constant. Consider the equation

$\frac{dv}{dt}=a\quad (\text{a constant})\tag{2.21}$

Integrating both sides yields

$v(t)=at+C_1\tag{2.22}$

Applying the initial condition $v(0)=v_0$ to $(2.22)$ gives us $C_1=v_0$. Thus, we have that

$v(t)=at+v_0\tag{2.23}$

Integrating again gives us

$x(t)=\int at+v_0\,dt = \tfrac{1}{2}at^2+v_0t+C_2\tag{2.24}$

Applying the initial condition $x(0)=x_0$ to $(2.24)$ gives us $C_2=x_0$. Thus, we have that

$x(t) = \tfrac{1}{2}at^2+v_0t+x_0\tag{2.25}$

which is a familiar equation of motion; in particular, if we let $a=-g$ in $(2.25)$, we get the equation

$x(t)=-\tfrac{1}{2}gt^2+v_0t+x_0\tag{2.26}$

which is the equation of motion of a free falling mass. Let us now look at an example word problem.

[HR][/HR]
Example 2.3: A bomb is dropped from a helicopter hovering at an altitude of 800 feet above the ground. From the ground directly beneath the helicopter, a projectile is fired straight upward toward the bomb, exactly 2 seconds after the bomb is released. With what initial velocity should the projectile be fired, in order to hit the bomb at an altitude of exactly 400 feet?

Solution: Let $x_1(t)$ denote the position of the bomb at time $t$ and let $x_2(s)$ denote the position of the projectile. Here, we let $t=s+2$ to make up for the fact that the projectile was shot 2 seconds after the bomb was dropped. Since the bomb was dropped from an altitude of 800 feet with no initial velocity and falls under the influence of gravity, we have that
$x_1(t)=800-16t^2$
We now find the time $t$ it takes to reach the bomb:
\begin{aligned} 800-16t^2 &= 400\implies 16t^2=400\\ &\implies t^2=25 \\ &\implies t=5\text{ s}\end{aligned}
Likewise, the projectile is fired up at the bomb from the ground with some initial velocity $v_0$. It's equation of motion is given by
$x_2(s) = v_0s - 16s^2$
Since the bomb is 400 ft above the surface when $t=5$, we must have the projectile reach the bomb in $s=t-2=3$ seconds. Therefore, to find the initial velocity with which we should fire the projectile, we solve $x_2(3)=400$ for $v_0$:
\begin{aligned} 3v_0-16(3)^2 = 400 &\implies 3v_0 = 544 \\ &\implies v_0 = \frac{544}{3}\text{ ft/s} \approx 181.33\text{ ft/s}\end{aligned}
Therefore, in order to intercept the bomb at 400 feet, the projectile must be launched with an initial velocity of about 181.33 ft/s.

[HR][/HR]
And with that, this wraps up what I intended to cover in this post (it's getting rather long too, so this is a good place to stop for now).

I'm still working on a blurb on Existence and Uniqueness of ODEs, so that's what the next post will be on. In terms of editing what has been posted so far, I think there may be a little overuse of tags in equations, so I'm going to work on removing some of them from any post as I see fit. I also noticed that MathJax supports references to labels in equations using \ref or \eqref, so I will incorporate that into my posts once I figure out how to properly do it with the number format I want.

I think I'm going to switch things up a little bit and maybe discuss slope fields and solution curves in the post after next, but we'll see...

Status
Not open for further replies.