2
$\begingroup$

I would like to solve the differential equation $$(x+1)y'+xy^2=0$$ and initial condition $$y(0)=1.$$ My result is $$y=\frac{1}{x-\ln|x+1|+c},$$ while the result from Wolfram is $$y=\frac{1}{x-\ln(x+1)+c}.$$ For initial condition $$y=\frac{1}{x-\ln|x+1|+1}$$ I do not know which interval as a domain to choose from $(-\infty,-W(1)-1)$, $(-W(1)-1,-1)$, $(-1,\infty)$. It is my result for condition: $(x-\ln|x+1|+1\neq0) \wedge (x+1\neq0)$. I wonder where did Wolfram get that result without absolute value, is there any trick for it?

And also what solution would it be for initial condition $y(0)=0$, will it be singular solution $y=0$ for $x\in R$?

$\endgroup$
7
  • $\begingroup$ Should that be $y'$ instead of $x'$? $\endgroup$ – Robert Israel Apr 22 '20 at 15:03
  • $\begingroup$ you are right, edited :) $\endgroup$ – naruto25 Apr 22 '20 at 15:03
  • $\begingroup$ This is the danger of asking more than one question and not itemizing them. It seems that everyone forgot the last question — what happens when $y(0) = 0$. $\endgroup$ – Rodrigo de Azevedo Apr 23 '20 at 4:40
  • $\begingroup$ Does anybody know the answer for the last question? $\endgroup$ – naruto25 Apr 23 '20 at 15:40
  • $\begingroup$ Have you tried using Picard-Lindelöf? $\endgroup$ – Rodrigo de Azevedo Apr 23 '20 at 15:53
3
$\begingroup$

The real question is whether an antiderivative of $1/x$ should be written as $\ln(x)+c$ or $\ln|x|+c$. Calculus courses prefer $\ln|x|+c$: that's ok if you restrict yourself to real numbers, but doesn't work when complex numbers are allowed. When complex numbers are allowed, $\ln(x)+ c$ works, as (depending on choice of branch of ln), $\ln(-x) = \ln(x) \pm \pi i$, while $\ln |x|+c$ does not ($\ln|z|$ is not differentiable in the complex sense). Wolfram doesn't know you only care about real numbers.

$\endgroup$
2
  • $\begingroup$ Thx for reply, but still I do not know what I have to do. I found c from initial condition(c=1) and have to find domain. My suggestion is above. $\endgroup$ – naruto25 Apr 22 '20 at 15:53
  • $\begingroup$ In fact the solution should write $\log(-x)+c'\text{ and }\log(x)+c''$, because the constants can differ on both sides of the singularity. $\endgroup$ – Yves Daoust Apr 22 '20 at 19:37
3
$\begingroup$

Due to the factor $x+1$, the equation has a singularity and there are two independent branches, on either sides. But as you specify the condition $y(0)$, it is implicit that you consider the branch $x\ge-1$.

$\endgroup$
3
  • $\begingroup$ How do you mean two branches? I have three of them. $\endgroup$ – naruto25 Apr 22 '20 at 16:49
  • $\begingroup$ @naruto25: I said due to the factor $x+1$. $\endgroup$ – Yves Daoust Apr 22 '20 at 16:56
  • $\begingroup$ So if $x_0\in(-1,\infty)$, then the equation is $\frac{1}{x-ln(x+1)+c}$ and if $x_0\in(-\infty,-1)$, then the equation is $\frac{1}{x-ln(-x-1)+c}$ ? Is it correct? $\endgroup$ – naruto25 Apr 25 '20 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.