I was reading this Wikipedia article. I tried to adopt the same method that they used to solve the following diffrential equation:
$$y\frac {d^2(y)}{dx^2}+{(\frac {dy}{dx})}^2+y^2=0$$ Putting $y=e^{rx}$ and then taking out $e^{2rx}$ outside with $2r^2+1$ inside. Solving for $r$ we get $y=e^{\frac{ix}{\sqrt 2}}$ or $y=e^{-\frac{ix}{\sqrt 2}}$ and when we combine both results as one and apply euler form of complex number we get $$y=a\cos {\frac{x}{\sqrt 2}} + b\sin {\frac{x}{\sqrt 2}}$$ but when I used Wolfram Alpha (computational software) to verify my solution by plugging in the solution into the diffrential equation I don't get $0$ but $1$. I am not able to identify what I did wrong. It would be very nice if you could help me with identifying my mistake. Thanks a lot.
Your equation is not linear...
$$y\frac {d^2(y)}{dx^2}+{(\frac {dy}{dx})}^2+y^2=0$$ $$\color {red} {y''y+(y')^2}+y^2=0$$ $$ \color {red}{(y'y)'}+y^2=0$$ $$ (2y'y)'+2y^2=0$$ $$((y^2))''+2y^2=0$$ Substitute $u=y^2$ $$u''+2u=0$$ This is linear.... $$r^2+2=0 \implies r=\pm i\sqrt 2$$ $$\implies u=c_1\cos(\sqrt 2 x)+c_2 \sin ( \sqrt 2 x)$$ $$\boxed {y^2(x)=c_1\cos(\sqrt 2 x)+c_2 \sin ( \sqrt 2 x)}$$
Another method is
$$y'=\frac {dy}{dx}=p $$ And $$y''=\frac {dp}{dx}=\frac {dp}{dy}\frac {dy}{dx}=pp'_y$$ The equation becomes $$pp'y+p^2+y^2=0$$ Note that $(p^2)'=2pp'$ $$\frac 12 (p^2)'y+(p^2)+y^2=0$$ Substitute $u=p^2$ $$ u'+2\frac uy=-2y$$ Its linear of first order...