First-order differential equations

Exponential function open_in_new

Definition (exponential function as infinite series) open_in_new

Define $$ \exp(x) = \sum_{n=0}^\infty \frac{x^n}{n!}.$$

NB Definition (exponential function)

Definition (exponential function as limit) open_in_new

Alternatively define $$ \exp(x) = \lim_{k\to\infty}\Big(1+\frac xk\Big)^k. $$

Equivalence

Proposition (derivative of exp) open_in_new

$$\frac{d}{dx}\exp(x) = \exp(x).$$

Proof

Definition (exponential function as solution to f'=f) open_in_new

Alternatively define $\exp(x)$ as the unique solution of $$ \frac{df}{dx} = f\quad\text{with } f(0) = 1.$$

Proposition (adding exponents) open_in_new

For all $z_1, z_2\in\mathbb C$, $$ \exp(z_1)\exp(z_2) = \exp(z_1+z_2). $$

Proof

Definition (Euler's number) open_in_new

Define $$ \exp(x) = e^x $$ where $$e = \exp(1) = \lim_{k\to\infty}\Big(1+\frac1k\Big)^k.$$

Definition (natural log) open_in_new

Define the natural log $\ln$ be the inverse of $\exp$.

Definition (power) open_in_new

Define for any $a,x\in\R$, $$ a^x = \exp(x\ln a). $$

First-order linear ODE open_in_new
  • Linear: $y$ and its derivative appear linearly.

  • First-order: highest derivative is $dy/dx$.

Homogenous first-order linear ODE open_in_new
  • Homogenous: all terms involve $y$ or its derivative.

Homogenous first-order linear ODE with constant coefficients open_in_new

For the equation $$ ay' + by = 0,$$ take $$ y = Ae^{\lambda x}. $$ Then we get the characteristic equation $$ a\lambda + b = 0. $$

Forced linear ODE open_in_new

General method for any linear forced ODEs:

  1. Find (guess) a particular integral $y_p(x)$ i.e. a single solution of the forced equation;

  2. Write the general solution of the ODE as $$ y(x) = y_p(x) + y_c(x). $$ Then $y_c(x)$, the complementary function, satisfies the homogenous equation.

  3. Combine $y_p$ and $y_c$ to get the general solution.

Example (constant forcing)

Example (eigenfunction forcing)

Integrating factor open_in_new

Consider the general equation $$ a(x) y' + b(x) y = c(x). $$ We usually write it in the standard form by dividing $a(x)$: $$ y' + p(x) y = f(x). $$

We let the integrating factor be $$ \mu(x) = \exp\Big(\int^x p(u)\,du\Big) $$ and our solution is $$ y(x) = \frac{1}{\mu(x)}\int^x \mu(u)f(u)\,du. $$

Derivation of integrating factor

Example using integration factor

Non-linear first-order ODE open_in_new

We consider the form $$ Q(x,y)y' + P(x,y) = 0. $$ In general this is not solvable.

Separable equation open_in_new

A first-order ODE is separable if it can be written as $$ q(y)\,dy = p(x)\,dx, $$ which can be solved by direct intergration.

Example of separable equation

Exact equation open_in_new

An ODE $P(x,y) \,dx + Q(x,y)\,dy = 0$ is exact if there exists $f(x,y)$ such that $$ df = P(x,y)\,dx + Q(x,y)\,dy. $$ Then $df=0$ so $f(x,y) =$ constant is the solution.

Therefore we need to find $f$ such that $$\begin{cases} \frac{\partial f}{\partial x} = P(x,y), \\ \frac{\partial f}{\partial y} = Q(x,y). \end{cases}$$

Condition for exact equation open_in_new

Check this condition in your head:

Note that $\frac{\partial^2 f}{\partial x\partial y} = \frac{\partial^2 f}{\partial y\partial x}$, so a necessary condition for an exact equation is $$ \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}. $$

The theorem below says this is a sufficient condition under certain domains.

Theorem (sufficient condition for exact differential in simply-connected domain) open_in_new

If $$\begin{align*} \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x} \end{align*}$$ throughout a simply connected domain $\mathcal D$, then $P\,dx + Q\,dy$ is an exact differential of single-valued $f(x,y)$ in $\mathcal D$.

Example of exact equation

Solution curves and isoclines open_in_new

Consider $y' = f(t,y)$. Each initial condition like $y(0) = y_0$ generates a distinct solution curve.

$f(t,y)$ represents the gradient of the solution curve. You can plot the slope field to visualise. You can also plot isoclines, which are curves along with $f(t,y)$ is constant.

Fixed points and stability open_in_new

Definition (fixed or equilibrium point of an ODE) open_in_new

A fixed point of an ODE $$ \frac{dy}{dt} = f(t,y) $$ is a constant solution $y=c$, i.e. $dy/dt = 0$ for all $t$.

Definition (stability of fixed point) open_in_new
  • A fixed point $y=c$ is stable if whenever $y$ deviates slightly from $c$, $y$ converges to $c$ as $t\to\infty$.

  • It is unstable if whenever $y$ deviates slightly from $c$, $y$ diverges from $c$ as $t\to\infty$.

Using perturbation to find stability of ODE open_in_new

To find out the stability of a fixed point, we consider a small perturbation of $y$ from $c$, $$ y(t) = c + \epsilon(t). $$ So $$ \frac{d\epsilon}{dt} = f(t, c+\epsilon(t)) = \underbrace{f(t, c)}_0 + \epsilon\frac{\partial f}{\partial y}\Big|_{t,c} + O(\epsilon^2). $$ Linearising the small $\epsilon$, $$ \frac{d\epsilon}{dt} \approx \epsilon\frac{\partial f}{\partial y}\Big|_{t,c}. $$ Then solve for $\epsilon$ to find out behaviour as $t\to\infty$.

Stability in autonomous systems and phase portraits open_in_new

An autonomous system has a differential equation of the form $$ \frac{dy}{dt} = f(y) $$ which does not depend on $t$.

Suppose we have a fixed point $y=c$, i.e. $f(c) = 0$. Then $$ \frac{d\epsilon}{dt} = \epsilon f'(c) + O(\epsilon^2) $$

Lectures notes say that by linearising, we have the solution $$ \epsilon(t) = \epsilon_0 e^{f'(c)t}. $$ In practice, just considering the sign of $f'(c)$, or the first non-zero derivative of $f$, is enough to determine the stability.

Hence the fixed point is

  • stable when $f'(c) < 0$;

  • unstable when $f'(c) > 0$.

A phase diagram shows the direction solutions flow as $t$ increases.

Fixed points in discrete equations open_in_new

Consider a first-order discrete equation which is independent of $n$ $$ x_{n+1} = f(x_n). $$

Definition (fixed point of a discrete equation) open_in_new

A fixed point of a first-order discrete equation is a value $x_n$ such that $$ x_{n+1} = x_n $$ i.e. $$ f(x_n) = x_n. $$

Using perturbation analysis, let $x_f$ be a fixed point and we let $$ x_n = x_f + \epsilon_n. $$ Then $$ x_f + \epsilon_{n+1} = f(x_f + \epsilon_n) = \underbrace{f(x_f)}_{x_f\text{ by fixed point}} + \epsilon_n f'(x_f) + O(\epsilon_n)^2. $$ Neglecting higher order terms, $$ \epsilon_{n+1} \approx \epsilon_n f'(x_f). $$

Therefore, a stable point is

  • stable when $|f'(x_f)| < 1$;

  • unstable when $|f'(x_f)| > 1$.