12
$\begingroup$

The problem from the book.

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6 -y$

I understand the solution till this part.

$\ln \vert 6 - y \vert = x + C$

The solution in the book is $6 - Ce^{-x}$

My issue this that this solution, from the book, doesn't seem to resolve the issue of the abs value of $\vert 6 - y\vert$

$\endgroup$
3
  • 2
    $\begingroup$ I always thought that the abs in this kind of context are "niceties", to ensure that the value isn't negative, and there is no need to pay too much attention to them... $\endgroup$
    – Valtteri
    Commented Feb 23, 2013 at 2:01
  • 5
    $\begingroup$ @Valtteri Not trying to sound rude but I don't want "niceties" I need pure mathematical reasoning otherwise, I doubt myself. $\endgroup$
    – yiyi
    Commented Feb 23, 2013 at 2:02
  • $\begingroup$ The absolute value is necessary. But forgetting about it will not cause grief, as long as we make a compensating mistake. Go from $\log(6-y)=x+C$ to $6-y=Ce^x$ and then forget that $e^D$ is by nature positive. Actually, we do this kind of cheating all the time, since $y=6$ is a solution but $e^D$ cannot be $0$. Furthermore, we really should not use the same constant on both sides of $6$. In a problem with an initial condition, this issue doesn't come up. $\endgroup$ Commented Feb 23, 2013 at 3:15

3 Answers 3

5
$\begingroup$

You should have, as your general solution, $$ -\ln|6-y|=x+C\ \quad\iff\quad |6-y|=e^C e^{-x} . $$

If $y-6>0$, you have the solution $$y-6= e^Ce^{-x}\ \quad\iff\quad y=6+ e^Ce^{-x} . $$

If $y-6<0$, you have the solution $$6-y= e^Ce^{-x}\ \quad\iff\quad y=6- e^Ce^{-x} . $$

In either case, the solution can be written as $y=6- Ce^{-x} $, for some constant $C$ (different from the $C$ above).

$\endgroup$
7
  • $\begingroup$ the $\ln|6-y|=e^C e^{-x}$ I don't understand. $\endgroup$
    – yiyi
    Commented Feb 23, 2013 at 2:10
  • 4
    $\begingroup$ It's worth noting that even this fails to capture the constant solution $y=6 - 0e^{-x}$, which might be said to crudely represent $C=\infty$. $\endgroup$
    – Erick Wong
    Commented Feb 23, 2013 at 2:13
  • 2
    $\begingroup$ @ErickWong Good point. To do the separation step properly at the very beginning $y=6$ is set aside and one assumes $y\ne 6$. $\endgroup$
    – Maesumi
    Commented Feb 23, 2013 at 2:19
  • 1
    $\begingroup$ @ErickWong Good point. The integration method used is valid only on intervals not containing $y=6$. $y=6$ is a solution and of the form given at the end ($y=6- Ce^{-x}$). $\endgroup$ Commented Feb 23, 2013 at 2:19
  • 1
    $\begingroup$ @MateenUlhaq There's a few different uses of $C$ in the answer (which is pretty normal usage). The $C$ I was referring to was the very first one: if $y=6$ then $-\ln|6-y|$ could loosely be said to be $\infty$. $\endgroup$
    – Erick Wong
    Commented Aug 10, 2015 at 8:42
2
$\begingroup$
  1. Here's a clearer solution: $$\begin{align} &\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6 -y \\ \frac1{6-y}\dfrac{\mathrm{d}y}{\mathrm{d}x} &= 1 \ \ \ \ \ \ \ \ \text{or}\ \ \ \ \ \ \ \ y=\bbox[pink]{6} \\ \int\frac{\mathrm{d}y}{6-y} &= \int1{\mathrm{d}x} \\ -\ln \lvert 6-y\rvert &= x +D \\ \lvert 6-y\rvert &= e^{-x-D} \\ 6-y= e^{-x-D}\ \ \ &\text{or}\ \ \ y-6= e^{-x-D}\\ y&=\bbox[pink]{6\pm e^{-D}e^{-x}}. \end{align}$$ Observe that $\pm e^{-D}$ is a nonzero arbitrary constant.
    Combining the two sub-answers (in pink) gives the general solution $\bbox[yellow]{y=6+Ce^{-x}}$.


2. Alternatively, this solution avoids dealing with the modulus function, and is more compact to boot: $$\begin{align} \dfrac{\mathrm{d}y}{\mathrm{d}x} &= 6 -y\\ \dfrac{\mathrm{d}y}{\mathrm{d}x} +y &= 6\\ \dfrac{\mathrm{d}y}{\mathrm{d}x}e^x +ye^x &= 6e^x \\ \dfrac{\mathrm{d}}{\mathrm{d}x} (ye^x) &= 6e^x\\ ye^x &= \int6e^x{\mathrm{d}x}\\ &=6e^x+C\\ \bbox[yellow]{y}&\bbox[yellow]{=6+Ce^{-x}}. \end{align}$$

$\endgroup$
0
$\begingroup$

$$\dot{y}(x)=6-y(x)$$ $$\frac{\dot{y}(x)}{6-y(x)}=1$$ $$\int{\frac{\dot{y}(x)}{6-y(x)}}dx=\int{1}dx$$ $$-\ln{|6-y(x)|}=x+c$$ $$y(x)=6-e^{-x-c}.$$

$\endgroup$
6
  • $\begingroup$ There should be $||$ around the $6-y(x)$, to keep with the idea... $\endgroup$
    – Valtteri
    Commented Feb 23, 2013 at 2:11
  • $\begingroup$ Where are the differential to the intergrals? $\endgroup$
    – yiyi
    Commented Feb 23, 2013 at 2:11
  • $\begingroup$ yes yes, my bad $\endgroup$
    – Iuli
    Commented Feb 23, 2013 at 2:11
  • $\begingroup$ Wrong differential, should it be $\mathrm{d}y$ not $\mathrm{d}x$ otherwise the intergral would equal $\frac{\dot{y}(x)}{6-y(x)}x +C $ $\endgroup$
    – yiyi
    Commented Feb 23, 2013 at 2:19
  • $\begingroup$ @MaoYiyi you are wrong. Check again :-) $\endgroup$
    – Iuli
    Commented Feb 23, 2013 at 2:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .