Mathematical Methods in Physics/Introduction to 2nd order differential equations

Introduction
What are differential equations? Why are they so important in physics? The answer to these questions will become more apparent as the course goes on, but to provide motivation, for now we will say that a differential equation is an equation where derivatives of a function appear (we will provide a more formal definition in the following section), and from which we'd like to know what this function is. Finding a function such that the differential equation is satisfied is known as finding a solution to the differential equation.

Why should physical scientists study differential equations? The answer to this question is rather easy if the student has taken any more or less advanced physics course. It will become apparent to them that the basic laws of nature can be expressed in the language of differential equations, both ordinary as well as partial differential equations.

As canonical examples, we consider the equation of the harmonic oscillator (ordinary),


 * $$\frac{d^2x}{dt^2} = -\omega^2 x$$

the wave equation (partial),


 * $$\frac {\partial^2 u}{\partial t^2} = c^2 \left({\frac {\partial ^{2}u}{\partial x^{2}}}+{\frac {\partial ^{2}u}{\partial y^{2}}}+{\frac {\partial ^{2}u}{\partial z^{2}}}\right)$$

the equation of an RLC circuit (ordinary),


 * $$L\frac{d^2I}{dt^2} + R \frac{dI}{dt} + \frac{I}{C} = \frac{dV}{dt}$$

and finally, Laguerre's equation (ordinary),


 * $$x \frac{d^2y}{dx^2} + (1-x)\frac{dy}{dx} + ny = 0$$

an equation that shows up in quantum mechanics.

There are many alternative notations for the derivative; we may use primes (Lagrange's notation) ($$y'$$, $$y''$$, etc.), numbers enclosed within parentheses ($$y^{(1)}$$, $$y^{(5)}$$, etc.), Leibniz's notation ($$\frac{d^3y}{dx^3}$$), or Newton's dot notation, when we discuss derivatives with respect to time ($$\frac{dx}{dt} = \dot{x}, \frac{d^2x}{dt^2} = \ddot{x}$$). In what follows, we will try to use consistent notation, but the reader should be aware that notation is mostly a matter of preference and one notation is as good as any other.

Basic definitions
A differential equation is an equation that relates a function with its derivative. Given a function $$f$$, independent variable $$x$$ and dependent variable $$y$$, an (ordinary) differential equation's most general expression is


 * $$f\left(x, y, y'', \ldots, y^{(n)}\right) = 0$$

A solution to this differential equation is a function $$y = g(x)$$ such that


 * $$f\left(x, g(x), g''(x), \ldots, g^{(n)}(x)\right) = 0$$

We say that a differential equation is of order $$n$$ if the highest derivative that appears in the differential equation is the $$n$$-th derivative.

An autonomous differential equation is one where there is no explicit dependence on the independent variable $$x$$:


 * $$f\left(y, y'', \ldots, y^{(n)}\right) = 0$$

A linear ordinary differential equation only involves the dependent variable and its derivatives in a linear fashion (multiplied by a non-zero function of $$x$$, which may or may not be constant). For example,


 * $$\cos(y') + \sin x + y = 0$$


 * $$e^{y} + y'^2 + 3x = 0$$

are examples of nonlinear differential equations, whereas


 * $$3 y'' + 2y - y = \cos x$$


 * $$y^{(4)} - 5 y'' + y = x^2$$


 * $$x^2 y'' - 3 x y' + y = \sin x$$

are linear differential equations.

We say that a linear differential equation is homogeneous if any potential term(s) involving solely the independent variable $$x$$ are identically vanishing. Thus,


 * $$3 y'' + y' - 5y = 0$$

is homogeneous, whereas


 * $$y' - 5 y + y' + 2y = x^2 + \cos x$$

is inhomogeneous or nonhomogeneous, due to the $$x^2 + \cos x$$ term that depends solely on $$x$$.

It is customary, but by no means necessary, to move all the nonhomogeneous terms to the right-hand side of the differential equation; this practice is done to clearly distinguish these inhomogeneous terms as well as make some solutions method easier to implement.

Linear ordinary differential equations
We focus now on linear ordinary differential equations, as these appear pervasively in the physical sciences, in particular those of second-order.

A linear ordinary differential equation is an equation of the form


 * $$a_n(x)y^{(n)} + a_{n-1}(x)y^{(n-1)} + \ldots + a_1(x)y' + a_0(x)y = f(x)$$

As we have seen before, if $$f(x) \neq 0$$ the equation is nonhomogeneous or inhomogeneous, and if all the coefficients, that is, all the $$a_i(x)$$ factors are constant and not functions of $$x$$, we say that the equation is of constant coefficients.

Vectors
From linear algebra, we intuitively know what it means for two vectors to be linearly independent. The vectors $$\mathbf{u} = -3\mathbf{i} + 5\mathbf{j}$$ and $$\mathbf{v} = -6\mathbf{i} + 10\mathbf{j}$$ are linearly dependent because $$\mathbf{u}$$ can be expressed as a linear combination of $$\mathbf{v}$$, or vice versa: $$\mathbf{v} = 2 \mathbf{u}$$ or equivalently, $$\mathbf{u} = \frac{1}{2} \mathbf{v}$$.

More formally, given the set of vectors $$S=\{\mathbf{v}_1,\mathbf{v}_2,\dots,\mathbf{v}_n\}$$, we say that these vectors are linearly dependent if the equation


 * $$a_1\mathbf{v}_1+a_2\mathbf{v}_2+\cdots+a_k\mathbf{v}_k= \mathbf{0},$$

has a nontrivial (nonzero) solution in the scalar coefficients $$a_i$$ ($$a_1$$, $$a_2$$, etc.), that is to say, that at least one of the coefficients doesn't vanish, and where $$k\leq n$$. If, for example, $$a_1 \neq 0$$, then


 * $$\mathbf{v}_1 = -\frac{a_2}{a_1} \mathbf{v}_2 - \cdots - \frac{a_k}{a_1} \mathbf{v}_k,$$

and we can see that $$\mathbf{v}_1$$ is a linear combination of the rest of the vectors.

This means that the vectors of the set $$S=\{\mathbf{v}_1,\mathbf{v}_2,\dots,\mathbf{v}_n\}$$ are linearly independent if the equation


 * $$a_1\mathbf{v}_1+a_2\mathbf{v}_2+\cdots+a_n\mathbf{v}_n= \mathbf{0},$$

can only be satisfied if the scalar coefficients $$a_i$$ are all $$0$$.

Functions
We can now extend our definition of linear independence to functions.

We say that the functions $$g_1(x)$$, $$g_2(x),\ldots,g_n(x)$$ are linearly independent in an interval $$I$$ if the equation


 * $$a_1 g_1(x) + a_2 g_2(x) + \cdots + a_n g_n(x) = 0$$

can only be satisfied if all the coefficients $$a_i$$ are vanishing, for all $$x$$ in the interval $$I$$. If the equation can be satisfied without all the coefficients being $$0$$, as before, we say that the functions are linearly dependent.

We now define the Wronskian of the $$n-1$$ times differentiable functions $$g_1(x)$$, $$g_2(x),\ldots,g_n(x)$$:


 * $$W(x) = \begin{vmatrix}

g_1(x) & g_2(x) & \cdots & g_n(x)\\

g'_1(x) & g'_2(x) & \cdots & g'_n(x)\\

g_1(x) & g_2(x) & \cdots & g''_n(x)\\

\vdots & \vdots & \ddots & \vdots \\

g^{(n-1)}_1(x) & g^{(n-1)}_2(x) & \cdots & g^{(n-1)}_n(x)\\

\end{vmatrix}$$

This functional determinant is important to study the linear independence of a given set of functions. We will make this more explicit in the next section.

Principle of superposition

 * If $$y_1$$ and $$y_2$$ are two solutions of a linear homogeneous ordinary differential equation, then so is $$ay_1 + by_2$$, where $$a$$ and $$b$$ are any two real numbers.

A theorem for complex solutions

 * If $$y(x) = u(x) + i v(x)$$ is the complex solution to a linear homogeneous differential equation with continuous coefficients, then $$u(x)$$ and $$v(x)$$ are also solutions to the differential equation.

Number of general solutions for linear homogeneous differential equation

 * The maximum number of linearly independent solutions to a linear homogeneous differential equation is equal to its order.

Linear independence and the Wronskian
We now make use of the Wronskian determinant (defined earlier) to give a sufficient, but not necessary, condition of linear independence of the $$n-1$$ times differentiable functions $$g_1(x)$$, $$g_2(x),\ldots,g_n(x)$$.


 * If the Wronskian of the $$n-1$$ times differentiable functions $$g_1(x)$$, $$g_2(x),\ldots,g_n(x)$$ does not vanish over an open interval $$I$$, then the functions are linearly independent. That is,


 * $$ W \neq 0 \Rightarrow \text{linearly independent functions}$$

It is important to note that this is a sufficient but not necessary condition. It is not true that if the Wronskian does vanish, then the functions are linearly dependent.

For example, the functions $$x$$, $$x^2$$ and $$x^3$$ are linearly independent in any closed interval of the reals, as their Wronskian doesn't vanish identically (for all $$x$$) in any such closed interval.

However, if we consider the functions $$|x^3|$$ and $$x^3$$ on the interval $$I = (-1, 1)$$, we can see that $$W = 0$$ for all $$x$$ in the interval $$I$$. But these functions are not linearly dependent on the whole interval $$I$$.

The Ostrogradski-Liouville formula
If we solve for the $$n$$-th derivative in a linear differential equation, we have


 * $$y^{(n)} = - p_1(x) y^{(n-1)}(x) - \ldots - p_{n-1}(x) y'(x) - p_n(x)y(x)$$

The following equality then holds:


 * $$W(x) = W(x_0) e^{\displaystyle-\int_{x_0}^{x}p_1(t) dt}$$

where $$x_0$$ is any point belonging to any closed interval $$[a, b]$$ where the coefficients of the differential equation are continuous.

Second-order ordinary linear differential equations
We now turn to arguably the most important topic of this part of the course.

A second-order ordinary linear differential equation is an equation of the form


 * $$a_2(x)y''(x) + a_1(x)y'(x) + a_0(x)y(x) = f(x)$$

Why are these equations so important in the physical sciences? There are at least three reasons.

First of all, in many occasions, Newton's second law, when applied to a specific system, yields such an equation. Canonical examples of this include the damped and driven oscillator:


 * $$ \frac{d^2x}{dt^2} + 2\zeta\omega_0\frac{dx}{dt} + \omega_0^2 x = \frac{F(t)}{m}, $$

and a particle under uniform gravitational acceleration,


 * $$ \frac{d^2x}{dt^2} = -g.$$

Secondly, when applying certain methods of solution to linear partial differential equations, we obtain as intermediate steps these sorts of second-order linear ordinary differential equations. An example is the aforementioned Laguerre equation. Another example is the Cauchy-Euler equation,


 * $$a_{n} x^n y^{(n)}(x) + a_{n-1} x^{n-1} y^{(n-1)}(x) + \cdots + a_0 y(x) = 0$$

where all the $$a_i$$ terms are constants.

Lastly, the importance of linear equations lies in the fact that, most of the time, a nonlinear equation can be approximated by a linear one in the vicinity of a specific point (called the equilibrium point). For example, the equation that governs the dynamics of a pendulum can be written as


 * $$\frac{d^2\theta}{dt^2}+\frac{g}{\ell} \sin\theta=0$$

If $$\theta = 0$$ is taken as the equilibrium point, we expand $$\sin \theta$$ using its Taylor series


 * $$\sin \theta = \theta - \frac{\theta^3}{3!} + \cdots$$

and if all terms except the first one are considered negligible ($$\theta \ll 1$$), then the equation of the pendulum is now


 * $$\frac{d^2\theta}{dt^2}+\frac{g}{\ell} \theta=0$$

and the equation is now linear. It should be noted that, thus, the solution obtained from this linear equation will only be valid under the hypothesis the linearization was done in the first place, namely $$\theta \ll 1$$.