Category Archives: Differential Equations

Self-Adjoint Differential Equations III: Real Eigenvalues, Gram-Schmidt Orthogonalization

In here, I mentioned that the eigenvalues of a Hermitian operator are real and that the eigenfunctions of a Hermitian operator are orthogonal.

Let $\mathcal{L}$ be a Hermitian operator and let $u_i$, $u_j$ be eigenfunctions of $\mathcal{L}$ with eigenvalues $\lambda_i$, $\lambda_j$, respectively. Then

The complex conjugation of \eqref{eq:eigen2} is
\begin{equation}\label{eq:eigen3}\mathcal{L}u_j^\ast+\lambda_j^\ast wu_j^\ast=0\end{equation}
Multiply \eqref{eq:eigen} by $u_j^\ast$ and \eqref{eq:eigen3} by $u_i$:
\label{eq:eigen5}u_i\mathcal{L}u_j^\ast+u_i\lambda_j^\ast wu_j^\ast=0
Subtracting \eqref{eq:eigen5} from \eqref{eq:eigen4}, we obtain
Integrating \eqref{eq:eigen6}, we get
\begin{equation}\label{eq:eigen7}\int_a^bu_j^\ast\mathcal{L}u_i dx-\int_a^b u_i\mathcal{L}u_j^\ast dx=(\lambda_j^\ast-\lambda_i)\int_a^b u_iu_j^\ast wdx\end{equation}
Since $\mathcal{L}$ is Hermitian, the LHS of \eqref{eq:eigen7} vanishes. Thus
$$(\lambda_j^\ast-\lambda_i)\int_a^bu_iu_j^\ast wdx=0$$ If $i=j$ then $\int_a^bu_iu_j^\ast wdx\ne 0$ so $\lambda_i^\ast=\lambda_i$, i.e. $\lambda_i$ is real.

If $i\ne j$ and if $\lambda_i\ne\lambda_j$, then $\int_a^bu_iu_j^\ast wdx=0$, i.e. $u_i$ and $u_j$ are orthogonal, where we consider
\begin{equation}\label{eq:hermitianproduct}\langle u_i,u_j\rangle=\int_a^b u_iu_j^\ast wdx\end{equation} as an inner product. The inner product \eqref{eq:hermitianproduct} is called the Hermitian product weight by $w(x)$.

What if $i\ne j$ but $\lambda_i=\lambda_j$? Then $\int_a^bu_iu_j^\ast wdx$ may not vanish, i.e. $u_i$ and $u_j$ may not be orthogonal. Such case is labeled degenerate. For example, consider the differential equation
Once can easily see that $y_1(x)=\cos nx$ and $y_2(x)=\sin nx$ both satisfy the differential equation. So $\cos nx$ and $\sin nx$ are eigenfunctions that correspond to the same eigenvalue $n^2$. That is, $\cos nx$ and $\sin nx$ are degenerate eigenfunctions. They are however orthogonal because
$$\int_0^{2\pi}\cos nx\sin nxdx=0$$

It is good to know the following formulas:
\int_{x_0}^{x_0+2\pi}\sin mx\sin nxdx=C_n\delta_{nm},
\pi & \mbox{if} & n\ne 0\\
0 & \mbox{if} & n=0
\int_{x_0}^{x_0+2\pi}\cos mx\cos nxdx=D_n\delta_{nm},
\pi & \mbox{if} & n\ne 0\\
2\pi & \mbox{if} & n=0
$$\int_{x_0}^{x_0+2\pi}\sin mx\cos nxdx=0$$

Orthogonal functions can be used to expand a functions, for example, as a Fourier series expansion. Certain classes of function (sectionally continuous or piecewise continuous) may be represented by a series of orthogonal functions to any desired degree of accuracy. Such property is referred to as completeness.

Example. Square Wave

Consider the square wave
\frac{h}{2} & \mbox{if} & 0<x<\pi,\\
-\frac{h}{2} & \mbox{if} & -\pi<x<0

Note that the function may be expanded in any of a variety of orthogonal eigenfunctions such as Legendere, Hermite, Chebyshev, etc. The choice of eigenfunction is made on the basis of convenience. For example, we may choose to use $\cos nx$, $\sin nx$.  The eigenfunction series can then be written as a Fourier series
\begin{equation}\label{eq:fourier}f(x)=\frac{a_0}{2}+\sum_{n=1}^\infty(a_n\cos nx+b_n\sin nx)\end{equation}
a_n&=\frac{1}{\pi}\int_{-\pi}^\pi f(x)\cos nt dt,\\
b_n&=\frac{1}{\pi}\int_{-\pi}^\pi f(t)\sin nt dt,\ n=0,1,2,\cdots
So by the formula \eqref{eq:fourier} we find that
b_n&=\frac{h}{n\pi}(1-\cos n\pi)\\
0 & \mbox{if} & n=\mbox{even}\\
\frac{2h}{n\pi} & \mbox{if} & n=\mbox{odd}
Hence the Fourier series expansion of $f(x)$ is given by

If $N$ liearly independent eigenfunctions correspond to the same eigenvalue, the eigenvalue is said to be $N$-fold degenerate. In the above example, for each $n$ there are two possible solutions $\cos nx$, $\sin nx$. We may say the eigenfunctions are degenerate or the eigenvalue is degenerate.

Gram-Schmidt Orthogonalization

$$\int_a^b \varphi_i^2wdx=N_i^2$$
Since $\mathcal{L}u(x)+\lambda w(x)u(x)=0$ is linear, $\mu_i\varphi_i$ would be a solution as well for any constant $\mu_i$. If we set $\psi_i=\frac{\varphi_i}{N_i}$ then

Suppose that $\{u_n(x)\}_{n=0}^\infty$ are eigenfunctions that are not mutually orthogonal. Gram-Schmidt orthogonalization process allows us to come up with orthonormal eigenfunctions $\{\varphi_n\}_{n=0}^\infty$ from $\{u_n(x)\}_{n=0}^\infty$.
Let us start with $n=0$. Let $\psi_0(x)=u_0(x)$. Then the normalized eigenfunction is denoted by $\varphi_0(x)$.
For $n=1$, let
\psi_1&=u_1(x)-\langle u_1(x),\varphi_0(x)\rangle\varphi_0(x)\\
&=u_1(x)-\int u_1\varphi_0wdx\varphi_0(x)\end{align*}

Figure 1

Figure 1 clearly shows how we can come up with $\psi_1$ using a vector projection. Note that the angle $\theta$ appeared in Figure 1 is for an intuitive purpose only and does not depict a real angle.

Figure 2

For $n=2$, as one can see from Figure 2, $\psi_2$ that is orthogonal to both $\varphi_0$ and $\varphi_1$ can be obtained as
\psi_2&:=u_2(x)-\langle u_2(x),\varphi_0(x)\rangle\varphi_0(x)-\langle u_2(x),\varphi_1(x)\rangle\varphi_1(x)\\
&=u_2(x)-\int u_2(x)\varphi_0(x)w(x)dx\varphi_0(x)-\int u_2(x)\varphi_1(x)w(x)dx\varphi_1(x)
The normalzed eigenfunction $\varphi_2$ is then
Now we can see a clear pattern and $\psi_n$ which is orthogonal to $\varphi_0,\cdots,\varphi_{n-1}$ would be given by
\psi_n&:=u_n(x)-\sum_{j=0}^{n-1}\langle u_j(x),\varphi_j(x)\rangle\varphi_j(x)\\
&=u_n(x)-\sum_{j=0}^{n-1}\left[\int u_j(x)\varphi_j(x)w(x)dx\right]\varphi_j(x)
with its normalization

Example. Find orthonormal set from
$$u_n(x)=x^n,\ n=0,1,2,\cdots$$
with $-1\leq x\leq 1$ and $w(x)=1$.

Solution. By Gram-Schmidt orthonormalization, we obtain
\varphi_2(x)&=\sqrt{\frac{5}{2}}\cdot\frac{1}{2}(3x^2-1),\\ \varphi_3(x)&=\sqrt{\frac{7}{2}}\cdot\frac{1}{2}(5x^3-3x),\\
where $P_n(x)$ is the $n$th-order Legendre polynomial.


G. Arfken, Mathematical Methods for Physicists, 3rd Edition, Academic Press 1985

Self-Adjoint Differential Equations II: Hermitian Operators

Let $\mathcal{L}$ be a second-order self-adjoint differential operator. Then $\mathcal{L}u(x)$ may be written as
\begin{equation}\label{eq:selfadjoint}\mathcal{L}u(x)=\frac{d}{dx}\left[p(x)\frac{du(x)}{dx}\right]+q(x)u(x)\end{equation} as we discussed here. Multiply \eqref{eq:selfadjoint} by $v^\ast$ ($v^\ast$ is the complex conjugate of $v$) and integrate
\int_a^bv^\ast\mathcal{L}udx&=\int_a^bv^\ast\frac{d}{dx}\left[p(x)\frac{du(x)}{dx}\right]dx+\int_a^bv^\ast qudx\\
&=\int_a^bv^\ast d\left[p(x)\frac{du(x)}{dx}\right]+\int_a^bv^\ast qudx\\
&=v^\ast p\frac{du}{dx}|_a^b-\int_a^b {v^\ast}^\prime pu’dx+\int_a^bv^\ast qudx
We may impose
\begin{equation}\label{eq:bc}v^\ast p\frac{du}{dx}|_a^b=0\end{equation}
as a boundary condition.
-\int_a^b {v^\ast}^\prime pu’dx&=-\int_a^b {v^\ast}^\prime pdu\\
&=-{v^\ast}^\prime pu|_a^b+\int_a^b u(p{v^\ast}^\prime)’dx
We may also impose
\begin{equation}\label{eq:bc2}-{v^\ast}^\prime pu|_a^b=0\end{equation}
as a boundary condition. Then
\int_a^bv^\ast\mathcal{L}udx&=\int_a^b u(p{v^\ast}^\prime)’dx+\int_a^bv^\ast qudx\\
&=\int_a^b u\mathcal{L}v^\ast dx

Definition. A self-adjoint operator $\mathcal{L}$ is called a Hermitian operator with respect to the functions $u(x)$ and $v(x)$ if

\begin{equation}\label{eq:hermitian}\int_a^bv^\ast\mathcal{L}udx=\int_a^b u\mathcal{L}v^\ast dx\end{equation}

That is, a self-adjoint operator $\mathcal{L}$ which satisfies the boundary conditions \eqref{eq:bc} and \eqref{eq:bc2} is a Hermitian operator.

Hermitian Operators in Quantum Mechanics

In quantum mechanics, the differential operators need to be neither second-order nor real. For example, the momentum operator is given by $\hat p=-i\hbar\frac{d}{dx}$. Therefore we need an extended notion of Hermitian operators in quantum mechanics.

Definition. The operator $\mathcal{L}$ is Hermitian if
\begin{equation}\label{eq:hermitian2}\int \psi_1^\ast\mathcal{L}\psi_2 d\tau=\int(\mathcal{L}\psi_1)^\ast\psi_2 d\tau\end{equation}
Note that \eqref{eq:hermitian2} coincides with \eqref{eq:hermitian} if $\mathcal{L}$ is real. In terms of Dirac’s braket notation \eqref{eq:hermitian2} can be written as

The adjoint operator $A^\dagger$ of an operator $A$ is defined by
\begin{equation}\label{eq:adjoint}\int \psi_1^\ast A^\dagger \psi_2 d\tau=\int(A\psi_1)^\ast\psi_2 d\tau\end{equation} Again in terms of Dirac’s braket notation \eqref{eq:adjoint} can be written as
$$\langle\psi_1|A^\dagger\psi_2\rangle=\langle A\psi_1|\psi_2\rangle$$
If $A=A^\dagger$ then $A$ is said to be self-adjoint. Clearly, self-adjoint operators are Hermitian operators. However the converse need not be true. Although we will not delve into this any deeper here, the difference is that Hermitian operators are always assumed to be bounded while self-adjoint operators are not necessarily restricted to be bounded. That is, bounded self-adjoint operators are Hermitian operators. Physicists don’t usually distinguish self-adjoint operators and Hermitian operators, and often they mean self-adjoint operators by Hermitian operators. In quantum mechanics, observables such as position, momentum, energy, angular momentum are represented by (Hermitian) linear operators and the measurements of observables are given by the eigenvalues of linear operators. Physical observables are regarded to be bounded and continuous, because the measurements are made in a laboratory (so bounded) and points of discontinuity are mathematical points and nothing smaller than the Planck length can be observed. As well-known any bounded linear operator defined on a Hilbert space is continuous.

For those who are interested: This may cause a notational confusion, but in mathematics the complex conjugate $a^\ast$ is replaced by $\bar a$ and the adjoint $a^\dagger$ is replaced by $a^\ast$. Let $\mathcal{H}$ be a Hilbert space. By the Riesz Representation Theorem, it can be shown that for any bounded linear operator $a:\mathcal{H}\longrightarrow\mathcal{H}’$, there exists uniquely a bounded linear operator $a^\ast: \mathcal{H}’\longrightarrow\mathcal{H}$ such that
$$\langle a^\ast\eta|\xi\rangle=\langle\eta|a\xi\rangle$$ for all $\xi\in\mathcal{H}$, $\eta\in\mathcal{H}’$. This $a^\ast$ is defined to be the adjoint of the bounded operator $a$. ${}^\ast$ defines an involution on $\mathcal{B}(\mathcal{H})$, the set of all bounded lineart operators of $\mathcal{H}$ and $\mathcal{B}(\mathcal{H})$ with ${}^\ast$ becomes a C${}^\ast$-algebra. In mathematical formulation of quantum mechanics, observables are represented by self-adjoint operators of the form $a^\ast a$, where $a\in\mathcal{B}(\mathcal{H})$. Note that $a^\ast a$ is positive i.e. its eigenvalues are non-negative.

Definition. The expectation value of an operator $\mathcal{L}$ is
$$\langle\mathcal{L}\rangle=\int \psi^\ast\mathcal{L}\psi d\tau$$
$\langle\mathcal{L}\rangle$ corresponds to the result of a measurement of the physical quantity represented by $\mathcal{L}$ when the physical system is in a state described by $\psi$. The expectation value of an operator should be real and this is guaranteed if the operator is Hermitian. To see this suppose that $\mathcal{L}$ is Hermitian. Then
\langle\mathcal{L}\rangle^\ast&=\left[\int \psi^\ast\mathcal{L}\psi d\tau\right]^\ast\\
&=\int\psi\mathcal{L}^\ast\psi^\ast d\tau\\
&=\int(\mathcal{L}\psi)^\ast\psi d\tau\\
&=\int\psi^\ast\mathcal{L}\psi d\tau\ (\mbox{since $\mathcal{L}$ is Hermitian})\\
That is, $\langle\mathcal{L}\rangle$ is real.

There are three important properties of Hermitian (self-adjoint) operators:

  • The eigenvalues of a Hermitian operator are real.
  • The eigenfunctions of a Hermitian operator are orthogonal.
  • The eigenfunctions of a Hermitian operator form a complete set.


  1. G. Arfken, Mathematical Methods for Physicists, 3rd Edition, Academic Press 1985
  2. W. Greiner, Quantum Mechanics, An Introduction, 4th Edition, Springer-Verlag 2001
  3. P. Szekeres, A Course in Modern Mathematical Physics: Groups, Hilbert Space and Differential Geometry, Cambridge University Press 2004

Self-Adjoint Differential Equations I

Let $\mathcal{L}$ be the second-order linear differential operator
which acts on a function $u(x)$ as

Define an adjoint operator $\bar{\mathcal{L}}$ by
If $\mathcal{L}=\bar{\mathcal{L}}$, $\mathcal{L}$ is said to be self-adjoint. One can immediately see that $\mathcal{L}=\bar{\mathcal{L}}$ if and only if \begin{equation}\label{eq:self-adjoint}p_0^\prime=p_1.\end{equation} Let $p(x)=p_0(x)$ and $q(x)=p_2(x)$. Then
Note that one can transform a non-self-adjoint 2nd-order linear differential operator to a self-adjoint one. The idea is similar to that of finding a integrating factor to transform a non-separable first-order linear differential equation to a separable one.

Suppose that \eqref{eq:ldo} is not self-adjoint, i.e. $p_1\ne p_0′$. Multiply $\mathcal{L}$ by $\frac{f(x)}{p_0(x)}$. Then
Suppose $\mathcal{L}’$ is self-adjoint. Then by \eqref{eq:self-adjoint}
That is,
If $p_1=p_0′$, then
&=\frac{1}{p_0}\exp(\ln p_0(x))\\
&=\frac{1}{p_0(x)}\cdot p_0\\
i.e. $f(x)=p_0(x)$ as expected.

Eigenfunctions, Eigenvalues

From separation of variables or directly from a physical problem, we have second-order linear differential equation of the form
\begin{equation}\label{eq:sl}\mathcal{L}u(x)+\lambda w(x)u(x)=0,\end{equation}
where $\lambda$ is a constant and $w(x)>0$ is a function called a density or weighting function. The constant $\lambda$ is called an eigenvalue and $u(x)$ is called an eigenfunction.

Example. [Schrödinger Equation]

The Schrödinger equation
is of the form \eqref{eq:sl}. Recall that $H$ is the Hamiltonian operator
where $V(x)$ is a potential. So $H$ is a second-order linear differential operator. The weight function $w(x)=-1$ and $E$ is energy as an eigenvalue. Clearly Schrödinger equation is self-adjoint.

Example. [Legendre's Equations]

Legendre’s equation
$$(1-x^2)y^{\prime\prime}-2xy’+n(n+1)y=0$$ is of the form \eqref{eq:sl}, where $\mathcal{L}y=(1-x^2)y^{\prime\prime}-2xy’$, $w(x)=1$, and $\lambda=n(n+1)$. Since $p_0^\prime=-2x=p_1$, Legendre’s equations are self-adjoint.

Legendre Functions II: Recurrence Relations and Special Properties

In this lecture, we derive some important recurrence relations of Legendre functions and use them to show that Legendre functions are indeed solutions of a differential equation, called Legendre’s differential equation.

Differentiating the generating function
$$g(x,t)=(1-2xt+t^2)^{-1/2}=\sum_{n=0}^\infty P_n(x)t^n,\ |t|<1\ \ \ \ \ \mbox{(1)}$$
with respect to $t$, we get
\frac{\partial g(x,t)}{\partial t}&=\frac{x-t}{(1-2xt+t^2)^{3/2}}\ \ \ \ \ \mbox{(2)}\\&=\sum_{n=0}^\infty nP_n(x)t^{n-1}.\ \ \ \ \ \mbox{(3)}\end{align*}
(2) can be written as
By (1) and (3), we obtain
$$(x-t)\sum_{n=0}^\infty P_n(x)t^n=(1-2xt+t^2)\sum_{n=0}^\infty nP_n(x) t^{n-1}$$ or
$$(1-2xt+t^2)\sum_{n=0}^\infty nP_n(x) t^{n-1}+(t-x)\sum_{n=0}^\infty P_n(x)t^n=0$$
which can be written out as
\sum_{n=0}^\infty nP_n(x)t^{n-1}-\sum_{n=0}^\infty &2xnP_n(x)t^n+\sum_{n=0}^\infty nP_n(x)t^{n+1}\\&+\sum_{n=0}^\infty P_n(x)t^{n+1}-\sum_{n=0}^\infty xP_n(x)t^n=0.\ \ \ \ \ \mbox{(4)}\end{align*}
In (4) replace $n$ by $n+1$ in the first term, and replace $n$ by $n-1$ in the third and fourth term. Then (4) becomes
\sum_{n=0}^\infty (n+1)P_{n+1}(x)t^n-\sum_{n=0}^\infty &2xnP_n(x)t^n+\sum_{n=0}^\infty (n-1)P_{n-1}(x)t^n\\&+\sum_{n=0}^\infty P_{n-1}(x)t^n-\sum_{n=0}^\infty xP_n(x)t^n=0.
This can be simplified to
which implies that
$$(2n+1)xP_n(x)=(n+1)P_{n+1}(x)+nP_{n-1}(x).\ \ \ \ \ \mbox{(5)}$$
The recurrence relation (5) can be used to calculate Legendre polynomials. For example, we found $P_0(x)=1$ and $P_1(x)=x$ here. For $n=1$, (5) is
Continuing this using the recurrence relation (5), we obtain
A great advantage of having the recurrence relation (5) is that one can easily calculate Legendre polynomials using a computer with a simple programming. This can be easily done for instance in Maxima.

Let us load the following simple program to run the recurrence relation (5).

(%i1) Legendre(n,x):=block ([],
if n = 0 then 1
if n = 1 then x
else  ((2*n – 1)*x*Legendre(n – 1, x)-(n – 1)*Legendre(n – 2,x))/n);

(%o1) Legendre(n, x) := block([], if n = 0 then 1
else (if n = 1 then x else ((2 n – 1) x Legendre(n – 1, x)
- (n – 1) Legendre(n – 2, x))/n))

Now we are ready to calculate Legendre polynomials. For example, let us calculate $P_3(x)$.

(%i2) Legendre(3,x);

The output is not exactly what we may like because it is not simplified.

In Maxima, simplification can be done by the command ratsimp.

(%i3) ratsimp(Legendre(3,x));

The output is

That looks better. Let us calculate one more, say $P_4(x)$.

Now we differentiate $g(x,t)$ with respect to $x$.
$$\frac{\partial g(x,t)}{\partial x}=\frac{t}{(1-2xt+t^2)^{3/2}}=\sum_{n=0}^\infty P_n’(x)t^n.$$
From this we obtain
$$(1-2xt+t^2)\sum_{n=0}^\infty P_n’(x)t^n-t\sum_{n=0}^\infty P_n(x)t^n=0$$
which leads to
$$P_{n+1}’(x)+P_{n-1}’(x)=2xP_n’(x)+P_n(x).\ \ \ \ \ \mbox{(6)}$$
Add 2 times $\frac{d}{dx}(5)$ to $2n+1$ times (6). Then we get
$$(2n+1)P_n=P_{n+1}’(x)-P_{n-1}’(x).\ \ \ \ \ \mbox{(7)}$$
$\frac{1}{2}[(6)+(7)]$ results
$$P_{n+1}’(x)=(n+1)P_n(x)+xP_n’(x).\ \ \ \ \ \mbox{(8)}$$
$\frac{1}{2}[(6)-(7)]$ results
$$P_{n-1}’(x)=-nP_n(x)+xP_n’(x).\ \ \ \ \ \mbox{(9)}$$
Replace $n$ by $n-1$ in (7) and add the result to $x$ times (9):
$$(1-x^2)P_n’(x)=nP_{n-1}(x)-nxP_n(x).\ \ \ \ \ \mbox{(10)}$$
Differentiate (10) with respect to $x$ and add the result to $n$ times (9):
$$(1-x^2)P_n^{\prime\prime}(x)-2xP_n’(x)+n(n+1)P_n(x)=0.\ \ \ \ \ \mbox{(11)}$$
The linear second-order differential equation (11) is called Legendre’s differential equation and as seen $P_n(x)$ satisfies (11). This is why $P_n(x)$ is called a Legendre polynomial.

In physics (11) is often expressed in terms of differentiation with respect to $\theta$. Let $x=\cos\theta$. Then by the chain rule,
\frac{dP_n(\cos\theta)}{d\theta}&=-\sin\theta\frac{dP_n(x)}{dx},\ \ \ \ \ \mbox{(12)}\\ \frac{d^2P_n(\cos\theta)}{d\theta^2}&=-x\frac{dP_n(x)}{dx}+(1-x^2)\frac{d^2P_n(x)}{dx^2}.\ \ \ \ \ \mbox{(13)}
Using (12) and (13), Legendre’s differential equation (11) can be written as