Skip to main content
Mathematics LibreTexts

8.2: Initial and Boundary Value Green's Functions

  • Page ID
    106245
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    We begin with the particular solution (8.13) of our nonhomogeneous differential equation (8.3). This can be combined with the general solution of the homogeneous problem to give the general solution of the nonhomogeneous differential equation:

    \[y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)+y_{2}(x) \int_{x_{1}}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(x) \int_{x_{0}}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.19} \]

    As seen in the last section, an appropriate choice of \(x_{0}\) and \(x_{1}\) could be found so that we need not explicitly write out the solution to the homogeneous problem, \(c_{1} y_{1}(x)+c_{2} y_{2}(x)\). However, setting up the solution in this form will allow us to use \(x_{0}\) and \(x_{1}\) to determine particular solutions which satisfies certain homogeneous conditions.

    We will now consider initial value and boundary value problems. Each type of problem will lead to a solution of the form

    \[y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)+\int_{a}^{b} G(x, \xi) f(\xi) d \xi, \label{8.20} \]

    where the function \(G(x, \xi)\) will be identified as the Green's function and the integration limits will be found on the integral. Having identified the Green's function, we will look at other methods in the last section for determining the Green’s function.

    8.2.1 Initial Value Green’s Function

    We begin by considering the solution of the initial value problem

    \[\begin{array}{r}
    \dfrac{d}{d x}\left(p(x) \dfrac{d y(x)}{d x}\right)+q(x) y(x)=f(x) \\
    y(0)=y_{0}, \quad y^{\prime}(0)=v_{0}
    \end{array} \label{8.21} \]

    Of course, we could have studied the original form of our differential equation without writing it in self-adjoint form. However, this form is useful when studying boundary value problems. We will return to this point later.

    We first note that we can solve this initial value problem by solving two separate initial value problems. We assume that the solution of the homogeneous problem satisfies the original initial conditions:

    \[\begin{aligned}
    \dfrac{d}{d x}\left(p(x) \dfrac{d y_{h}(x)}{d x}\right)+q(x) y_{h}(x) &=0 \\
    y_{h}(0)=y_{0}, \quad y_{h}^{\prime}(0) &=v_{0}
    \end{aligned} \label{8.22} \]

    We then assume that the particular solution satisfies the problem

    \[\begin{array}{r}
    \dfrac{d}{d x}\left(p(x) \dfrac{d y_{p}(x)}{d x}\right)+q(x) y_{p}(x)=f(x) \\
    y_{p}(0)=0, \quad y_{p}^{\prime}(0)=0
    \end{array} \label{8.23} \]

    Since the differential equation is linear, then we know that \(y(x)=y_{h}(x)+ y_{p}(x)\) is a solution of the nonhomogeneous equation. However, this solution satisfies the initial conditions:

    \begin{gathered}
    y(0)=y_{h}(0)+y_{p}(0)=y_{0}+0=y_{0} \\
    y^{\prime}(0)=y_{h}^{\prime}(0)+y_{p}^{\prime}(0)=v_{0}+0=v_{0}
    \end{gathered}

    Therefore, we need only focus on solving for the particular solution that satisfies homogeneous initial conditions.

    Recall Equation (8.13) from the last section,

    \[y_{p}(x)=y_{2}(x) \int_{x_{1}}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(x) \int_{x_{0}}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.24} \]

    We now seek values for \(x_{0}\) and \(x_{1}\) which satisfies the homogeneous initial conditions, \(y_{p}(0)=0\) and \(y_{p}^{\prime}(0)=0\).

    First, we consider \(y_{p}(0)=0\). We have

    \[y_{p}(0)=y_{2}(0) \int_{x_{1}}^{0} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(0) \int_{x_{0}}^{0} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.25} \]

    Here, \(y_{1}(x)\) and \(y_{2}(x)\) are taken to be any solutions of the homogeneous differential equation. Let's assume that \(y_{1}(0)=0\) and \(y_{2} \neq(0)=0\). Then we have

    \[y_{p}(0)=y_{2}(0) \int_{x_{1}}^{0} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.26} \]

    We can force \(y_{p}(0)=0\) if we set \(x_{1}=0\).

    Now, we consider \(y_{p}^{\prime}(0)=0\). First we differentiate the solution and find that

    \[y_{p}^{\prime}(x)=y_{2}^{\prime}(x) \int_{0}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}^{\prime}(x) \int_{x_{0}}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.27} \]

    since the contributions from differentiating the integrals will cancel. Evaluating this result at \(x=0\), we have

    \[y_{p}^{\prime}(0)=-y_{1}^{\prime}(0) \int_{x_{0}}^{0} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \label{8.28} \]

    Assuming that \(y_{1}^{\prime}(0) \neq 0\), we can set \(x_{0}=0\).
    Thus, we have found that

    \[\begin{aligned}
    y_{p}(x) &=y_{2}(x) \int_{0}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(x) \int_{0}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \\
    &=\int_{0}^{x}\left[\dfrac{y_{1}(\xi) y_{2}(x)-y_{1}(x) y_{2}(\xi)}{p(\xi) W \xi)}\right] f(\xi) d \xi
    \end{aligned} \label{8.29} \]

    This result is in the correct form and we can identify the temporal, or initial value, Green's function. So, the particular solution is given as

    \[y_{p}(x)=\int_{0}^{x} G(x, \xi) f(\xi) d \xi \label{8.30} \]

    where the initial value Green's function is defined as

    \[G(x, \xi)=\dfrac{y_{1}(\xi) y_{2}(x)-y_{1}(x) y_{2}(\xi)}{p(\xi) W \xi)} \nonumber \]

    We summarize

    Solution of Initial Value Problem (8.21)

    The solution of the initial value problem (8.21) takes the form

    \[y(x)=y_{h}(x)+\int_{0}^{x} G(x, \xi) f(\xi) d \xi \label{8.31} \]

    where

    \[G(x, \xi)=\dfrac{y_{1}(\xi) y_{2}(x)-y_{1}(x) y_{2}(\xi)}{p(\xi) W \xi)} \nonumber \]

    and the solution of the homogeneous problem satisfies the initial conditions,

    \[y_{h}(0)=y_{0}, \quad y_{h}^{\prime}(0)=v_{0} . \nonumber \]

    Example 8.3. Solve the forced oscillator problem

    \[x^{\prime \prime}+x=2 \cos t, \quad x(0)=4, \quad x^{\prime}(0)=0 . \nonumber \]

    This problem was solved in Chapter 2 using the theory of nonhomogeneous systems. We first solve the homogeneous problem with nonhomogeneous initial conditions:

    \[x_{h}^{\prime \prime}+x_{h}=0, \quad x_{h}(0)=4, \quad x_{h}^{\prime}(0)=0 . \nonumber \]

    The solution is easily seen to be \(x_{h}(t)=4 \cos t\).

    Next, we construct the Green's function. We need two linearly independent solutions, \(y_{1}(x), y_{2}(x)\), to the homogeneous differential equation satisfying \(y_{1}(0)=0\) and \(y_{2}^{\prime}(0)=0\). So, we pick \(y_{1}(t)=\sin t\) and \(y_{2}(t)=\cos t\). The Wronskian is found as

    \[W(t)=y_{1}(t) y_{2}^{\prime}(t)-y_{1}^{\prime}(t) y_{2}(t)=-\sin ^{2} t-\cos ^{2} t=-1 . \nonumber \]

    Since \(p(t)=1\) in this problem, we have

    \[\begin{aligned}
    G(t, \tau) &=\dfrac{y_{1}(\tau) y_{2}(t)-y_{1}(t) y_{2}(\tau)}{p(\tau) W \tau)} \\
    &=\sin t \cos \tau-\sin \tau \cos t \\
    &=\sin (t-\tau)
    \end{aligned} \label{8.32} \]

    Note that the Green's function depends on \(t-\tau\). While this is useful in some contexts, we will use the expanded form.

    We can now determine the particular solution of the nonhomogeneous differential equation. We have

    \[\begin{aligned}
    x_{p}(t) &=\int_{0}^{t} G(t, \tau) f(\tau) d \tau \\
    &=\int_{0}^{t}(\sin t \cos \tau-\sin \tau \cos t)(2 \cos \tau) d \tau \\
    &=2 \sin t \int_{0}^{t} \cos ^{2} \tau d \tau-2 \cos t \int_{0}^{t} \sin \tau \cos \tau d \tau \\
    &=2 \sin t\left[\dfrac{\tau}{2}+\dfrac{1}{2} \sin 2 \tau\right]_{0}^{t}-2 \cos t\left[\dfrac{1}{2} \sin ^{2} \tau\right]_{0}^{t} \\
    &=t \sin t
    \end{aligned} \label{8.33} \]

    Therefore, the particular solution is \(x(t)=4 \cos t+t \sin t\). This is the same solution we had found earlier in Chapter 2.

    As noted in the last section, we usually are not given the differential equation in self-adjoint form. Generally, it takes the form

    \[a_{2}(x) y^{\prime \prime}(x)+a_{1}(x) y^{\prime}(x)+a_{0}(x) y(x)=g(x) . \label{8.34} \]

    The driving term becomes

    \[f(x)=\dfrac{1}{a_{2}(x)} p(x) g(x) \nonumber \]

    Inserting this into the Green’s function form of the particular solution, we obtain the following:

    Solution Using the Green's Function

    The solution of the initial value problem,

    \[a_{2}(x) y^{\prime \prime}(x)+a_{1}(x) y^{\prime}(x)+a_{0}(x) y(x)=g(x) \nonumber \]

    takes the form

    \[y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)+\int_{0}^{t} G(x, \xi) g(\xi) d \xi \label{8.35} \]

    where the Green’s function is the piecewise defined function

    \[G(x, \xi)=\dfrac{y_{1}(\xi) y_{2}(x)-y_{1}(x) y_{2}(\xi)}{a_{2}(\xi) W(\xi)} \label{8.36} \]

    and \(y_{1}(x)\) and \(y_{2}(x)\) are solutions of the homogeneous equation satisfying

    \[y_{1}(0)=0, y_{2}(0) \neq 0, y_{1}^{\prime}(0) \neq 0, y_{2}^{\prime}(0)=0 . \nonumber \]

    8.2.2 Boundary Value Green’s Function

    We now turn to boundary value problems. We will focus on the problem

    \[\begin{array}{r}
    \dfrac{d}{d x}\left(p(x) \dfrac{d y(x)}{d x}\right)+q(x) y(x)=f(x), \quad a<x<b \\
    y(a)=0, \quad y(b)=0
    \end{array} \label{8.37} \]

    However, the general theory works for other forms of homogeneous boundary conditions.

    Once again, we seek \(x_{0}\) and \(x_{1}\) in the form

    \[y(x)=y_{2}(x) \int_{x_{1}}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(x) \int_{x_{0}}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \nonumber \]

    so that the solution to the boundary value problem can be written as a single integral involving a Green's function. Here we absorb \(y_{h}(x)\) into the integrals with an appropriate choice of lower limits on the integrals.

    We first pick solutions of the homogeneous differential equation such that \(y_{1}(a)=0, y_{2}(b)=0\) and \(y_{1}(b) \neq 0, y_{2}(a) \neq 0\). So, we have

    \[\begin{aligned}
    y(a) &=y_{2}(a) \int_{x_{1}}^{a} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(a) \int_{x_{0}}^{a} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \\
    &=y_{2}(a) \int_{x_{1}}^{a} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi
    \end{aligned} \label{8.38} \]

    This expression is zero if \(x_{1}=a\).
    At \(x=b\) we find that

    \[\begin{aligned}
    y(b) &=y_{2}(b) \int_{x_{1}}^{b} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(b) \int_{x_{0}}^{b} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi \\
    &=-y_{1}(b) \int_{x_{0}}^{b} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi
    \end{aligned} \label{8.39} \]

    This vanishes for \(x_{0}=b\).
    So, we have found that

    \[y(x)=y_{2}(x) \int_{a}^{x} \dfrac{f(\xi) y_{1}(\xi)}{p(\xi) W(\xi)} d \xi-y_{1}(x) \int_{b}^{x} \dfrac{f(\xi) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi . \label{8.40} \]

    We are seeking a Green's function so that the solution can be written as one integral. We can move the functions of \(x\) under the integral. Also, since \(a<x<b\), we can flip the limits in the second integral. This gives

    \[y(x)=\int_{a}^{x} \dfrac{f(\xi) y_{1}(\xi) y_{2}(x)}{p(\xi) W(\xi)} d \xi+\int_{x}^{b} \dfrac{f(\xi) y_{1}(x) y_{2}(\xi)}{p(\xi) W(\xi)} d \xi . \label{8.41} \]

    This result can be written in a compact form:

    Boundary Value Green's Function

    The solution of the boundary value problem takes the form

    \[y(x)=\int_{a}^{b} G(x, \xi) f(\xi) d \xi, \label{8.42} \]

    where the Green’s function is the piecewise defined function

    \[G(x, \xi)=\left\{\begin{array}{l}
    \dfrac{y_{1}(\xi) y_{2}(x)}{p W}, a \leq \xi \leq x \\
    \dfrac{y_{1}(x) y_{2}(\xi)}{p W}, x \leq \xi \leq b
    \end{array}\right. \label{8.43} \]

    The Green's function satisfies several properties, which we will explore further in the next section. For example, the Green's function satisfies the boundary conditions at \(x=a\) and \(x=b\). Thus,

    \begin{aligned}
    &G(a, \xi)=\dfrac{y_{1}(a) y_{2}(\xi)}{p W}=0 \\
    &G(b, \xi)=\dfrac{y_{1}(\xi) y_{2}(b)}{p W}=0 .
    \end{aligned}

    Also, the Green’s function is symmetric in its arguments. Interchanging the arguments gives

    \[G(\xi, x)=\left\{\begin{array}{l}
    \dfrac{y_{1}(x) y_{2}(\xi)}{p W}, a \leq x \leq \xi \\
    \dfrac{y_{1}(\xi) y_{2}(x)}{p W} \xi \leq x \leq b
    \end{array} .\right. \label{8.44} \]

    But a careful look at the original form shows that

    \[G(x, \xi)=G(\xi, x) . \nonumber \]

    We will make use of these properties in the next section to quickly determine the Green's functions for other boundary value problems.

    Example 8.4. Solve the boundary value problem \(y'' = x^2, \quad y(0)=0=y(1)\) using the boundary value Green's function. 

    We first solve the homogeneous equation, \(y^{\prime \prime}=0\). After two integrations, we have \(y(x)=A x+B\), for \(A\) and \(B\) constants to be determined.

    We need one solution satisfying \(y_{1}(0)=0\) Thus, \(0=y_{1}(0)=B\). So, we can pick \(y_{1}(x)=x\), since \(A\) is arbitrary.

    The other solution has to satisfy \(y_{2}(1)=0\). So, \(0=y_{2}(1)=A+B\). This can be solved for \(B=-A\). Again, \(A\) is arbitrary and we will choose \(A=-1\). Thus, \(y_{2}(x)=1-x\).
    For this problem \(p(x)=1\). Thus, for \(y_{1}(x)=x\) and \(y_{2}(x)=1-x\),

    \[p(x) W(x)=y_{1}(x) y_{2}^{\prime}(x)-y_{1}^{\prime}(x) y_{2}(x)=x(-1)-1(1-x)=-1 . \nonumber \]

    Note that \(p(x) W(x)\) is a constant, as it should be.

    Now we construct the Green’s function. We have

    \[G(x, \xi)=\left\{\begin{array}{l}
    -\xi(1-x), 0 \leq \xi \leq x \\
    -x(1-\xi), x \leq \xi \leq 1
    \end{array}\right. \label{8.45} \]

    Notice the symmetry between the two branches of the Green's function. Also, the Green's function satisfies homogeneous boundary conditions: \(G(0, \xi)=0\), from the lower branch, and \(G(1, \xi)=0\), from the upper branch.

    Finally, we insert the Green's function into the integral form of the solution:

    \[\begin{aligned}
    y(x) &=\int_{0}^{1} G(x, \xi) f(\xi) d \xi \\
    &=\int_{0}^{1} G(x, \xi) \xi^{2} d \xi \\
    &=-\int_{0}^{x} \xi(1-x) \xi^{2} d \xi-\int_{x}^{1} x(1-\xi) \xi^{2} d \xi \\
    &=-(1-x) \int_{0}^{x} \xi^{3} d \xi-x \int_{x}^{1}\left(\xi^{2}-\xi^{3}\right) d \xi \\
    &=-(1-x)\left[\dfrac{\xi^{4}}{4}\right]_{0}^{x}-x\left[\dfrac{\xi^{3}}{3}-\dfrac{\xi^{4}}{4}\right]_{x}^{1} \\
    &=-\dfrac{1}{4}(1-x) x^{4}-\dfrac{1}{12} x(4-3)+\dfrac{1}{12} x\left(4 x^{3}-3 x^{4}\right) \\
    &=\dfrac{1}{12}\left(x^{4}-x\right)
    \end{aligned} \label{8.46} \]


    This page titled 8.2: Initial and Boundary Value Green's Functions is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Russell Herman via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.