Mathematics, Sciences, and Technologies

ODEs 5-6: Revisiting Green’s Function (Part 1)

,

Green’s Function and Boundary Value Problems

Up until now, we have been discussing boundary value problems in the specific setting of Sturm-Liouville equations. In general, both of them can be approached by the Green’s Function method proposed in this tutorial with some further considerations. Subsequently, in the remaining two sections, we will see how Green’s Function can be constructed in these cases, particularly for those that have a simple enough structure.

Recall (3)-(6) in that tutorial. They will be the same for the current scope but with the interval \( D \) set to the appropriate one. The Green’s function \( G(x,z) \) should satisfy the given ODE with R.H.S. being the delta function \( \delta(x-z) \), i.e. \( \mathcal{L}[G](x,z) = \delta(x-z) \), with \( \mathcal{L} \) taking the form of (2) in the same tutorial. Assume that the boundary conditions are homogeneous, so it is like the Dirichlet type \( y(a) = y(b) = 0 \) or Neumann type \( y'(a) = y'(b) = 0 \) or a mix of both. Then, the Green’s function should also obey the same boundary condition with respect to \(x\), e.g. \( G(a,z) = G(b,z) = 0 \), \( G'(a,z) = G'(b,z) = 0 \). For inhomogeneous cases, a change of variable will then be needed to properly convert it.

Another requirement can be examined by integrating \( \mathcal{L}[G](x,z) = \delta(x-z) \) with respect to \(x\) over an infinitesimally small interval \( [z-\epsilon, z+\epsilon] \), then we have

\begin{align}
\int_{z-\epsilon}^{z+\epsilon} \mathcal{L}[G](x,z) dx = \int_{z-\epsilon}^{z+\epsilon} \delta(x-z) dx \\
\Rightarrow\int_{z-\epsilon}^{z+\epsilon} [a_n(x)\frac{d^nG}{dx^n}(x,z) + a_{n-1}(x)\frac{d^{n-1}G}{dx^{n-1}}(x,z) + \cdots] dx = 1 \tag{1}
\end{align}

Next, we take the limit \( \epsilon \to 0 \) to examine the behavior close to the point \(x = z\). Notice that \( d^nG/dx^n(x,z) \) must be associated with the Dirac delta function at \( x = z \) and has a value of infinity there. Otherwise, if \( d^nG/dx^n \) is finite, then the lower-order derivatives \( d^mG/dx^m, m \leq n-1\), being the anti-derivatives of \( d^nG/dx^n \), will also be finite, which implies that the integral on the L.H.S. of (1) will be zero as \( \epsilon \to 0 \), failing to be equal to \(1\). It is also impossible to have any of the lower-order derivatives be the Dirac delta function, since this will make the integration of the next derivative return a Dirac delta on the R.H.S. of (1).

Therefore, the only sensible conclusion is that \( d^nG/dx^n \) gives a value of infinity at \(x=z\). Then, the \((n-1)\)th-order derivative \( d^{n-1}G/dx^{n-1} \) will have a finite discontinuity there (like the step function), and any other lower-order derivatives \( d^mG/dx^m, m \leq n-2\) will be continuous at \(x=z\). So, only the leading term \( a_n(x)d^nG/dx^n \) contributes to the integral on the L.H.S. of (1) while all other terms result in \( 0 \). Then, carrying out integration by parts on (1):

\begin{align}
\lim_{\epsilon \to 0} \int_{z-\epsilon}^{z+\epsilon} a_n(x)\frac{d^nG}{dx^n}(x,z) dx &= 1 \\
\lim_{\epsilon \to 0} [a_n(x)\frac{d^{n-1}G}{dx^{n-1}}(x,z)]_{z-\epsilon}^{z+\epsilon} -\lim_{\epsilon \to 0} \int_{z-\epsilon}^{z+\epsilon} a_n'(x) \frac{d^{n-1}G}{dx^{n-1}}(x,z) dx &= 1 \\
\lim_{\epsilon \to 0} [a_n(x)\frac{d^{n-1}G}{dx^{n-1}}(x,z)]_{z-\epsilon}^{z+\epsilon} -(0) = \lim_{\epsilon \to 0} [a_n(x)\frac{d^{n-1}G}{dx^{n-1}}(x,z)]_{z-\epsilon}^{z+\epsilon} &= 1 \tag{2}
\end{align}

This shows that \( d^{n-1}G/dx^{n-1} \) should have a discontinuity of \( 1/a_n(z) \) at \( x = z \) and this will be the constraint we are looking for. Green’s function only depends on the operator \( \mathcal{L} \) and boundary conditions. Once determined, it can be repeatedly used for any arbitrary source term.

Example

Solve the following ODE

\begin{align}
\frac{d^2y}{dx^2} + y = \tan x \tag{3}
\end{align}

with the boundary conditions of \( y(0) = y(\pi/2) = 0 \) by the method of Green’s function. (Compare to the example in this tutorial)

The required Green’s function has to satisfy the homogeneous part of (3) when \( x \neq z \), which is hence a linear combination of \( \sin(x) \) and \( \cos (x) \). However, to produce the necessary discontinuity for the first-order derivative at \(x = z\), the coefficients of such a superposition of \( \sin(x) \) and \( \cos (x) \) must be different on the two sides. So, we may assume the following form of Green’s function:

\begin{align}
G(x,z) = \begin{cases}
A(z) \sin x + B(z) \cos x & \text{when \(x < z\)}\\
C(z) \sin x + D(z) \cos x & \text{when \(x > z\)}
\end{cases} \tag{4}
\end{align}

Substituting the stated boundary conditions, \(G(0,z) = G(\pi/2,z) = 0\), it is easy to see that \(B(z) = C(z) = 0 \), so

\begin{align}
G(x,z) = \begin{cases}
A(z) \sin x & \text{when \(x < z\)}\\
D(z) \cos x & \text{when \(x > z\)}
\end{cases} \tag{5}
\end{align}

Furthermore, the discontinuity of \(dG/dx\) at \( x = z \) will be of \( 1/a_2 = 1 \) but \( G(x,z) \) is continuous, thus

\begin{align}
\left\{
\begin{aligned}
D(z) \cos z -A(z) \sin z &= 0 \\
-D(z) \sin z -A(z) \cos z &= 1
\end{aligned}\right. \tag{6}
\end{align}

The solution of this linear system is easily seen to be \( A(z) = -\cos z, D(z) = -\sin z \) by Cramer’s Rule. Therefore, the desired Green’s function for this equation with the given boundary conditions is

\begin{align}
G(x,z) = \begin{cases}
-\cos z \sin x & \text{when \(x < z\)}\\
-\sin z \cos x & \text{when \(x > z\)}
\end{cases} \tag{7}
\end{align}

Hence, the solution of (3) can be computed as

\begin{align}
y &= \int_0^{\pi/2} G(x,z) \tan z dz \\
&= \int_0^{x} (-\sin z \cos x) \tan z dz + \int_x^{\pi/2} (-\cos z \sin x) \tan z dz \\
&= -\cos x \int_0^{x} \frac{1-\cos^2 z}{\cos z} dz -\sin x \int_x^{\pi/2} \sin z dz \\
&= -\cos x \int_0^{x} (\sec z -\cos z) dz -\sin x [-\cos z]_x^{\pi/2} \\
&= -\cos x [\ln|\sec z + \tan z| -\sin z]_0^{x} -\sin x \cos x \\
&= -\cos x (\ln|\sec x + \tan x| -\sin x) -\sin x \cos x \\
&= -\cos x \ln|\sec x + \tan x| \tag{8}
\end{align}

In the sense of limit, when \(x \to \pi/2\) the expression of (8) indeed approaches \(0\).

Exercise

Show that the following general ODE

\begin{align}
\frac{d^2y}{dx^2} + y = f(x) \tag{9}
\end{align}

that has been specified with the boundary conditions \( y(-\pi/2) = y(\pi/2) = 0 \) (tweaked from the example above!), does not admit a Green’s function.

Answer

Following the same logic as the example above, (4) will still be valid but now the boundary conditions require that \(G(-\pi/2,z) = G(\pi/2,z) = 0\), so that \( A(z) = C(z) = 0 \), and

\begin{align}
G(x,z) = \begin{cases}
B(z) \cos x & \text{when \(x < z\)}\\
D(z) \cos x & \text{when \(x > z\)}
\end{cases}
\end{align}

The continuity requirements are then

\begin{align}
\left\{
\begin{aligned}
D(z) \cos z -B(z) \cos z &= 0 \\
D(z) \sin z -B(z) \sin z &= 1
\end{aligned}\right.
\end{align}

This is clearly inconsistent and so the Green’s function method does not work here.

Leave a Reply

I’m Benjamin

Welcome to my Mathematical World! Here you can find posts and tutorials related to applied topics like Linear Algebra, Calculus, Differential Equations, and Programming. Feel free to leave comments and suggestions!

Discover more from Benjamin's Maths World

Subscribe now to keep reading and get access to the full archive.

Continue reading