Consider the first order ODE: $$ \frac{dy}{dx} = \frac{-\varepsilon y(1-x)^3-y^2(1+x)-2x(1-x)^4+x(1-x)^3}{yx(1-x)} \tag{1}$$ where $ x \in [0,\,1)$ and $\varepsilon <<1$. We substitute in the regular perturbation expansion: $$ y(x) = y_0(x) + \varepsilon y_1(x) + O(\varepsilon^2) \tag{2}$$ in to the ODE above and obtain the leading order differential equation: $$ y_0x(1-x)\frac{dy_0}{dx} = -y_0^2(1+x)-2x(1-x)^4+x(1-x)^3.\tag{3} $$ The solutions to this ODE can be found by using MATLABs dsolve, which gives: $$ y_0 = \pm \frac{1}{x}\sqrt{(x^2-2x+1)\big(C+6x+8\ln (x-1)-\frac{2}{x-1}+2x^2\big)}.\tag{4}$$
Question:
My problem is valid only for $x \in [0,\,1)$, and one can clearly see that the leading order solution can not be evaluted here. For example, the $8\ln(x-1)$ term is undefined. I believe that a solution to this ODE does exist, so do I need to do readjust the expansion I have done or should I use a different asymptotic method to approach this problem? in particular, I notice that the point $x=0$ is a singular point for the ODE in equation (1) and I'm sure this comes in to it. Any suggestions are welcome.
The leading order solution (4) can be evaluated for $0 \le x < 1$, it's just that $\ln(x-1)$ is complex so you need a complex $C$ to offset that. Or you could equivalently replace $\ln(x-1)$ by $\ln(1-x)$ since $\ln(-t) = \ln(t) + \pi i k$ for odd integer $k$ (depending on which branch of $\ln$ you use).
$$ y_0 = \pm \frac{1}{x}\sqrt{(x^2-2x+1)\big(C+6x+8\ln (1-x)-\frac{2}{x-1}+2x^2\big)}$$
Of more concern is the fact that the quantity you're taking the square root of could become negative at some point, depending on $C$.