4.8 note p7 added 2/15/17, boundary layer problem solved in details

PDF (letter size)
PDF (lega size)

This note solves\begin{align*} \varepsilon y^{\prime \prime }\left ( x\right ) +\left ( 1+x\right ) y^{\prime }\left ( x\right ) +y\left ( x\right ) & =0\\ y\left ( 0\right ) & =1\\ y\left ( 1\right ) & =1 \end{align*}

Where \(\varepsilon \) is small parameter, using boundary layer theory.

4.8.0.1 Solution

Since \(\left ( 1+x\right ) >0\) in the domain, we expect boundary layer to be on the left. Let \(y_{out}\left ( x\right ) \) be the solution in the outer region. Starting with \(y\left ( x\right ) =\sum _{n=0}^{\infty }\varepsilon ^{n}y_{n}\) and substituting back into the ODE gives\[ \varepsilon \left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\left ( 1+x\right ) \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) =0 \] \(O\left ( 1\right ) \) terms

Collecting all terms with zero powers of \(\varepsilon \)\[ \left ( 1+x\right ) y_{0}^{\prime }+y_{0}=0 \] The above is solved using the right side conditions, since this is where the outer region is located. Solving the above using \(y_{0}\left ( 1\right ) =1\) gives\[ y_{0}^{out}\left ( x\right ) =\frac{2}{1+x}\] Now we need to find \(y_{in}\left ( x\right ) \). To do this, we convert the ODE using transformation \(\xi =\frac{x}{\varepsilon }\). Hence \(\frac{dy}{dx}=\frac{dy}{d\xi }\frac{d\xi }{dx}=\frac{dy}{d\xi }\frac{1}{\varepsilon }\). Hence the operator \(\frac{d}{dx}\equiv \frac{1}{\varepsilon }\frac{d}{d\xi }\). This means the operator \(\frac{d^{2}}{dx^{2}}\equiv \left ( \frac{1}{\varepsilon }\frac{d}{d\xi }\right ) \left ( \frac{1}{\varepsilon }\frac{d}{d\xi }\right ) =\frac{1}{\varepsilon ^{2}}\frac{d^{2}}{d\xi ^{2}}\). The ODE becomes\begin{align*} \varepsilon \frac{1}{\varepsilon ^{2}}\frac{d^{2}y\left ( \xi \right ) }{d\xi ^{2}}+\left ( 1+\xi \varepsilon \right ) \frac{1}{\varepsilon }\frac{dy\left ( \xi \right ) }{d\xi }+y\left ( \xi \right ) & =0\\ \frac{1}{\varepsilon }y^{\prime \prime }+\left ( \frac{1}{\varepsilon }+\xi \right ) y^{\prime }+y & =0 \end{align*}

Plugging \(y\left ( \xi \right ) =\sum _{n=0}^{\infty }\varepsilon ^{n}y\left ( \xi \right ) _{n}\) into the above gives\begin{align*} \frac{1}{\varepsilon }\left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\left ( \frac{1}{\varepsilon }+\xi \right ) \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) & =0\\ \frac{1}{\varepsilon }\left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\frac{1}{\varepsilon }\left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\xi \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) & =0 \end{align*}

Collecting all terms with smallest power of \(\varepsilon \) , which is \(\varepsilon ^{-1}\) in this case, gives\begin{align*} \frac{1}{\varepsilon }y_{0}^{\prime \prime }+\frac{1}{\varepsilon }y_{0}^{\prime } & =0\\ y_{0}^{\prime \prime }+y_{0}^{\prime } & =0 \end{align*}

Let \(z=y_{0}^{\prime }\), the above becomes\begin{align*} z^{\prime }+z & =0\\ d\left ( e^{\xi }z\right ) & =0\\ e^{\xi }z & =c\\ z & =ce^{-\xi } \end{align*}

Hence \(y_{0}^{\prime }\left ( \xi \right ) =ce^{-\xi }\). Integrating \begin{equation} y_{0}^{in}\left ( \xi \right ) =-ce^{-\xi }+c_{1}\tag{1A} \end{equation} Since \(c\) is arbitrary constant, the negative sign can be removed, giving\begin{equation} y_{0}^{in}\left ( \xi \right ) =ce^{-\xi }+c_{1}\tag{1A} \end{equation} This is the lowest order solution for the inner \(y^{in}\left ( \xi \right ) \). We have two boundary conditions, but we can only use the left side one, where \(y_{in}\left ( \xi \right ) \) lives. Hence using \(y_{0}\left ( \xi =0\right ) =1\), the above becomes\begin{align*} 1 & =c+c_{1}\\ c_{1} & =1-c \end{align*}

The solution (1A) becomes\begin{align*} y_{0}\left ( \xi \right ) & =ce^{-\xi }+\left ( 1-c\right ) \\ & =1+c\left ( e^{-\xi }-1\right ) \end{align*}

Let \(c=A_{0}\) to match the book notation.\[ y_{0}\left ( \xi \right ) =1+A_{0}\left ( e^{-\xi }-1\right ) \] To find \(A_{0}\), we match \(y_{0}^{in}\left ( \xi \right ) \) with \(y_{0}^{out}\left ( x\right ) \)\begin{align*} \lim _{\xi \rightarrow \infty }1+A_{0}\left ( e^{-\xi }-1\right ) & =\lim _{x\rightarrow 0^{+}}\frac{2}{1+x}\\ 1-A_{0} & =2\\ A_{0} & =-1 \end{align*}

Hence \[ y_{0}^{in}\left ( \xi \right ) =2-e^{-\xi }\] \(O\left ( \varepsilon \right ) \) terms

We now repeat the process to find \(y_{1}^{in}\left ( \xi \right ) \) and \(y_{1}^{out}\left ( x\right ) .\) Starting with \(y^{out}\left ( x\right ) \)\[ \varepsilon \left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\left ( 1+x\right ) \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) =0 \] Collecting all terms with \(\varepsilon ^{1}\) now\begin{align*} \varepsilon y_{0}^{\prime \prime }+\left ( 1+x\right ) \varepsilon y_{1}^{\prime }+\varepsilon y_{1} & =0\\ y_{0}^{\prime \prime }+\left ( 1+x\right ) y_{1}^{\prime }+y_{1} & =0 \end{align*}

But we know \(y_{0}=\frac{2}{1+x}\), from above. Hence \(y_{0}^{\prime \prime }=\frac{4}{\left ( 1+x\right ) ^{3}}\) and the above becomes\begin{align*} \left ( 1+x\right ) y_{1}^{\prime }+y_{1} & =-\frac{4}{\left ( 1+x\right ) ^{3}}\\ y_{1}^{\prime }+\frac{y_{1}}{1+x} & =-\frac{4}{\left ( 1+x\right ) ^{4}} \end{align*}

Integrating factor \(\mu =e^{\int \frac{1}{1+x}dx}=e^{\ln \left ( 1+x\right ) }=1+x\) and the above becomes\begin{align*} \frac{d}{dx}\left ( \mu y_{1}\right ) & =-\mu \frac{4}{\left ( 1+x\right ) ^{4}}\\ \frac{d}{dx}\left ( \left ( 1+x\right ) y_{1}\right ) & =-\frac{4}{\left ( 1+x\right ) ^{3}} \end{align*}

Integrating\begin{align*} \left ( 1+x\right ) y_{1} & =-\int \frac{4}{\left ( 1+x\right ) ^{3}}dx+c\\ & =\frac{2}{\left ( 1+x\right ) ^{2}}+c \end{align*}

Hence \[ y_{1}\left ( x\right ) =\frac{2}{\left ( 1+x\right ) ^{3}}+\frac{c}{1+x}\] Applying \(y\left ( 1\right ) =0\) (notice the boundary condition now becomes \(y\left ( 1\right ) =0\) and not \(y\left ( 1\right ) =1\), since we have already used \(y\left ( 1\right ) =1\) to find leading order). From now on, all boundary conditions will be \(y\left ( 1\right ) =0\).\begin{align*} 0 & =\frac{2}{\left ( 1+1\right ) ^{3}}+\frac{c}{1+1}\\ c & =-\frac{1}{2} \end{align*}

Hence\[ y_{1}\left ( x\right ) =\frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2}\frac{1}{\left ( 1+x\right ) }\] Now we need to find \(y_{1}^{in}\left ( \xi \right ) \). To do this, starting from\begin{align*} \frac{1}{\varepsilon }\left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\left ( \frac{1}{\varepsilon }+\xi \right ) \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) & =0\\ \frac{1}{\varepsilon }\left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\frac{1}{\varepsilon }\left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\xi \left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) & =0 \end{align*}

But now collecting all terms with \(O\left ( 1\right ) \) order, (last time, we collected terms with \(O\left ( \varepsilon ^{-1}\right ) \) ).\begin{align} y_{1}^{\prime \prime }+y_{1}^{\prime }+\xi y_{0}^{\prime }+y_{0} & =0\nonumber \\ y_{1}^{\prime \prime }+y_{1}^{\prime } & =-\xi y_{0}^{\prime }-y_{0}\tag{1} \end{align}

But we found \(y_{0}^{in}\) earlier which was \[ y_{0}^{in}\left ( \xi \right ) =1+A_{0}\left ( e^{-\xi }-1\right ) \] Hence \(y_{0}^{\prime }=-A_{0}e^{-\xi }\) and the ODE (1) becomes\[ y_{1}^{\prime \prime }+y_{1}^{\prime }=\xi A_{0}e^{-\xi }-\left ( 1+A_{0}\left ( e^{-\xi }-1\right ) \right ) \] We need to solve this with boundary conditions \(y_{1}\left ( 0\right ) =0\). (again, notice change in B.C. as was mentioned above). The solution is\begin{align*} y_{1}\left ( \xi \right ) & =-\xi +A_{0}\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) +A_{1}\left ( 1-e^{-\xi }\right ) \\ & =-\xi +A_{0}\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) -A_{1}\left ( e^{-\xi }-1\right ) \end{align*}

Since \(A_{1}\) is arbitrary constant, and to match the book, we can call \(A_{2}=-A_{1}\) and then rename \(A_{2}\) back to \(A_{1}\) and obtain\[ y_{1}\left ( \xi \right ) =-\xi +A_{0}\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) +A_{1}\left ( e^{-\xi }-1\right ) \] This is to be able to follow the book. Therefore, this is what we have so far\begin{align*} y_{out} & =y_{0}^{out}+\varepsilon y_{1}^{out}\\ & =\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) \end{align*}

And \begin{align*} y^{in}\left ( \xi \right ) & =y_{0}^{in}+\varepsilon y_{1}^{in}\\ & =\left ( 1+A_{0}\left ( e^{-\xi }-1\right ) \right ) +\varepsilon \left ( -\xi +A_{0}\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) +A_{1}\left ( e^{-\xi }-1\right ) \right ) \\ & =A_{0}e^{-\xi }-\xi \varepsilon -\varepsilon A_{1}-A_{0}+\varepsilon A_{1}e^{-\xi }+\xi \varepsilon A_{0}-\frac{1}{2}\xi ^{2}\varepsilon A_{0}e^{-\xi }+1 \end{align*}

To find \(A_{0},A_{1}\), we match \(y_{in}\) with \(y_{out}\), therefore \[ \lim _{\xi \rightarrow \infty }y_{in}=\lim _{x\rightarrow 0}y_{out}\] Or\begin{multline*} \lim _{\xi \rightarrow \infty }\left ( A_{0}e^{-\xi }-\xi \varepsilon -\varepsilon A_{1}-A_{0}+\varepsilon A_{1}e^{-\xi }+\xi \varepsilon A_{0}-\allowbreak \frac{1}{2}\xi ^{2}\varepsilon A_{0}e^{-\xi }+1\right ) =\\ \lim _{x\rightarrow 0}\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) \end{multline*} Which simplifies to\[ -\xi \varepsilon -\varepsilon A_{1}-A_{0}+\xi \varepsilon A_{0}+1=\lim _{x\rightarrow 0}\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) \] It is easier now to convert the LHS to use \(x\) instead of \(\xi \) so we can compare. Since \(\xi =\frac{x}{\varepsilon }\), then the above becomes\[ -x-\varepsilon A_{1}-A_{0}+xA_{0}+1=\lim _{x\rightarrow 0}\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) \] Using Taylor series on the RHS\begin{multline*} 1-A_{0}-x+A_{0}x+A_{1}\varepsilon =\lim _{x\rightarrow 0}2\left ( 1-x+x^{2}+\cdots \right ) \\ +2\varepsilon \left ( 1-x+x^{2}+\cdots \right ) \left ( 1-x+x^{2}+\cdots \right ) \left ( 1-x+x^{2}+\cdots \right ) -\frac{\varepsilon }{2}\left ( 1-x+x^{2}+\cdots \right ) \end{multline*} Since we have terms on the the LHS of only \(O\left ( 1\right ) ,O\left ( x\right ) ,O\left ( \varepsilon \right ) \), then we need to keep at least terms with \(O\left ( 1\right ) ,O\left ( x\right ) ,O\left ( \varepsilon \right ) \) on the RHS and drop terms with \(O\left ( x^{2}\right ) ,O\left ( \varepsilon x\right ) ,O\left ( \varepsilon ^{2}\right ) \) to be able to do the matching. So in the above, RHS simplifies to\begin{align*} -x-\varepsilon A_{1}-A_{0}+xA_{0}+1 & =2\left ( 1-x\right ) +2\varepsilon -\frac{\varepsilon }{2}\\ -x-\varepsilon A_{1}-A_{0}+xA_{0}+1 & =2-2x+2\varepsilon -\frac{\varepsilon }{2}\\ -\varepsilon A_{1}-A_{0}+x\left ( A_{0}-1\right ) +1 & =2-2x+\frac{3}{2}\varepsilon \end{align*}

Comparing, we see that \begin{align*} A_{0}-1 & =-2\\ A_{0} & =-1 \end{align*}

We notice this is the same \(A_{0}\) we found for the lowest order. This is how it should always come out. If we get different value, it means we made mistake. We could also match \(-A_{0}+1=2\) which gives \(A_{0}=-1\) as well. Finally \begin{align*} -\varepsilon A_{1} & =\frac{3}{2}\varepsilon \\ A_{1} & =-\frac{3}{2} \end{align*}

So we have used matching to find all the constants for \(y_{in}\). Here is the final solution so far

\begin{align*} y_{out}\left ( x\right ) & =\overset{y_{0}}{\overbrace{\frac{2}{1+x}}}+\varepsilon \overset{y_{1}}{\overbrace{\left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) }}\\ y_{in}\left ( \xi \right ) & =\overset{y_{0}}{\overbrace{1+A_{0}\left ( e^{-\xi }-1\right ) }}+\varepsilon \overset{y_{1}}{\overbrace{\left ( -\xi +A_{0}\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) +A_{1}\left ( e^{-\xi }-1\right ) \right ) }}\\ & =1-\left ( e^{-\xi }-1\right ) +\varepsilon \left ( -\xi -\left ( \xi -\frac{1}{2}\xi ^{2}e^{-\xi }\right ) -\frac{3}{2}\left ( e^{-\xi }-1\right ) \right ) \\ & =\frac{3}{2}\varepsilon -e^{-\xi }-2\xi \varepsilon -\frac{3}{2}\varepsilon e^{-\xi }+\frac{1}{2}\xi ^{2}\varepsilon e^{-\xi }+\allowbreak 2 \end{align*}

In terms of \(x\), since Since \(\xi =\frac{x}{\varepsilon }\) the above becomes\begin{align*} y_{in}\left ( x\right ) & =\frac{3}{2}\varepsilon -e^{-\frac{x}{\varepsilon }}-2x-\frac{3}{2}\varepsilon e^{-\frac{x}{\varepsilon }}+\frac{1}{2}\frac{x^{2}}{\varepsilon }e^{-\frac{x}{\varepsilon }}+\allowbreak 2\\ & =2-2x+\frac{3}{2}\varepsilon +e^{-\frac{x}{\varepsilon }}\left ( \frac{1}{2}\frac{x^{2}}{\varepsilon }-\frac{3}{2}\varepsilon -1\right ) \end{align*}

Hence \[ y_{uniform}=y_{in}+y_{out}-y_{match}\] Where \begin{align*} y_{match} & =\lim _{\xi \rightarrow \infty }y_{in}\\ & =2-2x+\frac{3}{2}\varepsilon \end{align*}

Hence\begin{align*} y_{uniform} & =2-2x+\frac{3}{2}\varepsilon +e^{-\frac{x}{\varepsilon }}\left ( \frac{1}{2}\frac{x^{2}}{\varepsilon }-\frac{3}{2}\varepsilon -1\right ) +\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) -\left ( 2-2x+\frac{3}{2}\varepsilon \right ) \\ & =e^{-\frac{x}{\varepsilon }}\left ( \frac{1}{2}\frac{x^{2}}{\varepsilon }-\frac{3}{2}\varepsilon -1\right ) +\frac{2}{1+x}+\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }\right ) \\ & =\left ( \frac{2}{1+x}-e^{-\frac{x}{\varepsilon }}+\frac{1}{2}\frac{x^{2}}{\varepsilon }e^{-\frac{x}{\varepsilon }}\right ) +\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }-\frac{3}{2}e^{-\frac{x}{\varepsilon }}\right ) \end{align*}

Which is the same as\begin{align} y_{uniform} & =\left ( \frac{2}{1+x}-e^{-\xi }+\frac{1}{2}\frac{x^{2}}{\varepsilon }e^{-\xi }\right ) +\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }-\frac{3}{2}e^{-\xi }\right ) \nonumber \\ & =\left ( \frac{2}{1+x}-e^{-\xi }\right ) +\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }-\frac{3}{2}e^{-\xi }+\frac{1}{2}\xi ^{2}e^{-\xi }\right ) \nonumber \\ & =\left ( \frac{2}{1+x}-e^{-\xi }\right ) +\varepsilon \left ( \frac{2}{\left ( 1+x\right ) ^{3}}-\frac{1}{2\left ( 1+x\right ) }+\left ( \frac{1}{2}\xi ^{2}-\frac{3}{2}\right ) e^{-\xi }\right ) \tag{1} \end{align}

Comparing (1) above, with book result in first line of 9.3.16, page 433, we see the same result.

4.8.0.2 References

1.
Advanced Mathematica methods, Bender and Orszag. Chapter 9.
2.
Lecture notes. Feb 16, 2017. By Professor Smith. University of Wisconsin. NE 548