An ordinary differential equation, or ODE for short, is an equation where a function and one or more its derivatives appear simultaneously. The highest derivative of the function is said to be the order of the ODE. If we denote the function as and its -th derivative as , a generic ODE written in normal form (with the highest derivative isolated) is
where is some function.
An ODE is said to be autonomous if it has no explicit dependence on (although all the still do). In this case, is not dependent on .
If is a linear function, the ODE can be written as
where the and are functions of . In this case, the ODE is said to be linear. Moreover, if for all , the equation is said to be homogeneous.
Systems#
A high-order ODE can be expressed as a system of first-order ODEs. Consider for instance a generic second-order ODE , where we used dot notation for derivatives and renamed to . If we name , we can express the second-order ODE as a system of two first-order ODEs, one in and one in :
In general, the number of first-order ODEs is equal to the order of the original one.
The benefit of doing things this way is that first-order ODEs have a large amount of theorems and results that make them far easier to solve and much more reliable to work with. For an example, the following theorem underlies much of the study of these equations.
Numerous generalizations are available to include time dependence, multiple coordinates or both.
Autonomous systems#
A particularly pleasant case of ODE system is an autonomous system, which is a system of autonomous first-order ODEs. These usually arise from equations for individual components of a vector field. Given a vector field , they are written as
where bold font is used to remark the fact that is a vector. For these kinds of systems, the following theorem holds:
The name comes from the physical interpretation of $t$ as time. Furthermore, we can also make a strong statement on trajectories: > [!info] Non-intersection > The solutions of an autonomous system never intersect. > > **Proof.** Assume that there exists two trajectories $\mathbf{x}_{1}(t)$ and $\mathbf{x}_{2}(t)$ that are both solutions of $(1)$ and that they intersect at some point $\mathbf{x}_{0}$. For instance, $\mathbf{x}_{1}(0)=\mathbf{x}_{0}$ and $\mathbf{x}_{2}(t_{0})=\mathbf{x}_{0}$ for some $t_{0}$. If this is true, then there must exist some third trajectory $\mathbf{x}_{3}(t)=\mathbf{x}_{2}(t+t_{0})$ that's also a solution of $(1)$ due to time-shift invariance, for which $\mathbf{x}_{3}(0)=\mathbf{x}_{0}$. But then there would be two distinct solutions $\mathbf{x}_{1}(t)$ and $\mathbf{x}_{3}(t)$ with the same initial condition. But this can't be, as it violates the existence and uniqueness theorem. Therefore $\mathbf{x}_{1}(t)$ and $\mathbf{x}_{2}(t)$ cannot simultaneously exist. Equation $(1)$ also has the important property that it forces the derivative of the solution $\dot{\mathbf{x}}(t)$ to always be tangent to the solution $\mathbf{x}(t)$. This can, for example, be seen geometrically by using the definition of derivative:\dot{\mathbf{x}}(t)=\lim_{ \delta t \to 0 } \frac{\mathbf{x}(t+\delta t)-\mathbf{x}(t)}{\delta t}
If we draw the vectors manually, we see ![[Diagram Derivative of position vector is tangent.svg|100%]] If we send $\delta t\to0$, the displacement between the white and red vector become minuscule, which leads $\dot{\mathbf{x}}(t)$ to become tangent. A non-visual proof can for instance be found by taking the derivative of the unit vector of $\mathbf{x}(t)$ and proving that it is always perpendicular to the unit vector itself. In fact, the derivative of any unit vector is perpendicular to the original. ##### Flow of a vector field Now, given some autonomous system like $(1)$, it is legitimate to ask the following questions: since the solution for a given starting condition is unique, what does that solution look like over all $t$? What if instead of selecting a starting condition, we instead select a specific time; what do all of the possible solutions look at that time? Answering the first question is rather easy. Since $\mathbf{x}(t)$ is a $\mathbb{R}\mapsto \mathbb{R}^{N}$, it represents a [[Curve|curve]] in $\mathbb{R}^{N}$. It's just the definition of a curve of parameter $t$. This makes sense: intuitively, the trajectory of an object is a curve in space that the object follows, so it's not surprising that this is also the case for all possible dimensions. Answering the second question is harder. Once we set $t$, we are left with an infinite number of solutions, one for all infinite starting conditions. For a given $t$, we can say that this defines a [[linear map]][^1] $\varphi^{t}:\mathbb{R}^{N}\mapsto \mathbb{R}^{N}$ which takes a starting condition and transforms it into its correlated solution, evaluated at our time $t$. We can write this as $\mathbf{x}_{0}\mapsto \varphi^{t}(\mathbf{x}_{0})\equiv \mathbf{x}(t;\mathbf{x}_{0})$. Thus, for any time $t$, we have a linear map. For all $t$, therefore, we have a *family* of maps, which we can write as $\{ \varphi^{t} \}_{t\in \mathbb{R}}$. This [[set]] is known as the **[[Flow]] of a vector field**[^2]. Despite the similar name, this is not quite the same as the better known [[flux]], i.e. the [[Integrale su una superficie|surface integral]] of a vector field over some surface. They are named the same because they both embody the idea of "thing moving through a surface", but they describe it in different ways. Namely, the flux in the ODE sense uses the number of trajectory lines passing through a region of space. ## Examples Well known cases of ODEs appear in physics frequently. The best known example is [[Newton's laws|Newton's second law]], $\mathbf{F}=m\mathbf{a}$. We call the position vector $\mathbf{r}(t)$, the velocity $\mathbf{v}=\dot{\mathbf{r}}$ and the acceleration $\mathbf{a}=\ddot{\mathbf{r}}$, where we used dot notation to represent the derivative in $t$. A typical form of ODE, for a velocity-dependent force (e.g. [[drag]]), is\mathbf{F}(\mathbf{r},\dot{\mathbf{r}},t)=m \ddot{\mathbf{r}}(t)
This can take as many forms as [[physical system|physical systems]] you can think of. ### 1D In one dimension, where $\mathbf{r}\to x$, we have many interesting examples. > [!example] Free particle > A [[free particle]] is > $$\ddot{x}=0> This resolves to > $$x(t)=a\cos(\omega t)+b\sin(\omega t)=A\cos(\omega t+\varphi)=Ce^{i\omega t}+C^{*}e^{-i\omega t}since there is no force. This resolves to , where and are determined by the starting conditions.
> Now let's solve for both position $x$ and velocity $v$. Our trajectory is going to be > $$\mathbf{x}=\begin{pmatrix} > x \\ > v > \end{pmatrix}in various equivalent forms.
It could have also been written in system form as
\dot{x} \\ \dot{v} \end{pmatrix}=\begin{pmatrix} v \\ -\omega ^{2}x \end{pmatrix}
> where $x_{0}$ and $v_{0}$ are our starting conditions and $\varphi^{t}$ is a function from $\mathbb{R}^{2}$ to $\mathbb{R}^{2}$. The vector field is > $$f=\begin{pmatrix} > v \\ > -x > \end{pmatrix}For simplicity, set . Our generic solution is going to be described by the matrix
x_{0}\cos t+v_{0}\sin t \\ -x_{0}\sin t+v_{0}\cos t \end{pmatrix}=\varphi^{t}(x_{0},v_{0})
> which resolves to > $$x(t)=a\cosh(\omega t)+b\sinh(\omega t)=Ce^{\omega t}+C^{*}e^{-\omega t} > where $g$ is some constant. The [[general solution]] is the sum of the [[partial solution]] of the associated homogeneous equation (where $\ddot{x}=0$). The partial is > $$x_\text{part}=- \frac{1}{2}gt^{2}Some example trajectories look like this:
> The final result is the sum of the two: > $$x(t)=- \frac{1}{2}gt^{2}+at+b > This is a non-linear ODE and is therefore very difficult to solve (but can be solved using [[elliptic functions]]). Typically this is solved by noting that for small $x$, $\sin(x)\simeq x$. In this case, it becomes a usual harmonic oscillator and can be solved exactly. > [!example] Dampened fall > Falling through a material with nonzero [[viscosity]] leads to > $$\ddot{x}=-\beta \dot{x}-gThe general, homogeneous solution is
> with derivative > $$\dot{x}_\text{gen}=\alpha e^{-\beta t}for some and is the (constant) gravitational acceleration. The partial is . The associated general solution () is
> where $v_{\infty}$ represents the terminal velocity, reached asymptotically after an infinite amount of time falling. > [!example] Oscillator under external constant force > A harmonic oscillator under a constant external force leading to a constant acceleration $g$ (e.g. [[Gravity|gravity]]) is > $$\ddot{x}=-\omega ^{2}x-gIf we call and , the final solution is
> [!example] Dampened harmonic oscillator > A dampened harmonic oscillator is > $$\ddot{x}=-\omega ^{2}x-2\mu \dot{x}The partial is . The associated general is . The final solution is
> leads to > $$\frac{\Delta}{4}=\mu ^{2}-\omega ^{2}for some dampening coefficient . Solving the characteristic polynomial
> Our solution is > $$x(t)=ae^{\lambda_{1}t}+be^{\lambda_{2}t}where is the discriminant. This is not necessarily real. We identify three cases.
If (the dampening is very strong), we have
> and the solution is > $$x(t)=(a\cos (\sigma t)+b\sin(\sigma t))e^{-\mu t}If (the dampening is weak), we have
[^1]: Specifically an [[automorphism]]. [^2]: More specifically, this is a [[group]]. The identity is $\varphi^{0}$. The inverse of an element $\varphi^{t}$ is found by flipping the sign of $t$, so $\varphi^{-t}$. The composition rule is given by the sum of times: $\varphi^{t}\circ\varphi^{s}=\varphi^{t+s}$.where .
If , the oscillator is said to be critically dampened, in which case and the solution can be seen from the weak dampening case as