I have been asked to determine the first two terms of the outer and inner expansions of the ODE $$\epsilon \frac{d^2y}{dx^2}+\frac{dy}{dx}+\frac{1}{1+x}y=0$$ on $0<x<1$ with $0 < \epsilon \ll 1$ with boundary conditions $y(1)=1, y(0)=0$.
I've worked out the boundary layer is at $x=0$ but I cant get the right answer even for the outer perturbation. I've been told to maybe Taylor expand it but I still can't seem to get it using the expansion $y=y_0+\epsilon y_1$.
The solution is meant to be $y_0=\frac{2}{1 + x}$ which I can get and then I get lost getting $$y_1=\frac{-2}{1+x}+\frac{4}{(1+x)^2}$$ Can anyone see how you can get to this?
Using the expansion $y=y_0+\epsilon y_1$ I have got the equation to be $\epsilon y_0'' + y_0' + \epsilon y_1' + \frac{1}{1+x} y_0 + \frac{1}{1+x} \epsilon y_1=0$.
The peeling off order one I have the equation $y_0'+ \frac{1}{1+x} y_0=0$, which I solved using the integrating factor to get $y_0=\frac{A}{1 + x}$ then used the BC at $x=1$ to get $A=2$.
Next is when I got problems getting the answer as I got order $\epsilon$ to be $y_0''+y_1'+\frac{1}{1+x} y_1=0$.
I got $y_0''=\frac{4}{(1+x)^3}$, so the equation becomes $y_1'+\frac{1}{1+x} y_1=\frac{-4}{(1+x)^3}$ but this is where I am struggling?
The integrating factor is $(1+x)$, so that $$ \frac{d}{dx}((1+x)y_1(x))=(1+x)y_1'(x)+y_1(x)=-\frac4{(1+x)^2} $$ which you can integrate.
Another fast way that sometimes works is the WKB approximation $y=\exp(S/\delta)$ that balances here to $δ=ϵ$ to give as equation for $S$ $$ ϵS''+S'^2+S'+\fracϵ{1+x}=0 $$ Now insert the perturbation expansion $S=S_0+ϵS_1+ϵS_2+\dots$ into the equation and compare powers of $ϵ$. The first is $$ S_0'^2+S_0'=0 $$ with the two solutions $S_0'=0$ corresponding to the outer solution as it has no singular term in $ϵ$ and $S_0'=-1$ which gives the inner solution. Then for the next term $S_1$ we get $$ 2S_0'S_1'+S_1'+S_0''+\frac1{1+x}=0 \implies\begin{cases} S_0=0:&S_1'=-\frac1{1+x},& S_1=-\ln(1+x)\\ S_0=-x:&S_1'=\frac1{1+x},& S_1=\ln(1+x) \end{cases} $$ Up to this point the approximation combining both basis solutions is $$ y=A\frac1{1+x}+B(1+x)e^{-x/ϵ}+O(ϵ). $$ In the next step to determine $S_2$ the equation is $$ S_1'^2+(2S_0'+1)S_2'+S_1''=0 \implies\begin{cases} S_0=0:&S_2'=-\frac2{(1+x)^2},& S_2=\frac2{1+x}\\ S_0=-x:&S_2'=0,& S_2=0 \end{cases} $$ and the approximation improves to $$ y=A\frac1{1+x}\exp\left(\frac{2ϵ}{1+x}\right)+B(1+x)\exp\left(-\frac xϵ\right)+O(ϵ^2). $$ The initial conditions in accuracy $O(ϵ^2)$ lead to $$ 0=y(0)=Ae^{2ϵ}+B,~ 1=y(1)=\frac A2e^{ϵ}\implies A=2e^{-ϵ},~ B=-2e^{ϵ} \\ y(x)=\frac2{1+x}\exp\left(ϵ\frac{1-x}{1+x}\right)-2(1+x)\exp\left(ϵ-\frac xϵ\right)+O(ϵ^2) $$