May 12th, 2020

Abstract

When I got first introduced to differential equations, I had a love-hate relationship with it. Mainly due to some back-of-the-book problems we were given and never-ending projects we were assigned to. After some time, differential equations is a way to truly understand physics and the foundations of gravity, fields, and everything. This articles is merely an intro on manually solving common forms of differential equations. Hope you enjoy

Quick notes

• $$f_x \iff \partial_x f$$

• $$A,B,C$$ are usually constants

• $$c_k$$ is usually solution’s constant that is defined with initial conditions

• Most of the functions are $$\mathbb{R}^k \to \mathbb{R}$$, $$k \in \mathbb{N}^+$$

• If you found a typo or want to comment, feel free to email me. Email on top of the page.

First-order, linear

Those equations have the form \begin{align*} y' + p(t) y = q(t) \end{align*} Find \begin{align*} \mu(t) = e^{\int p(t) dt} \end{align*} Then \begin{align*} \frac{d}{dt}(\mu(t)y) & = q(t) \mu(t) \\ \implies y & = \frac{\int q(t) \mu(t) dt}{\mu(t)} \end{align*}

First-order, separable

Those equations have the form:

\begin{align*} \frac{dy}{dx} = f(x)g(y) \end{align*}

Find the solution by solving

\begin{align*} \int \frac{dy}{g(y)} = \int f(x) dx \end{align*}

Solve for exact (explicit) values of $$y$$

Exact equations

They have the form

\begin{align*} M(x,y) + N(x,y) \frac{dy}{dx} = 0 \end{align*}

• $$(\xi)$$ If $$M_y = N_x$$

$$\implies$$ Find such $$F(x,y)=C$$, where

\begin{align*} F_x = M, \quad F_y = N \end{align*}

• otherwise, make it exact, such that

\begin{align*} \frac{M_y-N_x}{N} \text{ only depends on } x \text{ or } \frac{N_x-M_y}{M} \text{ only depends on } y \end{align*}

Find

\begin{align*} \mu(x) = e^{\int \frac{M_y-N_x}{N} dx} \quad\text{or}\quad \mu(y) = e^{\int \frac{N_x-M_y}{M} dy} \end{align*}

multiply both by $$M$$ and $$N$$, so the condition $$M_y = N_y$$ is satisfied. Go to $$(\xi)$$ and proceed with finding $$F(x,y)$$

Second-order, linear, constant-coefficient equations

They have the form

\begin{align*} y” + p y' + q y = f(t) \end{align*}

• First, solve for the homogeneous case, where $$y” + p y' + q y = 0$$

Make a characteristic polynomial, let $$y = e^{rt}$$:

$$r^2+pr+q=0$$

Find roots, solution (general) will be

\begin{align*} y = c_1 e^{r_1 t} + c_2 e^{r_2 t} \end{align*}

• if repeated root $$\implies y = c_1 e^{rt} + c_2 t e^{rt}$$

• if $$r = \alpha \pm i \beta$$ $$\implies y=c_1 \cos(\beta t)e^{\alpha t} + c_2 \sin(\beta t) e^{\alpha t}$$

Solving for particular solution $$y_p(t)$$

Undetermined coefficients (superpositioned) for $$f(t)$$

Whatever is in $$f(t)$$, start adding up the corresponding coefficients into $$y_p(t)$$

• $$e^{nt} \to Ae^{nt}$$

• $$t^m \to A_m t^m + \ldots + A_1 t + A_0$$

• $$\cos(\beta t)$$ or $$\sin(\beta t) \to Acos(\beta t) + B\sin(\beta t)$$

 NOTE should not be linearly dependent with the general solution. If it is, multiply by $$t$$ until it is linearly independent.

Variation of parameters

Seek $$y_p(t) = v_1(t)y_1(t)+v_2(t)y_2(t)$$, where

\begin{align*} \begin{cases}v_1'y_1+v_2'y_2=0\\v_1'y_1'+v_2'y_2'=f(t)\end{cases} \end{align*}

So the final solution is $$y(t)=c_1 y_1(t) + c_2 y_2(t) + y_p(t)$$

Second-order, linear, variable-coefficient equations

Equations have the form

• $$(1)$$: $$a(t)y” + b(t)y'+c(t)y = f(t)$$

• $$(2)$$: $$y” + p(t)y'+q(t)y = g(t)$$

In general case, guess the first homogeneous solution (try $$y_1=e^t$$) and use reduction of order to find the second homogeneous solution, so that \begin{align*} & y_2(t) = v(t)y_1(t) \\ & \implies y_2” + p(t)y_2' + q(t)y_2 = 0 \\ & \implies (v(t)y_1(t))”+p(t)(v(t)y_1(t))'+q(t)(v(t)y_1(t)) = 0 \\ \end{align*}

 NOTE Also applicable with form $$(1)$$

You will probably have another differential equation emerge from above. It should have lower order than our current equation, so just refer to one of the techniques above to find $$v(t)$$ and then you can find $$y_2(t)=v(t)y_1(t)$$

Use variation of parameters to find a particular solution. It’s that system with $$v$$

 NOTE What you if you have a Cauchy-Euler equation?

They have the form $$at^2y”+bty'+cy=0$$

then $$y=t^r \implies ar^2+(b-a)r+c=0$$

• if $$r$$ is repeated, $$y_1=t^r$$, $$y_2=ln|t|t^r$$

• if $$r=\alpha\pm i\beta$$, $$y_1=t^{\alpha}\cos(\beta ln|t|)$$ and $$y_2=t^{\alpha}\sin(\beta ln|t|)$$

Generally, solution has the form $$y=c_1t^{r_1}+c_2t^{r_2}$$

Higher-order, linear equations

\begin{align*} a_n(t)y^{(n)}+a_{n-1}(t)y^{(n-1)}+\ldots+a_1(t)y'+a_0(t)y=g(t) \end{align*} All second-order methods above extend to $$n^{th}$$ order.

Laplace transform

Laplace is a holy grail of solving differential equations with initial values defined. Laplace is the same kind of Bible to engineers like Taylor Series is. \begin{align*} \mathcal{L}\{f\}(s) = \int_0^{\infty} e^{-st} f(t) dt \end{align*} assuming $$f$$ is piecewise continuous and of exponential order.

Table of common Laplace transformations
$$f(t)$$ $$\mathcal{L}\{f\}(s)$$
$$1$$ $$\frac{1}{s}$$
$$e^{at}$$ $$\frac{1}{s-a}$$
$$\sin(bt)$$ $$\frac{b}{s^2+b^2}$$
$$\cos(bt)$$ $$\frac{s}{s^2+b^2}$$
$$u(t-a)$$ $$\frac{e^{-as}}{s}$$
$$\delta(t-a)$$ $$e^{-as}$$

Where $$u(t)$$ is the Heaviside step function and $$\delta(t)$$ is the Dirac delta function.

Some Laplace transform properties:

• $$\mathcal{L}\{e^{at}f(t)\}(s) = \mathcal{L}\{f(t)\}(s-a)$$

• $$\mathcal{L}\{t^nf(t)\}(s) = s^n\mathcal{L}\{f\}(s)-s^{n-1}f(0)-\ldots-sf^{(n-2)}(0)-f^{(n-1)}(0)$$

• $$\mathcal{L}\{t^nf(t)\}(s) = (-1)^n \frac{d^n}{ds^n} \mathcal{L}\{f(t)\}(s)$$

If $$f$$ is a T-periodic function, \begin{align*} \mathcal{L}\{f(t)\}(s) = \frac{\int_0^T e^{-sT} f(t) dt}{1-e^{-sT}} \end{align*} where $$\int_0^T e^{-sT} f(t) dt = \mathcal{L}\{f_T(t)\}(s)$$, the sum of integrals of different parts of the piecewise function.

Convolutions:

• $$(f*g)(t) = \int_0^t f(t-v)g(v)dv$$

• $$\mathcal{L}\{(f*g)(t)\} = \mathcal{L}\{f(t)\}(s)\cdot \mathcal{L}\{g(t)\}(s)$$

• $$(f*g)(t) = \mathcal{L}^{-1}\{F\cdot G\}(t)$$, where $$F=\mathcal{L}\{f\}(s)$$ and $$G=\mathcal{L}\{g\}(s)$$

Heaviside/unit step function:

• $$\mathcal{L}\{u(t-a)f(t)\}(s) = e^{-as}\mathcal{L}\{f(t+a)\}(s)$$

• $$\mathcal{L}^{-1}\{e^{-as}F(s)\}(t)=u(t-a)\mathcal{L}^{-1}\{F(s)\}(t-a)$$

If IVP is not at 0, define some new function like $$w(t)=y(t+\alpha)$$, and solve for $$w$$. Finally, you can offset to find $$y$$

Step (block) function: \begin{align*} \Pi_{a,b}(t) = u(t-a)-u(t-b) \end{align*} so \begin{align*} \mathcal{L}\{\Pi_{a,b}(t)\}(s)=\frac{e^{-sa}-e^{-sb}}{s} \end{align*}

Constant-coefficient, homogeneous systems of ODE

\begin{align*} \vec{x}' = A \vec{x}, \quad \text{where } A\in\mathbb{R}^{n\times n},\quad x\in\mathbb{R}^n \end{align*}

If $$A$$ has n linearly independent eigenvectors $$\vec{u_i}$$ associated to n eigenvalues $$\lambda_i$$, then a general solution of the system is given by $$\vec{x}(t) = c_1 e^{\lambda_1 t}\vec{u_1}+c_2e^{\lambda_2t}\vec{u_2} + \ldots + c_ne^{\lambda_nt}\vec{u_n}$$

• If $$\lambda=\alpha \pm i \beta$$, so $$\vec{u}=\vec{a}+i\vec{b}$$, we have $$\vec{x}=c_1e^{\alpha t}(\cos(\beta t)\vec{a}-\sin(\beta t)\vec{b}) + c_2e^{\alpha t}(\cos(\beta t)\vec{b}+\sin(\beta t)\vec{a})$$

• Matrix exponential

$$e^{At} = \sum_{k=0}^{\infty} \frac{A^k t^k}{k!}$$, where $$A^0=I$$, an identity matrix.

• Find solutions for any eigenvalues

• Compute the characteristic polynomial $$p(\lambda)$$ of $$A$$

\begin{align*} p(\lambda)=det(A-\lambda I) \end{align*}

• Factor $$p(\lambda)$$ into linear factors to yield

\begin{align*} p(\lambda) = c(\lambda-\lambda_1)^{m_1} \cdot \ldots \cdot (\lambda-\lambda_k)^{m_k},\quad c=\pm 1 \end{align*}

• For each $$\lambda_j$$, find $$m_j$$ linearly independent generalized eigenvectors $$\{\vec{u_j}^{m_1},\cdots,\vec{u_j}^{m_j}\}$$ satisfying

\begin{align*} (A-\lambda_i I)^{m_j} \vec{u} = \vec{0} \end{align*}

• For each $$\vec{u_j}^i$$ computed in the previous step, compute $$e^{At}\vec{u_j}^i$$ by

\begin{align*} e^{At}\vec{u_j}^i & =e^{\lambda_jt}e^{(A-\lambda_jI)t}\vec{u_j}^i \\ & =e^{\lambda_jt}(\vec{u_j}^i+t(A-\lambda_jI)\vec{u_j}^i+\cdots+\frac{t^{m_j-1}}{(m_j-1)!}(A-\lambda_jI)^{m_j-1}\vec{u_j}^i) \end{align*}

Linear systems of ODE

\begin{align*} \vec{x}' = A(t)\vec{x} + \vec{f}(t), \quad \text{where } A\in\mathbb{R}^{n\times n}, x\in\mathbb{R}^n, \quad f\in\mathbb{R}^n \end{align*}

If $$X(t)$$ is a matrix whose columns are made up of n linearly independent homogeneous solutions ($$X(t)$$ is the fundamental matrix), then a general solution may be written as $$\vec{x}(t_0)=\vec{x_0}$$

\begin{align*} \vec{x}(t) = X(t)X^{-1}(t_0)\vec{x_0}+X(t)\int_{t_0}^{t}X^{-1}(s)f(s)ds \end{align*}

If $$A(t)$$ is constant-coefficient, then we recover Duhamel’s formula:

\begin{align*} \vec{x}(t) = e^{A(t-t_0)}x_0 + \int_{t_0}^{t}e^{A(t-s)}f(s)ds \end{align*}

Applications

There are many applications of differential equations in classical mechanics, fields, etc. Below you will find just a snippet of some very common Physics 1/2 scenarios

Falling object

\begin{align*} m\frac{dv}{dt}=mg-bv \end{align*}

where $$b$$ is the air resistance

Fluid mix, define $$R_{in}$$ and $$R_{out}$$

\begin{align*} \frac{dx}{dt}=R_{in}-R_{out} \end{align*}

Mass-Spring System

• Vertical spring (direction of gravity) \begin{align*} my”=-by'-k(L+y)+mg+F_{ext}(t) \end{align*} assume $$KL=mg$$, where $$b$$ is dumping, and $$k$$ is stiffness

• Horizontal spring \begin{align*} my”=-by'-ky+F_{ext}(t) \end{align*} where $$b$$ is dumping, and $$k$$ is stiffness

Conclusion

This is as much as I can recover from my initial experience with differential equations. This article is not as much to teach you how to solve them but provide a quick lookup cheatsheet if needed or glance at different forms that we can actually solve! There are infinitely many differential equations that we cannot find an exact solution for! ◼︎