Regarding a basic ODE solution

50 Views Asked by At

I solved a simple separable (and also linear) first-order ODE as follows: $$ \begin{align} \frac{dy}{dx}&=x(1-y) \\ \frac{1}{1-y}\frac{dy}{dx}&=x \\ \int\frac{1}{1-y}\frac{dy}{dx}dx&=\int xdx \\ \ln|1-y|&=\frac{x^2}{2}+C\\ y&=1-e^{\frac{x^2}{2}+C}. \end{align} $$

However, online calculators suggest that the exponent in the solution is negative: $$ y=1-e^{-\frac{x^2}{2}-C}. $$

I'm sure the mistake is trivial, but I can't see it! Where am I going wrong?

1

There are 1 best solutions below

0
On

$\int \frac{1}{1-y}dy=\int x dx$

put $u=1-y$

$\int -u^{-1} du=\int x dx$

$-\ln (u)=\frac{x^2}{2}+C$

$u=e^{-\frac{x^2}{2}+ C}$

$1-y=e^{-\frac{x^2}{2}+ C}$

$y=1-e^{-\frac{x^2}{2}+ C}$