Solving $x \frac{\mathrm dy}{\mathrm dx}=y+1$

224 Views Asked by At

Following differential equation is given: $$x \frac{\mathrm dy}{\mathrm dx}=y+1.$$

Separating variables and integrating: $$\int \frac{1}{y+1} \mathrm dy=\int \frac 1x \mathrm dx$$ $$\ln|y+1|=\ln|x|+c$$

In my textbook the following step is: $$y+1=Ax \,\,\,\,\, \text{(where} \ A=e^c).$$

My question is why the modulus function can be omitted after exponentiating.

6

There are 6 best solutions below

2
On BEST ANSWER

It can't! Except that it almost can. Here's the steps, slowed down.

$$\ln|y + 1| = \ln|x| + c$$ $$e^{\ln|y + 1|} = e^{\ln|x| + c}$$ $$|y + 1| = e^c|x|$$ $$y + 1 = \pm e^c|x|$$

But $\pm|x|$ is really just $\pm x$, so we have $y + 1 = \pm e^cx$.

If you say $A$ is $e^c$, then $A$ has to be positive, because powers of $e$ are always positive. Instead, we can say $A = \pm e^c$, which can be any nonzero constant.

So now we have $y + 1 = Ax$, for $A \neq 0$. But the case where $A = 0$ was accidentally ruled out when you divided by $y + 1$; $y = -1$ is a solution to the original differential equation. So the general solution is $y + 1 = Ax$, where $A$ is any constant.

0
On

It is wrong.

Try $y=-2$ so $$\ln|y+1|=0\implies \exp(\ln|y+1|)=1$$ whereas $$y+1=-2+1=-1\neq1.$$

They should not specify that $A=e^c$ but rather $A=\pm e^c$ to take into account of the pluses and minuses in the $x$s and $y$s.

0
On

Note that $$\ln|y+1|=\ln|x|+c \iff |y+1|=e^{c}|x|\iff y+1 = \pm e^{c} x = Ax,$$ where $A$ can be positive or negative.

0
On

Absorbing two $\pm$ signs into one, $y+1=\pm |y+1|=\pm A|x|=\pm Ax$. We can then redefine $A$ to absorb the final $\pm$ sign. You could posit different multipliers for $x$ depending on whether $x>0$ or $x<0$, but this would cause $y'$ to be undefined at $x=0$.

Another approach: write $y+1=zx$ so $x(zx)'=zx$, i.e. $z'x^2=0$. If $x\ne 0$, $z'=0$ so $z$ is constant. If at $x=0$ we have a $z$ discontinuity, $y',\,z'$ will both be undefined.

0
On

I did this. You have $$xy' - y = 1.$$ Divide by $x^2$ and you have $$y(1/x) + (1/x)'y = {1\over x^2}.$$ Undoing the product rule you have $$ (y/x)' = {1\over x^2},$$ so $$ y/x = C - 1/x.$$ Multipling by $x$ you have $$y = Cx - 1.$$

0
On

Without using logs function

$$x \frac{\mathrm dy}{\mathrm dx}=y+1$$ $$xy'-y=1$$ $$(\frac yx)'=\frac 1 {x^2}$$ Integrate $$\frac yx=\int \frac {dx} {x^2}$$ $$\implies y=Kx-1$$