<link href="../markdown.css" rel="stylesheet"></link>

<title>6.A. Linear second order ODEs</title>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"] ],
            displayMath: [ ['$$','$$'], ["\\[","\\]"] ],},
        TeX: {equationNumbers: {
            autoNumber: "AMS"
          },Augment: {  Definitions: {
           macros: {
             overbracket:  ['UnderOver','23B4',1],
             underbracket: ['UnderOver','23B5',1],
           }
         }}},
    });
</script>

$\renewcommand{\Re}{\operatorname{Re}}$
$\renewcommand{\Im}{\operatorname{Im}}$
$\newcommand{\erf}{\operatorname{erf}}$
$\newcommand{\dag}{\dagger}$
$\newcommand{\const}{\mathrm{const}}$
$\newcommand{\arcsinh}{\operatorname{arcsinh}}$

##[6.A. Linear second order ODEs](id:sect-6.A)
-----------

> 1.  [Introduction](#sect-6.A.1)
> 2.  [Cauchy problem (aka IVP)](#sect-6.A.2)
> 3.  [BVP](#sect-6.A.3)
> 4.  [BVP.II](#sect-6.A.4)

###[Introduction](id:sect-6.A.1)

This is not a required reading but at some moment you would like to see how problems we discuss here for PDEs are solved for ODEs (consider it as a toy-model)

We consider ODE
\begin{equation}
Ly:=y'' + a\_1(x)y + a\_2(x)y'=f(x).
\label{eq-6.A.1}
\end{equation}
Let $\\{y\_1(x),y\_2(x)\\}$ be a fundamental system of solutions of the corresponding homogeneous equation
\begin{equation}
Ly:=y'' + a\_1(x)y + a\_2(x)y'=0).
\label{eq-6.A.2}
\end{equation}
Recall that then Wronskian
\begin{equation}
W(y\_1,y\_2; x):= \left| \begin{matrix} y\_1(x) & y\_2(x)\\\\ y'\_1(x) &y'\_2(x)\end{matrix}\right|
\label{eq-6.A.3}
\end{equation}
does not vanish.

###[Cauchy problem (aka IVP)](id:sect-6.A.2)
Consider equation (\ref{eq-6.A.1}) with the initial conditions
\begin{equation}
y(x\_0)=b\_1, \qquad y'(x\_0)=b\_2.
\label{eq-6.A.4}
\end{equation}
Without any loss of the generality one can assume that
\begin{equation}
\begin{aligned}
&y\_1(x\_0)=1, &&y'\_1(x\_0)=0,\\\\
&y\_2(x\_0)=0, &&y'\_1(x\_0)=1.
\end{aligned}
\label{eq-6.A.5}
\end{equation}
Indeed, replacing $\\{y\_1(x),y\_2(x)\\}$ by $\\{z\_1(x),z\_2(x)\\}$ with $z\_j=\alpha\_{j1}y\_1+\alpha\_{j2}y\_2$ we reach (\ref{eq-6.A.5}) by solving the systems
\begin{align\*}
&\alpha\_{11}y\_1(x\_0)+\alpha\_{12}y\_2(x\_0)=1, &&& &\alpha\_{21}y\_1(x\_0)+\alpha\_{22}y\_2(x\_0)=0\\\\
&\alpha\_{11}y'\_1(x\_0)+\alpha\_{12}y'\_2(x\_0)=0, &&& &\alpha\_{21}y'\_1(x\_0)+\alpha\_{22}y'_2(x\_0)=1
\end{align\*}
which have unique solutions because $W(y\_1,y\_2;x\_0)\ne 0$.

Then the general solution to (\ref{eq-6.A.2}) is $y=C\_1y\_1+C\_2y\_2$ with constants $C\_1,C\_2$. To find the general solution to (\ref{eq-6.A.1}) we apply method of variations of parameters; then
\begin{equation}
\begin{aligned}
&C'\_1y\_1+C'\_2y\_2=0,\\\\
&C'\_1y'\_1+C'\_2y'\_2=f(x)
\end{aligned}
\label{eq-6.A.6}
\end{equation}
and then
\begin{equation}
C'\_1= -\frac{1}{W} y\_2f,\qquad C'\_2= \frac{1}{W} y\_12f
\label{eq-6.A.7}
\end{equation}
and
\begin{equation}
\begin{aligned}
&C\_1(x)= -\int \_{x\_0}^x \frac{1}{W(x')} y\_2(x')f(x')\,dx'+c\_1,\\\\
&C\_2(x)= \ \ \int \_{x\_0}^x \frac{1}{W(x')} y\_1(x')f(x')\,dx'+c\_2
\end{aligned}
\label{eq-6.A.8}
\end{equation}
and
\begin{equation}
y(x)=\int \_{x\_0}^x G(x;x')f(x')\,dx'+b\_1y\_1(x)+b\_2y\_2(x)
\label{eq-6.A.9}
\end{equation}
with
\begin{equation}
G(x;x')=\frac{1}{W(x')} \bigl(y\_2(x)y\_1(x')-y\_1(x)y\_2(x')\bigr)
\label{eq-6.A.10}
\end{equation}
 and $c\_1=b\_1$, $c\_2=b\_2$ found from initial data.

<a name="def-6.A.1">Definition 1</a>.
$G(x,x')$ is a *Green function* (called in the case of IVP also *Cauchy function*).

This formula (\ref{eq-6.A.9}) could be rewritten as
\begin{equation}
y(x)=\int \_{x\_0}^x G(x;x')f(x')\,dx'+G'_x(x;x\_0)b\_1 +G(x;x\_0)b\_2.
\label{eq-6.A.11}
\end{equation}

####[BVP](id:sect-6.A.3)
Consider equation (\ref{eq-6.A.1}) with the boundary conditions
\begin{equation}
y(x\_1)=b\_1,\qquad y(x\_2)=b\_2
\label{eq-6.A.12}
\end{equation}
where $x\_1< x\_2$ are the ends of the segment $[x\_1,x\_2]$.


Consider first homogeneous equation (\ref{eq-6.A.2}); then $y=c\_1y\_1+c\_2y\_2$ and (\ref{eq-6.A.12}) becomes
\begin{equation\*}
\begin{aligned}
&c\_1y\_1(x\_1)+c\_2y\_2(x\_1)=b\_1,\\\\
&c\_1y\_1(x\_2)+c\_2y\_2(x\_2)=b\_2
\end{aligned}
\end{equation\*}
and this system is solvable for any $b\_1,b\_2$ and this solution is unique if and only if determinant is not $0$:
\begin{equation}
\left|\begin{matrix} y\_1(x\_1) & y\_2(x\_1)\\\\y\_1(x\_2) & y\_2(x\_2)\end{matrix}\right|\ne 0.
\label{eq-6.A.13}
\end{equation}
Assume that this condition is fulfilled. Then without any loss of the generality one can assume that
\begin{equation}
y\_1(x\_1)=1,\quad y\_1(x\_2)=0, \quad y\_2(x\_1)=0,\quad y\_2(x\_2)=1;
\label{eq-6.A.14}
\end{equation}
otherwise as before we can replace them by their linear combinations. Consider inhomogeneous equation. Solving it by method of variations of parameters we have again (\ref{eq-6.A.7}) but its solution we write in a form slightly different from
(\ref{eq-6.A.8})
\begin{equation}
\begin{aligned}
&C\_1(x)= -\int \_{x\_1}^x \frac{1}{W(x')} y\_2(x')f(x')\,dx'+c\_1,\\\\
&C\_2(x)= -\int \_x^{x\_2} \frac{1}{W(x')} y\_1(x')f(x')\,dx'+c\_2.
\end{aligned}
\label{eq-6.A.15}
\end{equation}
Then
\begin{equation}
y(x)=\int \_{x\_1}^{x\_2} G(x;x')f(x')\,dx'+c\_1y\_1(x)+c\_2y\_2(x)
\label{eq-6.A.16}
\end{equation}
where
\begin{equation}
G(x;x')=-\frac{1}{W(x')} \left\\{\begin{aligned}
&y\_2(x')y\_1(x) && x\_1<x'<x,\\\\
&y\_1(x')y\_2(x)&& x<x'<x\_2.
\end{aligned}\right.
\label{eq-6.A.17}
\end{equation}
From boundary conditions one can check easily that $c\_1=b\_1$, $c\_2=b\_2$. One can also $y\_1(x)= -G'\_{x'}(x;x')|\_{x'=x\_1}$, $y\_2(x)=-G'\_{x'}(x;x')|\_{x'=x\_2}$ and therefore
\begin{multline}
y(x)=\int \_{x\_1}^{x\_2} G(x;x')f(x')\,dx'\\\\
-G'\_{x'}(x;x')|\_{x'=x\_1} b\_1+ G'\_{x'}(x;x')|_{x'=x\_2} b\_2.\qquad\qquad
\label{eq-6.A.18}
\end{multline}

<a name="def-6.A.2">Definition 2</a>.
$G(x,x')$ is a *Green function*.

###[BVP. II](id:sect-6.A.4)
Assume now that (\ref{eq-6.A.13}) is violated. Then we cannot expect that the problem is uniquely solvable but let us salvage what we can. Without any loss of the generality we can assume now that
\begin{equation}
 y\_2(x\_1)= y\_2(x\_2)=0;
\label{eq-6.A.19}
\end{equation}
Using for a solution the same formulae (\ref{eq-6.A.8}),  (\ref{eq-6.A.10}) but with $x\_0$ replaced by $x\_1$, plugging into boundary conditions and using (\ref{eq-6.A.19}) we have
\begin{equation\*}
c\_1y\_1(x\_1)=b\_1,
\qquad\bigl(c\_1-\int\_{x\_1}^{x\_2}\frac{1}{W(x')}y\_2(x')\,dx'\bigr)y\_1(x\_2)=b\_2
\end{equation\*}
which could be satisfied if and only iff
\begin{equation}
\int\_{x\_1}^{x\_2}\frac{1}{W(x')}y\_2(x')\,dx'-\frac{b\_1}{y\_1(x\_1)}+\frac{b\_2}{y\_1(x\_2)}=0
\label{eq-6.A.20}
\end{equation}
but solution is not unique: it is defined modulo $c\_2 y\_2(x)$.

**[Remark 1](id:rem-6.A.1)**
More general boundary conditions
\begin{equation}
\alpha\_1 y'(x\_1)+\beta\_1y(x\_1)=b\_1,\qquad \alpha\_2 y'(x\_2)+\beta\_2y(x\_2)=b\_2
\label{eq-6.A.21}
\end{equation}
 could be analyzed in a similar way.
<!--\end{remark}-->


---------------

[$\Leftarrow$]([$\Uparrow$](../contents.html)&nbsp;&nbsp;[$\uparrow$](./S6.1.html)&nbsp;&nbsp;[$\Rightarrow$](./S6.2.html)












