= Solution
For the <outer expansion>, the first-order reduced <ordinary differential equation> gives $w_0=e^{-x^2}$ after imposing the right <boundary condition>. Its first correction satisfies
$$
w_1'+2xw_1=-xw_0''=2x(1-2x^2)e^{-x^2},\qquad w_1(1)=0.
$$
An integrating factor gives
$$
\boxed{w_{\mathrm{out}}(x)=e^{-x^2}\left[1+\varepsilon x^2(1-x^2)\right]+O(\varepsilon^2),\qquad x>0\text{ fixed}.}
$$
The left boundary is at $x=\varepsilon$, where the highest-derivative coefficient is already $\varepsilon^2$. Balancing that coefficient against $w'$ gives a layer of width $\varepsilon^2$, not $\varepsilon$. This is a <boundary layer around a moving endpoint>:
$$
z=\frac{x-\varepsilon}{\varepsilon^2},\qquad W(z)=w(\varepsilon+\varepsilon^2z),\qquad (1+\varepsilon z)W''+W'+2\varepsilon^3(1+\varepsilon z)W=0.
$$
At leading order $W_0''+W_0'=0$, and matching to the outer limit one while setting $W_0(0)=0$ gives $W_0=1-e^{-z}$. The first correction satisfies
$$
W_1''+W_1'=-zW_0''=ze^{-z}.
$$
Direct differentiation of $-z(z+2)e^{-z}/2$ verifies the forcing. It vanishes both at zero and at infinity, so no homogeneous term is needed. The requested <inner expansion> is
$$
\boxed{w_{\mathrm{in}}(\varepsilon+\varepsilon^2z)=1-e^{-z}-\frac\varepsilon2z(z+2)e^{-z}+O(\varepsilon^2),\qquad z=O(1).}
$$
Its order-$\varepsilon$ overlap constant is zero, agreeing with the <outer expansion> at the moving endpoint. The overlap can be chosen with $1\ll z\ll\varepsilon^{-1}$.
An independent scaling check drops the reaction term only in the layer and integrates $\varepsilon xw''+w'=0$. Its decaying fast solution is proportional to $(x/\varepsilon)^{1-1/\varepsilon}$. Since
$$
(1+\varepsilon z)^{1-1/\varepsilon}=e^{-z}\left[1+\varepsilon\left(z+\frac12z^2\right)+O(\varepsilon^2)\right],
$$
it gives exactly the same first correction. A useful <additive composite expansion>, with the left boundary value made exact, is
$$
w_{\mathrm{comp}}(x)=w_{\mathrm{out}}(x)-w_{\mathrm{out}}(\varepsilon)e^{-z}\left[1+\frac\varepsilon2z(z+2)\right].
$$
The exponentially small remainder at the right endpoint is beyond all retained algebraic orders.
Back to article page