# Find location and width of boundary layer

Consider the boundary value problem $$\varepsilon (2y+y'')+2xy'-4x^2=0$$ subject to $y(-1)=2$ and $y(2)=7$, for $-1 \leq x \leq 2$, $\varepsilon \ll 1$.

Find the location and width of the boundary layer.

Can someone guide me on just HOW to do this question please.

Boundary layer means inner solution right? So does that mean we should use the substitution $y=Y$ and $x=x_0 +\varepsilon ^{\alpha} X$? And then solve it at leading order? So if we have $Y \sim Y_0 + \varepsilon Y_1$, we should find $Y_0$?

• The width of the boundary layer will be $O(\epsilon^\alpha)$. You shouldn't need a series for $y$, just $x$. – David Nov 25 '15 at 23:57
• I guess the boundary would be at $x=0$ as the equation changes significantly at $x=0$. – David Nov 25 '15 at 23:58

OK, your outer solution is, at leading order, $$y_0=x^2+C,$$ and matching the left hand boundary condition gives $C=1$, and matching the right hand boundary condition gives $C=3$. So there must be a boundary layer somewhere in order to be able to satisfy both boundary conditions.

Let $x=x_0+\epsilon^\alpha X$, where $x_0$ is the location of the layer (so $-1\leq x_0\leq2$) and $\alpha$ is yet to be determined, but is a positive number. Substituting into the differential equation and expanding gives $$2\epsilon y+\epsilon^{1-2\alpha}y''+2\epsilon^{-\alpha}x_0y'+2Xy'-4x_0^2-8\epsilon^\alpha x_0X-4\epsilon^{2\alpha}X^2=0.$$

There are two cases to consider, if $x_0=0$ or $x_0\neq0$. First, consider $x_0\neq0$. Dominant balance on the scaled equation gives $\alpha=1$, and the leading order equation is $$y''-2x_0y'=0$$ with solution $$y=A\exp(-2x_0X)+B.$$ Immediately, because the solution is exponential, we notice that the layer cannot be internal (except maybe at $x_0=0$, which are not considering here), because it will grow exponentially going out of the layer in one direction. Remember that we need the limit as $X$ goes out of the boundary layer to exist. If the layer is at $x_0>0$, the limit as $X\rightarrow-\infty$ does not exist, and if $x_0$ is negative, the limit as $X\rightarrow\infty$ does not exist. So the layer can't be anywhere except 0.

So $x_0=0$, but this changes the original scaled equation! We now have $$2\epsilon y+\epsilon^{1-2\alpha}y''+2Xy'-4\epsilon^{2\alpha}X^2=0,$$ and dominant balance gives $1-2\alpha=0$, or $\alpha=1/2$. The leading order equation is $$y''+2Xy'=0,$$ which has solution $$y=A\mathrm{erf}(X)+B.$$ Now, we have two outer soluions to match to, $x^2+1$ as $X\rightarrow-\infty$, and $x^2+3$ as $x\rightarrow\infty$. The matching conditions are, to the left, $$\lim_{X\rightarrow-\infty}A\mathrm{erf}(X)+B=\lim_{x\rightarrow0}x^2+1$$ which gives $-A+B=1$, and to the right, $$\lim_{X\rightarrow\infty}A\mathrm{erf}(X)+B=\lim_{x\rightarrow0}x^2+3$$ which gives $A+B=3$.

Solving these gives $A=1$ and $B=2$. The error function is effectively a jump of height 2, which moves the solution from one parabola to another.

You can make a uniform approximation, using either outer solution, $$y_{unif}(x)=y_{outer}(x)-y_{outer}(0)+y_{inner}(x/\sqrt\epsilon)=x^2+\mathrm{erf}\left(\frac{x}{\sqrt\epsilon}\right)+2.$$

Of course we want to look at a picture too. The numerical solution wasn't easy to get, I usually use a simple shooting method and an ODE solver, but for this I had to use a BVP solver. In this picture, $\epsilon=0.01$ (boundary layer $\sim0.1$ wide) I also used symbolic algebra to calculate the residual when you substitute $y_{unif}$ into the original differential equation. The result was $$2\epsilon\left(\mathrm{erf}\left(\frac{x}{\sqrt\epsilon}\right) + x^2 + 3\right)$$ which is indeed $O(\epsilon)$ in $[-1,2]$, so everything looks alright.

• Very nice (+1)! – tired Nov 26 '15 at 10:01
• @David should it not be $-4 \varepsilon ^{2 \alpha} X^2$ instead of $-2\varepsilon ^{2 \alpha} X^2$, on the equations. – snowman Nov 30 '15 at 0:21
• @David Wait so what is exactly the location and width of the boundary layer??? – snowman Nov 30 '15 at 0:30
• Yes to the $-4\epsilon^{2\alpha}X^2$. The boundary layer is at $x=0$ and has width $\sim\epsilon^{1/2}$. – David Nov 30 '15 at 3:28
• @David Hi, just wondering, would you be able to help with partial differential equations? – snowman Dec 1 '15 at 18:43