<s>[INST] $y''+y'^{2}+y=0$ equation solution How would you solve this differential equation $y''+y'^{2}+y=0$? I can't apply the ansatz method (or more formally apply the characteristic polynomial method). Thanks
 [/INST] $$
y'' + y'^2 + y = 0
$$
we can rewrite as this (prove it)
$$
\frac{1}{2}\frac{d}{dy}p^2 + p^2 + y = \frac{d}{dy}p^2 + 2p^2 + 2y = 0
$$
where $p = y'$.
$$
p^2 = \mathrm{e}^{-2y}\left(-\int 2y\mathrm{e}^{2y}dy + C \right)
$$
thus solution  in terms of $p$
$$
p = \sqrt{\frac{1}{2} -y + C\mathrm{e}^{-2y}} = y'
$$
or
$$
\int \frac{dy}{\sqrt{\frac{1}{2} -y + C\mathrm{e}^{-2y}}} = \int dx = x + \lambda
$$
now the lhs probably has no closed form but if choose the special case $C=0$
$$
\int \frac{dy}{\sqrt{\frac{1}{2}-y}} = -2\left(\frac{1}{2}-y\right)^{1/2} = x + \lambda
$$
thus
$$
\frac{1}{2} - y = \left(-\frac{x}{2} + \lambda_1\right)^2 = \frac{x^2}{4} -\lambda_1 x + \lambda_1^2 
$$
or
$$
y = -\frac{x^2}{4} +\lambda_1 x - \lambda_1^2 +\frac{1}{2}
$$
</s>