Find the 2 term outer solution and one term inner solution for (using matched expansions)
$$ (1+\epsilon)x^2y'=\epsilon((1-\epsilon)xy^2-(1+\epsilon)x+y^3+2\epsilon y^2), \space \space \space \space y(1)=1$$
where $0<\epsilon <<1$ and $x > 0$
Also find a one term uniformly valid solution.
Thanks in advance
The outer solution is just a normal perturbation problem, let $y(x)=y_0(x)+\epsilon y_1(x)+O(\epsilon^2)$ and look at the $O(\epsilon^0)$ and $O(\epsilon)$ equations. At leading order, you get $$ x^2y_0'=0 $$ with initial condition $y_0(1)=1$. Since $x>0$, this is just $y_0'=0$, so we get $y_0=1$. Then, the $O(\epsilon)$ equation is $$ x^2y_0'+x^2y_1'=xy_0^2-x+y_0^3 $$ with initial condition $y_1(1)=0$. The equation simplifies to $$ y_1'=\frac{1}{x^2} $$ and so $y_1=-1/(3x^3)+A$, and the initial condition gives $A=1/3$.
So the two-term outer solution is $$ y=1+\epsilon\left(\frac{x^3-1}{3x^3}\right)+O(\epsilon^2).$$
Looking at the equation, we see that when $x$ is very small, the equation will change quite a lot. So we expect a boundary layer around $x=0$. Introduce a stretched coordinate $X=x\epsilon^{-\alpha}$ and let $Y(X)=y(x)$. The equation becomes $$\epsilon^{\alpha}(1+\epsilon)X^2Y'=\epsilon^{1+\alpha}(1-\epsilon)XY^2-\epsilon^{1+\alpha}(1+\epsilon)X+\epsilon Y^3+2\epsilon^2Y^2,$$ and so we use dominant balance to find the $\alpha=1$. The equation can now be written $$(1+\epsilon)X^2Y'=\epsilon(1-\epsilon)XY^2-\epsilon(1+\epsilon)X+Y^3+2\epsilon Y^2.$$ Now, write a series for $Y$, $Y=Y_0+\epsilon Y_1+O(\epsilon^2),$ and the leading order equation gives $$ X^2Y_0'=Y_0^3. $$ This is a separable ODE, so it can be integrated to give $$-\frac{1}{2}Y_0^{-2}=-X^{-1}+B$$ which rearranges to $$ Y_0=\sqrt{\frac{X}{2-2BX}}.$$ To determine $B$, we have to do asymptotic matching, $$\lim_{X\rightarrow\infty}Y_0(X)=\lim_{x\rightarrow0^+}y_0(x)\Rightarrow\sqrt{\frac{1}{-2B}}=1,$$ so $B=-1/2$, and $$Y_0=\sqrt{\frac{X}{2+X}}.$$
The uniform approximation is given by $y_{uniform}=y_0(x)+Y_0(X)$ plus a matching constant. In this case, the matching constant is chosen so that $y_{uniform}(1)=1$, so it is $-Y_0(1/\epsilon)=-1/\sqrt{1+2\epsilon}$. The one-term uniform solution is therefore $$ y_{uniform}(x)=1+\sqrt{\frac{x/\epsilon}{2+x/\epsilon}}-\frac{1}{\sqrt{1+2\epsilon}}.$$
Now we can check the results, by solving the equation numerically, and plotting our approximations. The code is
and the resulting plot looks like
so you can see that although the inner and outer approximations don't look that great (they get better away from $x=1$), the uniform approximation is very good.