Week 7 and 8: Sturm-Liouville Theorem: Eigenfunctions and Fourier Series
Contents
Week 7 and 8: Sturm-Liouville Theorem: Eigenfunctions and Fourier Series¶
Sturm-Liouville form¶
Sturm-Liouville Theorem is named after two great mathematicians, Jacques Charles François Sturm (1803-1855) and Joseph Liouville (1809–1882). Jacque Charles François Sturm first described how an ordinary differential equation satisfies a certain form can be solved by separation of variables and he used a thermal diffusion in a thin bar as an example. However, during that period, people were more interested in the general solution of that given math problem. The most important contribution from Jacques Charles François Sturm and Joseph Liouville was applying the eigen function approach to find the general solution of ODEs with a certain form. Later on, people called it Sturm-Liouville Theorem. In addition to the contribution in differential equation, Joseph Liouville was also famous for his achievement in statistical mechanisms and dynamical systems. We will cover more details in another course Chaos and Predictability.
The solution of Sturm-Liouville form plays an important role in modeling wave and thermal diffusion. Since the Sturm-Liouville era, mathematicians and engineers have found a lot of scientific problems sharing the Sturm-Liouville form, such as Bessel Function, Parabolic Cylinder functions, Hermite Polynomial, Legendre Polynomial, and even the Fourier Series, where we can find a set of eigen functions spanning the entire solution space. These have been applied to find the solution of tropical wave, transverse circulations of ITCZ and hurricane, and the equilibrium temperature of Earth.
Mathematically, the Sturm-Liouville form can be written as
using integrating factor, we can multiply the entire equation by
to obtain
or
where \(r(x)=e^{\int R(x) dx}\), \(q(x)=Q(x)e^{\int R(x) dx}\), and \(p(x)= P(x)e^{\int R(x) dx}\). Here, we can setup some extreme cases and test what we can find.
Let \(r(x)=1\), \(q(x)=0\), and \(p(x)\) is a constant. In addition, we have two simple boundary conditions: \(y(0)=0\) and \(y(1)=0\). The entire equation is reduced to
where \(L=\frac{d^2}{dx^2}\). (84) has a set of solution
where \(b=\sqrt{\Lambda}\) (one should notice that we assume \(\Lambda>0\), more details are provided in the discussion about Fourier Series). If we substitute boundary conditions into (85), one can find \(a=0\), \(c_1=0\), and \(c_2\sin(\sqrt{\Lambda})=0\). Since we don’t want a trivial solution (i.e., both \(c_1\) and \(c_2\) are 0), it implies that \(\sin(\sqrt{\Lambda})=0\). For \(\sin\) function, we can find 0 solution at each multiple \(\pi\) suggesting \(\sqrt{\Lambda}=n\pi\), where \(n\) is an integer. This gives as the final form of solution
(86) is the famous Fourier \(\sin\) function. If one looks closely to (84), it is actually an eigen value problem as long as \(L\) is a Hermitian operator (or matrix). Indeed, we can prove the differential operator is an Hermitian operator. It also implies that the eigen functions span the entire solution space and any solution can be the linear combination of the eigen functions. At this moment, readers probably can figure out two most important things in this chapter: (1) what functions share Sturm-Liouville form, and (2) how to find the eigen basis.
Note
The Hermitian matrix or operator is defined as a self-adjoint matrix (operator) where the eigen functions span the entire vector space of solution. Mathematically, it has a few unique characteristics. First, we can swap the order the operator without changing the results
Second, all of the eigen values from a self-adjoint matrix (operator) are real. Third, all of the eigen vectors from a self-adjoint matrix (operator) are orthogonal.
For the first question, any equation satisfies the form (80) (where \(R(x)\), \(P(x)\), and \(Q(x)\) are continuous over the domain of interest) and one of the any following boundary conditions, is a Sturm-Liouville form.
Boundary Conditions
Type I: Regular Sturm-Liouville Problem
Type II: Periodic Sturm-Liouville Problem
Type III: Singular Sturm-Liouville Problem
when \(r(a)=0\), we need \(b_1y(b)+b_2y^{'}(b)=0\) with \(b_1\) and \(b_2\) not both 0. Similar boundary conditions applied to point \(a\).
when \(r(b)=0\), we need \(a_1y(a)+a_2y^{'}(a)=0\) with \(a_1\) and \(a_2\) not both 0.
There are a few important characteristics for Sturm-Liouville problem.
For types I and II, the Sturm-Liouville problem has an infinite number of distinct eigen values \(\Lambda_n\) (some textbooks use \(\lambda_n\)). If these are labeled with increasing order. i.e., \(\lim_{n\rightarrow\infty} \Lambda_n=\infty\)
The eigen value of Sturm-Liouville is real since it’s operator is Hermitian.
For any Sturm-Liouville problem, any non-zero multiple of an eigenfunction is also an eigenfunction corresponding to the same eigen value.
For a regular Sturm-Liouville, any two eigen function correspond to the same eigen value must be the be a nonzero multiple of each others. While it’s not the case for periodic Sturm-Liouville.
For the second question: how to find proper eigenfunctions, we will walk through a special case with \(r(x)=1\), \(q(x)=0\), and \(p(x)\) with type I or II boundary conditions and leave more general cases in the chapter of special functions.
Example 1
Find the solution of the following ODE
from (85) with \(\lambda>0\) (I will let readers try two other cases), we know the general solutions are written
and the second order derivative
Substituting the boundary into the equations above,
This implies that \(c_2\sin(\sqrt{\lambda}L)=0\), and \(\sqrt{\lambda}L=n\pi\). Also, the boundary conditions from the derivative term give us the same conclusion. Therefore, the general solution is
Example 2
Find the solution of
where \(A\) is a positive constant. This problem occurs in solving for the temperature of a homogeneous bar, which radiates energy from on end to the surrounding medium.
Following the example above, we know the equation has a general solution of
Substituting the boundary conditions into the equation gives us \(c_1=0\).
since we don’t want trivial solution (i.e., \(c_2=0\)), indicating
Let \(kL=z\), we have
and \(z\) is the eigen value.
To visualize the solution,
Eigenfunction Expansions¶
Recall that for every Sturm-Liouville problem, we can find a set of eigenfunctions which spans the entire solution space. Mathematically, it can be written as
If the coefficient, \(c_n\), can be properly chosen and make this series converges to \(y(x)\). Then it’s called eigen function expansion. The problem is how to determine a proper set of coefficient. Here, we gonna leverage one important characteristic of eigen function in Sturm-Liouville problem: weighted orthogonality. It describes that the weighted inner product of eigenfunctions which share different eigen values equals 0. i.e.,
Proof of Weighted Orthogonality of Eigenfunctions
Proof:
we know that
if we multiply the first equation by \(\psi\) and the second equation by \(\varphi\) and take the difference between two, we have
or
We also have the Wronskian of \(\varphi\) and \(\psi\)
By observing the last equation above, one can find the second last equation can written as
Geometrically, we know the Wronskian represents the area spanned by two solutions (or vector). If the two solutions are orthogonal, it further indicates
while the two solution share different eigen values. The equation implies
The equation above is so-called weighted orthogonality, where \(p(x)\) is the weighting or the stretch of coordinate. (i.e., the space of coordinate can be inhomogeneous)
We have proofed the weighted orthogonality and now we can go a step further showing how to find a proper set of coefficient for each eigen function
Finding Coefficients for Eigenfunctions
We know
if we multiply the entire equation by \(p(x)\varphi_n(x)\) and integrate over the domain of interest
According to weighted orthogonality, \(\varphi_k(x)\varphi_n(x)\) is 0 as long as \(k\neq n\). This leads to
Reorganize the equation, we can find,
Although the equation above looks complicated, it’s simply the weighted covariance of \(f(x)\) and \(\varphi_n(x)\) divided by the weighted variance of \(\varphi_n(x)\).
Example 3
Solve
From example 2, we know the homogeneous solution is
Given the boundary conditions, we know
or we can written the solution as the linear combinations of different eigen function
Using the concept of variation of parameters, we would like to find a proper set of \(c_n\), which can match the inhomogeneous case.
For \(n=0\) case,
For \(n=1\) and higher cases,
The code below (based on Julia) shows how to implement eigenfunction expansions in an ODE problem practically.
using Plots
x = range(0, 2π, length=1000)
y1 = range(0, 2π, length=1000)
y2 = one.(x)*6
f = zero.(x)
f[ 0 .<= x .< 2] = y1[ 0 .<= x .< 2] # jump condition, when 0<=x<2, f(x)=x
f[ 2 .<= x .<= 2π]= y2[ 2 .<= x .<= 2π] # jump condition, when 2<=x<2pi, f(x)=6
approx_y = reshape(zero.(x),1, length(x))
for n in 0:10
f = reshape(f, 1, length(x)) # function f
y4 = reshape(cos.(n/2*x),1, length(x)) # cos basis
coef = y4*transpose(f)/(y4*transpose(y4)) # calculate the coefficient for each cos function
approx_y = approx_y+coef*y4
end
p1 = scatter(x,y3,xlims=(0,2π),ylims=(0,10),width=2,label="f(x)")
plot!(reshape(x,length(x),1),reshape(approx_y,length(x),1),xlims=(0,2π),ylims=(0,10),label="Approximated f(x) with n=10",width=4)
Fourier Analysis¶
Boundary Conditions and Types of Solutions¶
In this section, we will introduce the famous Fourier Series to the reader. The Fourier analysis or Fourier Series is, however, nothing new than what we learned previously. Indeed, Fourier series is a special type of Sturm-Liouville problem, where \(r(x)=1\), \(q(x)=0\), and \(r(x)=1\). In addition, it is usually given with a periodic boundary conditions. Physically, the readers can picture this type of Sturm-Liouville problem has a wave-like solution, where higher higher eigen values correspond to higher wave numbers. We will provide a more strict definition about the existence of Fourier Solutions (i.e., if the solutions can converge) at the chapter of Partial Differential Equations.
According to the types of boundary conditions, we can decide whether the solution is a Fourier sin function, cos function, or the combination of both.
Boundary Conditions for Fourier sin/cos and both series
In a Sturm-Liouville form, if the function is bounded (i.e., \(\in [a,b]\)), we can tell the types of Fourier solutions based on the boundary conditions
For Fourier \(\sin\) series, we usually have boundary conditions \(y(a)=0\) and \(y(b)=0\)
For Fourier \(\cos\) series, we usually have boundary conditions \(y^{'}(a)=0\) and \(y^{'}(b)=0\)
For the combinations of both \(\sin\) and \(\cos\), we have boundary conditions \(a_1y(a)+a_2y^{'}(a)=0\) and \(b_1y(b)+b_2y^{'}(b)=0\), or \(y(a)=y(b)\) and \(y^{'}(a)=y^{'}(b)\)
One can easily find that they correspond to types I and II boundary conditions. An easy way to memorize the three boundary conditions is to find their connections with \(\cos\) and \(\sin\) functions. If we want a solution where the boundary is 0, then it can only be a \(\sin\) function since \(\cos(0)=1\). Similarly, if we want a function, which always has \(0\) derivative (flat) at the boundary, then it can only be a \(\cos\) function since \(\sin\) function has the maximum/minimum derivative at \(\frac{d \sin(x=0)}{dx}=1\).
Let’s have some practices and guess the solutions for the following ODEs.
Example 4
Find the solutions for the following ODE
From the discussion above, we know this is a periodic boundary. Therefore, the solutions can be written as
where \(2\pi\) and \(2L\) indicates that the longest wave we can resolve is the wave that complete one cycle (one period) from the left end to the right end of the domain. Now, following the eigenfunction expansion, we can determine the coefficient for different \(n\).
The equation above is so-called discrete Fourier Transform, where we convert \(f(x)\) from the physical space to frequency (wave number) space. If we can make the summation form into a integral form (making discrete function into a continuous function) by assuming (1) \(k = \frac{n\pi}{L}\) and (2) domain of integral \([-\infty,\infty]\). (Let readers to walk through the derivation) Then, we will have
, which is the Fourier integral. Following the same approach of finding Fourier coefficients,
Power Spectrum, Windows and Gibbs Phenomenon¶
From the Fourier Transform above, the readers can find that we can determine the precision of accuracy by truncating the solutions. For example, in Fig. 8, the approximated solution is nearly identical to \(f(x)\) when \(n\) goes to 1000. It also indicates that we can filter out the small feature in the solution by heavily truncating the solutions. To know what kind of signals is retained, we can apply power spectrum analysis to a given \(f(x)\),
The power spectrum of a given wave number of defined as
(93) evidently has an energy form (squared form) given that we want know the amplitude of a given wave number instead of its sign. It is equivalent to the explained variance of \(f(x)\) by certain wave number like what we learn in linear regression. If one looks closely to (89) and (90), Fourier Transform is indeed a linear regression problem where different types of waves are our predictors and both \(a_n\) and \(b_n\) are the corresponding regression coefficients.
Recall that the Convolution in Laplace transform has similar effect. Where we can apply a Heaviside function with 2 jump conditions to filter out the high frequency signals that we don’t want. However, Fourier Transform is a more strict way of filtering data. To demonstrate that, we can apply Fourier transform to a Heaviside function with 2 jump conditions.
The Fourier Transform of a Heaviside function
Given a Heaviside function,
take the Fourier transform of function \(g(x)\), we have
One can find we have a \(\textrm{sinc}(\frac{kT}{2})\) function. The figure below shows how does it look like on a power spectrum.
One can find that the signal not only centers around the wave number of interest but also spreads out to its neighbor. This indicates when we use a Heaviside function for filtering, we can’t entirely remove the signal outside the wave numbers of interest. This is the famous Principle of Uncertainty, where the wiggles on the edge are so-called Gibbs Phenomenon. This is similar to Principle of Uncertainty in quantum physics where the momentum (in frequency space) is the Fourier transform of the wave function’s location.