How to simplify logartihms with a integration constant? How can I simplify:
$$\ln \left| 1+\frac{y}{x}\right|=\ln|x|+c, $$
where $c$ is an integration constant?
I thought it would just be:
$$\left|1+\frac{y}{x}\right|=|x|+e^c , $$
where $e^c$ becomes $c$.
I know it actually simplifies to:
$$ 1+\frac{y}{x}=cx , $$
and then from here to $y=cx^2-x$.
I don't understand why it's not $+e^c$ or $+c$, and I don't understand how the absolute values got removed.
 A: When you exponentiate both sides, you have to use the rule $e^{a+b} = e^a \cdot e^b$,
not the incorrect “rule” $e^{a+b} = e^a + e^b$,
so what you get is
$$
\left| 1+\frac{y}{x} \right| = |x| \cdot e^c
.
$$
Since $e^c>0$, you can write this as
$$
\left| 1+\frac{y}{x} \right| = |x \cdot e^c|
,
$$
and since two real numbers have the same absolute value if and only if they are equal or opposites, it must be the case that
$$
1+\frac{y}{x} = x \cdot e^c
\qquad\text{or}\qquad
1+\frac{y}{x} = -x \cdot e^c
,
$$
which is usually written as
$$
1+\frac{y}{x} = \pm e^c \cdot x
.
$$
Here we can let $C=\pm e^c$, to get
$$
1+\frac{y}{x} = C \, x
,\qquad
C \neq 0
.
$$
Note that if $c$ is an arbitrary real number, then $e^c$ can take any positive value, so $C = \pm e^c$ can be any real number except zero.
If this comes from solving a separable ODE (as it often does), then there is usually a solution corresponding to the value $C=0$ too ($y=-x$ in this case), but such solutions have to be derived separately; usually they are hiding in some earlier step where you have to treat some case separately in order to avoid division by zero. This is unfortunately very badly explained in many places, even some ODE textbooks.
A: For your first question, remember that when you exponentiate both sides, you have to include the whole expression:
$$\ln\left|1+\frac{y}{x}\right|=\ln|x|+c\implies e^{\ln|1+\frac{y}{x}|}=e^{\ln|x|+c}=e^{\ln|x|}\cdot e^c\implies \left|1+\frac{y}{x}\right|=e^c|x|=c|x|$$
For your second question, there's a thread here: Why does the absolute value disappear when taking $e^{\ln|x|}$
Essentially, you can use the fact that $c$ is arbitrary to always be able to drop the absolute value signs.
A: The constant $c$ can also be written as $\ln|c|$.
Note that: $\ln a + \ln b =\ln(ab)$
$\ln \lvert 1 +\frac{y}{x} \rvert= \ln|x|+\ln|c|$
$\ln \lvert 1 +\frac{y}{x} \rvert= \ln|cx|$
$1 +\frac{y}{x} = cx$
$x+y=cx^2$
$y=cx^2-x$
