Solution (source code)

= Solution

For the broad right layer take $\zeta=(x-1)/\sqrt\varepsilon$ and $y=Z(\zeta)$, so $\zeta\leq0$ inside the interval. Its leading equation is $Z''=\sqrt Z$, with $Z(0)=1$. One integration gives $(Z')^2=(4/3)(Z^{3/2}+c)$. The positive derivative branch produces the integral parametrization in the hint.

Matching to a small, nearly flat plateau requires $Z\to0$ and $Z'\to0$ at the inner edge, so \b[the leading integration constant is $c=0$]. A positive order-one $c$ would leave a nonzero slope as $Z\to0$; a negative one would prevent that limit. For $c=0$, integration with $Z(0)=1$ gives
$$
\boxed{Z(\zeta)=\left(1+\frac{\zeta}{2\sqrt3}\right)^4,\qquad -2\sqrt3\leq\zeta\leq0.}
$$
Its zero is at $\zeta=-2\sqrt3$, namely $x=1-2\sqrt{3\varepsilon}$. Near that edge it has the fourth-power overlap obtained in <b/ii/solution>. The neglected $\varepsilon k$ reaction term becomes comparable to $\sqrt Z$ when $Z=O(\varepsilon^2)$, precisely where the thinner transition must restore it. The sketch in <3/solution> shows the plateau and both right-hand regions; extending the quartic profile past its inner edge would fail to match the positive plateau.