An ODE that is solved "apparently" correctly, but gives the wrong result

72 Views Asked by At

I wanted to solve

\begin{equation} y''+\frac{1}{x}y'=0 \end{equation}

and thought immediately about subsitution $y''=w'$,

\begin{equation} w'+\frac{1}{x}w=0\\ \frac{w'}{w}=-\frac{1}{x}\\ \ln|w|=\frac{1}{x^2} \\ w=e^{\frac{1}{x^2}} \\ \text{make the back-substitution } w=y'\\ y'=Ce^{\frac{1}{x^2}} \\ y=Ce^{\frac{1}{x^2}}x-\sqrt{\pi}\operatorname{erf}\frac{1}{x}+D \end{equation}

Although this procedure is correct, the answer is wrong.

Still, if I do substitution but use integrating factor, I also get the wrong answer:

\begin{equation} w'+\frac{1}{x}w=0\\ \text{integrating factor}: e^{\int\frac{1}{x}dx} \\ \bigg(w e^{e^{-\frac{1}{r^2}}}\bigg)'=0\\ w e^{e^{-\frac{1}{r^2}}}=C\\\text{make the back-substitution } w''=y'\\ y'=Ce^{\frac{1}{x^2}}\\ y=Ce^{\frac{1}{x^2}}x-\sqrt{\pi}\operatorname{erf}\frac{1}{x}+D \end{equation}

So two right procedures, and two wrong answers.

Any hints ?

Thanks

1

There are 1 best solutions below

1
On BEST ANSWER

The primitive or anti-derivative of $\frac1x$ is $\ln|x|$. It is the derivative that is $-\frac1{x^2}$.

Also note that $xy''+y'=(xy')'$.