Skip to content

Instantly share code, notes, and snippets.

@dellsystem
Last active December 10, 2015 22:48
Show Gist options
  • Save dellsystem/4504421 to your computer and use it in GitHub Desktop.
Save dellsystem/4504421 to your computer and use it in GitHub Desktop.
MATH 325 lecture notes for Thursday, January 10. What is wikinotes?

Notes for lecture #2. In this lecture: some definitions and notation, and introduction to solving first-order linear ODEs.

Under construction.

[TOC]

Definitions and notations

Basic ODE notation

$n$^th^ order ODE: an ODE in which the highest derivative is $n$ ($y^{(n)}$).

In this course, we will consider ODEs which can be written in the form

$$y^{(n)} = f(x, y, y', \ldots, y^{(n-1)}$$

The solution, $y(x)$ or simply $y$ for brevity, will be a function of the independent variable $x$. Often, we'll use the equivalent form

$$F(x, y, y', \ldots, y^{(n)} = 0$$

instead.

Example: $0 = F(x, y, y') = (y')^2 + (3y') - 4y$. We can't really write this in the form y^{(n)} = f(x, y, y', \ldots, y^{(n-1)}; even if we used the quadratic formula, we would have $\pm \sqrt{9+16y}$ which we can't really simplify, so we might as well leave that in its original form.

Automonous ODEs

An autonomous ODE is one that does not depend on $x$. So we can write it in the form y^{(n)} = f(y, y', \ldots, y^{(n-1)}.

Examples:

  • $\ddot \theta + w^2 \sin \theta = 0$ (where the independent variable, $t$, is not mentioned, and the solution is expressed as the function $\theta(t)$) is clearly autonomous. In fact, this is the non-linear pendulum equation.
  • $\ddot \theta + k\dot \theta + w^2 \sin \theta = A\sin(\mu t)$ is not autonomous. This is the damped-force pendulum equation. "Non-autonomous equations are a nightmare", says the professor.

Linear ODEs

A linear ODE is one where $y^{(n)}$ is a linear combination of the other derivatives. Specifically, we write

$$\sum_{i=0}^n a_i(x) y^{(i)} (x) = g(x)$$

(where $y^{(0)}$ is really just $y$). Example:$\ddot \theta + w^2 \sin \theta = 0$ from above, where $w$ is a constant.

Homogeneous linear ODEs

A linear ODE is *homogeneous if the function $g(x)$ (the one that only involves the independent variable $x$) is 0. Otherwise, it's non-homogeneous.

For higher-order ODEs, homogeneous equations are often easier to solve, and we will make use of the solutions of particular homogeneous equations to solve the non-homogeneous equation.

Constant-coefficient ODEs

A linear ODE is constant-coefficient if $a_i(x)$ is a constant function (if $x$ does not appear anywhere in it) for every $i$. Constant-coefficient homogeneous linear equations are easy to solve; others are comparatively more difficult.

A linear ODE is autonomous if it is constant-coefficient and $g(x)$ is a constant function (this includes the case where the equation is homogeneous).

Examples:

  • $\ddot \theta + w^2 \theta = 0$ is linear, homogeneous, autonomous, and constant-coefficient
  • $\ddot \theta + w^2 \theta = A\sin(\mu t)$ is linear, non-homogeneous, non-autonomous, and constant-coefficient
  • $y'' = 1$ is linear, non-homogeneous, autonomous, and constant-coefficient
  • $x^2y'' + 2xy' + y = \sin x$ is linear, non-homogeneous, variable-coefficient (as opposed to constant-coefficient)

Finding solutions

(To $y^{(n)} = f(x, y, y', \ldots, y^{(n-1)}$.)

The solution will be $y=f(x)$, which should be a function defined on some interval $I \subset \mathbb R$, and which must have $n$ continuous derivatives. An $n$^th^ order ODE can be written as a system of first-order ODEs, as follows: let $u_1 = y$, $u_2 = y'$, $\ldots$, $u_n = y^{(n-1)}$. The equations in this system would then be $u_1' = u_2$, $u_2' = u_3$, $\ldots$, $u_n' = f(x, u_1, u_2, \ldots, u_n)$. So to solve an $n$^th^ order ODE, we can turn it into a system of $n$ equations, then use vectors and matrices somehow to solve it (take MATH 317 if you want to learn more).

Note that the converse is not true - not every system of $n$ first-order ODEs can be written as a single $n$th order equation.

Example: $\ddot \theta + w^2 \sin\theta = A\sin(\mu t)$. The variables are $u_1 = \theta$, $u_2 = \dot \theta$, so the equations are $\dot u_1 = u_2$ and $\dot u_2 = A\sin(\mu t) - w^2\sin (\mu)$.

Initial value problems

We know that when we are given ODEs without constraints, the resulting solutions will be non-unique. If we want unique solutions to the ODE $y^{(n)} = f(x, y, y', \ldots, y^{(n-1)}$ on $I \subset \mathbb R$, we'll have to provide initial values (hence the term initial value problems). Given a point $x_0 \in I$, we'll need to value $y^{(n)}(x_0) = f(x_0, y(x_0), \ldots, y^{(n-1)}(x_0))$. So we'll need to know, at least, $y^{(i)}(x_0)$ for all $i$. In fact, this is sufficient to specify a unique solution, provided $x_0$ is not a "singular point" (we'll learn more about that later on in the course). We can then turn this into a system of first-order equations in the usual way.

First-order linear ODEs

First-order equations are the only ones for which we can solve both linear and non-linear equations easily. We can write non-linear first-order equations in the general form $y' = f(t, y)$ (where $t$ is the independent variable), and linear equations can be written as $a_0(t)y(t) + a_1(t)y'(t) = g(t)$.

First-order homogeneous linear ODEs

These are of the form

$$y' + p(t)y = 0$$

where $\displaystyle p(t) = \frac{a_0(t)}{a_1(t)}$ and $g(t) = 0$, assuming that $a_1(t) \neq 0$. (If it is 0, then we just have $y(t) = g(t)/a_0(t)$ which is barely even an ODE.)

Here's how we can solve this. We rearrange the equation such that $p(t)y$ is on the other side, and then divide both sides by $y$, resulting in:

$$\frac{y'}{y} = -p(t)$$

(Of course, this assumes that $y \neq 0$. We'll deal with the case where $y(t) = 0$ later; in any case, it's pretty trivial.)

Next, we integrate both sides with respect to $t$:

$$\int\frac{y'}{y} ,dt = -\int p(t) ,dt$$

So then we get $\ln |y| = -\int p(t) ,dt + C$ (the constant has been moved over). Then we take the exp of both sides:

$$|y| = e^c e^{-\int p(t),dt)}$$

so $y = \pm e^c e^{-\int p(t),dt} = ke^{-\int p(t),dt}$ because $k = \pm e^c$ covers everything except for $k=0$, but that is covered by the case where $y=0$. So basically it works. Pretty cool.

Non-homogeneous first-order linear ODEs

$$y'+p(t)y = g(t)$$

How do we solve this???? Assuming that $p(t)$ and $g(t)$ are continuous, the general solution is

$$y(t) = \frac{1}{\mu(t)} \int \mu (t) g(t) ,dt + \frac{k}{\mu (t)}$$

where $k$ is an arbitrary constant and $\mu (t) = e^{\int p(t),dt}$ is an integrating factor. It's quite a bit to memorise, so don't memorise the solution; just memorise $\mu (t)$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment