I am given the following ODE $$ \epsilon \frac{d^2y}{dx^2}+x\frac{dy}{dx}+y=0 \; , \qquad 1<x<2$$
with the BVPs $$y(1)=0 \qquad , \qquad y(2)=1$$
and where $0<\epsilon \ll1$.
I am to use the method of matching inner and outer expansions to solve this.
By letting $y(x,\epsilon) \sim y_0(x)+y_1(x)\epsilon + y_2(x)\epsilon ^2+\cdots$, I have found the leading-order term of the outer expansion to be $2/x$ (and this satisfies only $y(2)=1$).
In computing the inner expansion, I let $x=\epsilon ^a z$ so that we now have $$\epsilon ^{1-2a}\frac{d^2Y}{dz^2}+z\frac{dY}{dz}+Y=0$$
where $Y(z,\epsilon)=y(x,\epsilon)$.
In order to match the orders, we need to choose $a$ such that $1-2a=0$, thus $a=\frac 12$. Plugging this in, we have $$\frac{d^2Y}{dz^2}+z\frac{dY}{dz}+Y=0$$
Letting $Y(z,\epsilon) \sim Y_0(z)+\cdots$, the equation at leading order is simply $$\frac{d^2Y_0}{dz^2}+z\frac{dY_0}{dz}+Y_0=0$$ and solving this gives $$Y_0=e^{-x^2/2}\Bigl(A+B \; \text{erfi} \bigl(\frac{x}{\sqrt 2} \bigr) \Bigr)$$
which doesn't seem to be right. Have I done something wrong? Or, ignoring what I have done, what is the right way to approach this?


For the fast movements of the solution you in general look for local coordinates $x=x_0+ϵ^aX$ which gives for $Y(X)=y(x_0+ϵ^aX)$ $$ ϵ^{1-2a}Y''+(x_0+ϵ^aX)ϵ^{-a}Y'+Y=0\iff ϵ^{1-a}Y''+(x_0+ϵ^aX)Y'+ϵ^{a}Y=0 $$ which gives $a=1$ for the width exponent of the inner solution (as the exceptional point $x_0=0$ is not inside the integration interval). As $x_0>0$ the solution to the equation of the leading terms $Y''+x_0Y'=0$ is $Y(X)=Ce^{-x_0X}+D$. As it is not bounded in direction $X\to-\infty$ the boundary layer has to occur at the left interval end $x_0=1$ with first order approximation of the solution as $$ y(x)=\frac2x -2e^{-(x-1)/ϵ} $$