<s>[INST] How to solve such a nonlinear ODE, the analytical solution of which is known! I have the following ODE with initial/boundary value conditions:
$$\left. \begin{aligned}
\left(x^2-10 x-y^2\right)y\, y'(x)+(x-5) y^2 y'(x)^2-(x-5) y^2=0
;\qquad (\text{ODE})\\
y(0)^2=25;\qquad y'(0)^2=\frac{3-\sqrt{5}}{2} \qquad\qquad\qquad (\text{IBCs})
\end{aligned}
\right\}
$$
How to solve such a nonlinear ODE?
Additionally, how can I verify whether a special function is a potential solution or not, e.g., the one in implicit form as below:
$$\left(\sqrt{5}-1\right)\left(x-5\right)^2+2 y^2=25\left(\sqrt{5}+1\right)$$
UPDATE$^{(1)}$
By substituting $y^2$ and $y\,y'(x)$ obtained from the special solution into the original ODE and its IBCs, it seems this is the solution to the original nonlinear ODE problem.
So the only question remaining is how to solve it to obtain the known solution.
UPDATE$^{(2)}$
Below is another solution to the same ODE with the same IBCs:
$$\left(\sqrt{5}+1\right)\left(x-5\right)^2-2 y^2=25\left(\sqrt{5}-1\right)$$
The problem has double solutions:

 [/INST] Let $U = x^2 + y^2$ and $V = (x-10)^2 + y^2$.
Multiply the equation by $20$ and look at individual terms, we have:
$$\begin{align}
20(x-5) (yy')^2 
&= \left[(x^2+y^2) - ((x-10)^2+y^2)\right] (yy')^2\\
&= (U-V)(yy')^2\\
\\
20(x^2 - 10x - y^2) yy'
&= 2yy'\left[(x-10)\left(x^2+y^2\right) - x\left((x-10)^2+y^2\right)\right]\\
&= 2yy'\left[(x-10)U - xV\right]\\
\\
-20(x-5)  y^2
&= ((x-10)^2 - x^2)y^2\\
&= (x-10)^2 U - x^2 V
\end{align}$$
So the ODE is equivalent to
$$U ( (yy')^2 + 2(x-10) + (x-10)^2 ) -
V ( (yy')^2 + 2x + x^2 ) = 0\\
\iff U (x - 10 + yy')^2 - V(x + yy')^2 = 0$$
Since $U' = 2(x + yy')$ and $V' = 2(x - 10 + yy')$, this leads to
$$U (V')^2 - V(U')^2 = 0
\quad\iff\quad  \frac{V'}{\sqrt{V}} \pm \frac{U'}{\sqrt{U}} = 0
\quad\iff\quad  (\sqrt{V} \pm \sqrt{U})' = 0
$$
and hence the solution of the ODE is given by either 
$$
\sqrt{(x-10)^2 + y^2} + \sqrt{x^2+y^2} = \text{const}\\
\text{OR}\\
\sqrt{(x-10)^2 + y^2} - \sqrt{x^2+y^2} = \text{const}\\
$$
i.e. an ellipse or a hyperbola.
</s>