MATH1231 - Ordinary Differential Equations

Ordinary Differential Equations are equations expressed in terms of ONE independent variable and AT LEAST one of the derivatives is a function of this variable. (lolwut)

The order of an ODE is the order of the highest derivative present.

Essentially any solution to an nth order ODE is a function which when differentiated n times creates the ODT.

example:

(1)
\begin{align} y(x) = \frac{x^3}{3} + 5x + C \text{ is the general solution to } \frac{dy}{dx} = x^2 + 5 \end{align}

Initial value problems

An initial value problem (IVP) is an nth order ODE with the extra information of a set of values of the solution and its first (n-1) derivatives at some fixed point.

These values are called the initial conditions of the IVP.

Example:
Equation, y(0) = 2, dy/dx is 7 for x = 0

First order

Separable

A separable ODE is a differential equation where the two variables can be separated to have all of x on one side, all of y on the other.

These can usually be written as

(2)
\begin{align} \frac{dy}{dx} = \frac{g(x)}{h(y)} \end{align}

We solve these by writing it as $h(y)dy = g(x)dx$, then integrating to find the implicit solution $H(y) = G(x) + C$

1st Order linear

These are called linear since there are no non-linear terms of y or y’ (i.e. no sin(y), powers of y, etc)
To solve them:

1. Write them in the form:
(3)
\begin{align} \frac{dy}{dx} + f(x)y = g(x) \end{align}
1. Let h(x) (the integrating factor) be:
(4)
\begin{align} e^{\int f(x)dx} \end{align}
1. Multiply the equation by h(x):
(5)
\begin{align} h(x)\frac{dy}{dx} + h(x)f(x)y = h(x)g(x) \end{align}
1. Use the product rule of differentiation

(i.e. remembering that $h(x) = e^{\int f(x)dx}$ then h(x)y differentiates to h(x)f(x)y + h(x)d/dx (as in, uv -> u'v + uv'))
to write it as:

(6)
\begin{align} \frac{d}{dx} (h(x)y) = g(x)h(x) \end{align}

This step seems confusing and like it doesn't make sense, so I'm going to analyse it more in depth:

(7)
\begin{align} h(x)\frac{dy}{dx} + h(x)f(x)y \rightarrow \frac{d}{dx} (h(x)y) \end{align}

What's happening here is that as $h(x) = e^{\int f(x)dx}$, it differentiates to $\int f(x)dx \cdot e^{\int f(x)dx}$. Essentially, deriving $h(x)y(x) = h'(x)y(x) + h(x)y'(x)$. Which leads to $f(x)h(x)y(x) + h(x)\frac{dy}{dx}$

1. Integrate both sides and rearrange to get y on one side

Exact ODEs

Exact ODEs deal with functions of two variables.

(8)
$$F(x,y) + G(x,y)dy/dx = 0$$

If $\frac{\partial F}{\partial y} = \frac{\partial G}{\partial x}$ (i.e they have the same derivative) then this is an exact function

If the function is exact then there is a solution $H(x,y) = C$, where $F(x,y) = \frac{\partial H}{\partial x} \text{and} G(x, y) = \frac{\partial H}{\partial y}$

Or approaching from the other side, and starting , with the equation: $H(x, y) = C$

If the second order mixed partial derivatives of H are equal then $H(x, y) = C$ has solutions $F(x,y) \text{and} G(x,y)$, where they are respectively equal to $\frac{\partial H}{\partial x} \text{and} \frac{\partial H}{\partial y}$

Second Order - Linear ODEs with Constant Coefficients

Second order equations have the form of:

(9)
\begin{align} \frac{d^2 y}{dx^2} + a\frac{dy}{dx} + by = f(x) \end{align}

Homogeneous

A 2nd Order Equation is Homogeonous if f(x) = 0. i.e.

(10)
\begin{align} \frac{d^2 y}{dx^2} + a\frac{dy}{dx} + by = 0 \end{align}

or more simple

(11)
$$y'' + ay' + by = 0$$

If $y_1$ and $y_2$ are solutions to the above equation then any linear combination ($Ay_1 + By_2$) is also a solution to the equation.

The proof for the above is simple - if $y_1$ goes to 0, and $y_2$ goes to 0, then multiplying them by numbers and adding them will still end up with 0.

Characteristic Equation

The characteristic equation is:

(12)
\begin{align} \lambda^{2} e^{\lambda x} + a \lambda e^{\lambda x} + b e^{\lambda x} \\ = e^{\lambda x} ( \lambda^{2} + a \lambda + b) \\ \end{align}

Essentially what we've done so far, (but using m instead of $\lambda$) is let m2 = y'', m = y' and 1 = y. The equation $y'' + ay' + by = 0$ can now be written as $m^2 + am + b = 0$. We work out m in the next section

$\delta = b^2 - 4ac$

1. If $\delta > 0$

There are two solutions to the characteristic equation.
We take the results of m and set them as $m_1 \text{ and } m_2$, as well as setting A and B to be the factorisation of the characteristic equation (e.g. $(m - A)(m - B)$.
Hence:

(13)
$$y = Ae^{m_1x} + Be^{m_2x}$$
1. If $\delta < 0$

There are two complex solutions, of the form:

(14)
\begin{align} m = a \pm ib \end{align}

We solve these by setting $y = e^{ax}(Acos(bx) + Bsin(bx))$
If we do not know A and/or B, we work them out with initial conditions, or leave them as variables.

E.g. $y'' + 2y' + 2y = 0, y(0) = 1, y'(0) = 0$

(15)
\begin{array} {l} m^2 + 2m + 2 = 0 \\ m = \frac{-2 \pm \sqrt{4-8}}{2} \\ m = -1 \pm i \\ \text {Hence} \\ y = e^{-x}(Acos(x) + Bsin(x)) \\ y' = -e^{-x}(Acos(x) + Bsin(x) + e^{-x}(-Asin(x) + Bcos(x)) \\ y' = e^{-x}((B-A)cos(x) - (A+B)sin(x)) \\ \text {Using initial conditions we can figure out that B-A must equal 0, and also that A = 1. Hence:} \\ y = e^{-x} (cos(x) + sin(x)) \end{array}
1. If $\delta = 0$

There is one solution to the equation, such that $m = \frac{-b}{2}$
Hence

(16)
$$y = Ae^{mx} + Bxe^{mx}$$

Inhomogeneous

Inhomogeneous solutions are defined as those where f(x) != 0.

We solve these by setting $f(x) = h_x + p_x$ (homogeneous solution + polynomial solution).

Polynomial Solution

We solve this by making educated guesses:
(where p and q polynomials of the same degree)

(17)
\begin{array} f(x) & y(x) \\ p(x) & q(x) \\ p(x)e^{p(x)} & q(x)e^{q(x)} \\ p(x)cos(ax) \text { or } p(x)sin(ax) & q_1(x)cos(ax) + q_2(x)sin(ax) \\ p(x)e^{p(x)}sin(bx) \text { or } p(x)e^{p(x)}cos(bx)|& q_1(x)e^{p(x)}sin(bx) + q_2(x)e^{p(x)}cos(bx) \\ \end{array}

If the guess is a solution multiply the guess by x.
If it's still a solution multiply it again by x (i.e. by x2)

page revision: 23, last edited: 01 Nov 2011 23:00