A question on WKB method. If the differential equation is given by: $\epsilon^2y''+\epsilon xy'-y=-1$ where $y(0)=0$ and  $y(1)=3$. I know we have to take $z=y-1$ in order to make the differential equation homogeneous but I' m struggling to solve it after. It would be great if someone could help me with this WKB approximation. 
Thanks 
 A: With the WKB method you approximate basis solutions of the homogeneous equation $ϵ^2y''+ϵxy'-y=0$. Using $y=\exp(S/\delta)$ you get the equation
$$
ϵ^2(S''/δ+S'^2/δ^2)+ϵxS'/δ-1=0
$$
Using $δ=ϵ$ gives
$$
ϵS''+S'^2+xS'-1=0
$$
Setting $s=S'$ and expanding $s=s_0+ϵs_1+...$ gives the first equation for $s_0$ as 
$$
(2s_0+x)^2=4+x^2\implies s_0=\frac12(-x\pm\sqrt{4+x^2})
$$
then in the next scale
$$
(2s_0+x)s_1=-s_0'\implies s_1=\frac12\frac{\pm\sqrt{4+x^2}-x}{4+x^2}
$$
and so on.
Next integrate to get the components of the exponents, combine to the solution and solve for the boundary conditions. With the anti-derivatives
\begin{align}
\int\sqrt{4+x^2}dx&=\frac x2\sqrt{4+x^2}+2\sinh^{-1}(\frac x2)\\
\int\frac{dx}{\sqrt{4+x^2}}&=2\sinh^{-1}(\frac x2)\\
\int \frac{x\,dx}{4+x^2}&=\frac12\ln(4+x^2)
\end{align}
we get
\begin{align}
y_1(x)&=\frac1{\sqrt[4]{4+x^2}}\exp\left(\frac{x(\sqrt{4+x^2}-x)+4\sinh^{-1}(\frac x2)}{4ϵ}+\sinh^{-1}(\frac x2)\right)
\\[1em]
y_2(x)&=\frac1{\sqrt[4]{4+x^2}}\exp\left(-\frac{x(\sqrt{4+x^2}+x)+4\sinh^{-1}(\frac x2)}{4ϵ}-\sinh^{-1}(\frac x2)\right)
\\[1em]
y(x)&\approx 1+Ay_1(x)+By_2(x)
\end{align}
The first constant $A$ has to be a multiple of $1/y_1(1)$ to get finite values for $ϵ\to 0$. Then the basis functions generate the boundary layers, $y_1$ at $x=1$ and $y_2$ at $x=0$, taking extremely small values outside their boundary layers. Thus $A=2/y_1(1)$ and $B=-1/y_2(0)$.
Implementing this with a boundary value solver shows good coincidence with this WKB approximation for sufficiently small $ϵ$.

