I'm trying to solve this differential equation with respect to $x$
$$ \frac{d^2y}{dx^2}-\bigg(\frac{dy}{dx}\bigg)^2-\frac{1}{x}\frac{dy}{dx}=\frac{1}{x^2} $$
With boundary condition $y(1)=2, y'(1)=-2$. Mathematica v10.0.0 was able to produce the correct solution, but with a warning that doesn't make much sense to me
Solve::incnst: "Inconsistent or redundant transcendental equation. After reduction, the bad equation is 1-C[1] == 0"
This is my code
DSolve[{y''[x] - y'[x]^2 - y'[x]/x == 1/x^2, y[1] == 2, y'[1] == -2},y[x], x]
(*{{y[x] -> 2 - Log[x] - Log[1 + Log[x]]}}*)
Plus, if I substitute $1/x^2$ on the RHS with $a/x^2$, the solution by DSolve
won't include the case where $a=1$.
DSolve[{y''[x] - y'[x]^2 - y'[x]/x == a/x^2}, y[x], x]
% /. a -> 1
(*{{y[x] -> C[2] + 1/2 (2 (-1 + Sqrt[1 - a]) Log[x] - 2 Log[x^(2 Sqrt[1 - a]) + C[1]])}}*)
(*{{y[x] -> C[2] + 1/2 (-2 Log[x] - 2 Log[1 + C[1]])}}*)
Is this a bug or should it be expected for DSolve
?