3

G Zill, Dennis, Differential Equations with Boundary-Value Problems, 7th edition, p. 46:

Example 1:

Solve $(1+x)\mathrm dy-y\mathrm dx=0.$

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

From $$\ln|y|=\ln|c(1+x)| \tag{1}$$ we immediately get

$$y=c(1+x)\tag{2}$$

Given that $x,y\in\mathbb{R}$ and $|x|=|y|,$ I don't think we can say that $x=y.$ Why did the author go from $(1)$ to $(2)$ ? Is that step mathematically rigorous?


EDIT

Follow-up question: How to solve for $y$ in $(1+x)dy-ydx=0$?

ryang
  • 38,879
  • 14
  • 81
  • 179

2 Answers2

6

$y=\pm c(1+x)$. But, as solution of the DE, $y$ is a differentiable function. This forces $y$ to be $ c(1+x)$ for all $x$ or $- c(1+x)$ for all $x$. In the second case, the minus sign can be absorbed inside the constant $c$.

geetha290krm
  • 36,632
  • Instead of writing $y=\pm c(1+x)$, shouldn't we write $$y=\begin{cases} c(1+x) & x\geq -1 \ -c(1+x) & x< -1 \end{cases}$$, or do they mean the same thing? – tryingtobeastoic May 05 '23 at 08:11
  • Your formula is not correct. In fact, your function $y$ is not differentiable at $-1$ except when $c=0$. @tryingtobeastoic – geetha290krm May 05 '23 at 08:29
  • $$(1+x)dy-ydx=0$$

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

    $$\ln|y|+c_1=\ln|1+x|+c_2$$

    $$\ln|y|=\ln|1+x|+c \ [\text{let} c_2-c_1=c]$$

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

    $$y=|1+x|e^c$$

    $$y=\begin{cases} (1+x)e^c,\ x\geq1 \ -(1+x)e^c,\ x<-1\end{cases}$$

    Is it correct now?

    – tryingtobeastoic May 05 '23 at 09:10
  • No. $y$ cannot change sign at $-1$. $|1+x|$ is not differentiable at $-1$. You can only have $y=(1+x)e^{c}$ for all $x$ or $y=-(1+x)e^{c}$ for all $x$. @tryingtobeastoic – geetha290krm May 05 '23 at 09:13
  • The book is correct. You are not reading it correctly. It just says $|1+x|=1+x$ if $x \geq -1$ and $|1+x|=-(1+x)$ if $x \leq -1$. This statement does not involve $y$. @tryingtobeastoic – geetha290krm May 05 '23 at 09:32
  • I just posted a new question about the very issue we are discussing. If you are interested, you can check it out here. – tryingtobeastoic May 05 '23 at 11:52
  • 1
    If the differential equation is written as $$\dfrac{dy}{dx} = \dfrac{y}{1+x}$$ the right side is undefined at $x=-1$, so the differential equation can't require $y$ to be a differentiable function at $x=-1$. Therefore anything of the form $$ y = \cases{a(1+x) & for $x < -1$\cr b (1+x) & for $x > -1$}$$ should be counted as a solution, without any relation of $a$ to $b$. – Robert Israel May 07 '23 at 20:52
  • 1
    @RobertIsrael How do you justify division by $1+x$? – geetha290krm May 07 '23 at 23:12
  • Here's a counterexample to your general solution: $y=\begin{cases} 2(1+x), &x<-1 \ 3, &x=-1 \ 4(1+x), &x>-1\end{cases}.$ – ryang May 12 '23 at 11:27
  • By default a solution of the DE is a differentiable function on the whole real line satisfying that equation. Your function is not even continuous. @ryang – geetha290krm May 12 '23 at 11:36
  • If you differentiate my given counterexample, do you not obtain the given ODE? Since you prefer a continuous counterexample: $y=\begin{cases} 2(1+x), &x<-1 \ 0, &x=-1 \ 4(1+x), &x>-1\end{cases}.$ – ryang May 12 '23 at 11:40
  • Certainly not at $-1$. – geetha290krm May 12 '23 at 11:45
  • Do you not see that the given ODE $\frac{\mathrm dy}{\mathrm dx}=\frac{y}{1+x}$ has no value at $-1$ ? So, what's the discrepancy there with either of my two counterexamples? (@tryingtobeastoic) – ryang May 12 '23 at 11:50
  • @ryang The given equation is $(1+x)\mathrm dy-y\mathrm dx=0$. OP made a mistake by dividing by $1+x$. The title is wrong. – geetha290krm May 12 '23 at 11:59
  • @tryingtobeastoic The OP's textbook (linked above) belongs in the rubbish dump. That linked working contains at least 3 mistakes (not counting your point about dividing by $0$), its author seems to have trouble with elementary algebra, and what in the world does $(1+x)\mathrm dy-y\mathrm dx=0$ even mean, because it's neither coherent nor legitimate (outside of infinitesimals, which clearly, that engineering text is not going on about). That pseudo statement is an obfuscating shorthand for the actual ODE intended by its author. – ryang May 12 '23 at 12:07
1
  1. $$\ln|y|=\ln|c(1+x)| \tag{1}$$ $$y=c(1+x)\tag{2}$$

    Why did the author go from (1) to (2) ?

    \begin{align} &\ln|y|=\ln|C_1(1+x)| \\ \iff{}&|y|=|C_1(1+x)|\quad\land\quad y\ne0\\ \iff{}&y=\pm C_1(1+x) \quad\land\quad y\ne0\\ \iff{}&y=C_2(1+x) \quad\land\quad y\ne0 \end{align}

    Notice that $C_1$ and $C_2$—like the expression $\pm e^{C}$—are arbitrary nonzero constants.

  2. Suppose that $y=f(x)$ on $\mathbb R.$ Then, since the starting differential equation is $$\boxed{\frac{\mathrm dy}{\mathrm dx}=\frac{y}{1+x}},\tag{*}$$ the arbitrary constants $A, B$ and $D$ in its general solution (where $\boldsymbol{A\ne B}$ and $\boldsymbol{E\ne 0}$) $$\boxed{y=\begin{cases} A(1+x), &x<-1 \\ D, &x=-1 \\ B(1+x), &x>-1\end{cases}\quad\text{or}\quad y=\begin{cases} D(1+x), &x<-1 \\ E, &x=-1 \\ D(1+x), &x>-1\end{cases}}\tag{*}$$ can be zero. For example, $$y=\begin{cases} -7(1+x), &x<-1 \\ 0, &x=-1 \\ 3(1+x), &x>-1\end{cases}$$ and $$y=\begin{cases} 0, &x<-1 \\ -2, &x=-1 \\ 0, &x>-1\end{cases}$$ are two particular solutions.


Reply to comment

How is $|y|=\pm y$? Isn't $|y|=\begin{cases} y, y>0\\-y, y<0 \end{cases}$?

$|y|\equiv±y$ is a false identity because $|y|$ and $\pm y$ are not generally subtitutable for each other, and we did not invoke it. What we invoked above is this equivalence: $$|m|=|n|⟺m=±n.$$ Notice that $|3|=|−3|$ and $|3|=|3|$ and $|−3|=|−3|.$

This may be of interest: How do you read $±$? Why does $|x|=3⟹x=±3$?

ryang
  • 38,879
  • 14
  • 81
  • 179