Is $\ln (x/y) = \ln |x| - \ln |y|$? If I am to find the $y$ of the following equation
$$\ln(x/y) = x + y,$$
you would first try to split the left-hand side by doing $\ln x - \ln y$.
My question is, do you need to put the absolute function over both $x$ and $y$?
I think although you know that $x/y > 0$, you don't know if both are bigger or smaller than zero. In my opinion I don't think it's mathematically correct since both $x$ and $y$ could be negative. So I'm wondering if it's more correct to write like this instead:
$$\ln |x| - \ln |y| = x + y.$$
Could anyone let me know if this is indeed the correct way to split the log? Thanks!
 A: The expression $\ln(x/y)$ only makes sense when $x/y>0$. In this specific case we have, $x>0$ and $y>0$, or, $x<0$ and $y<0$. When ($x>0$ and $y>0$) or ($x<0$ and $y<0$), we can write,
$$\frac xy=\frac{|x|}{|y|}$$
and then,
$$\ln (x/y)=\ln |x|-\ln |y|.$$
A: We need $\frac x y>0$ then within this case to split the $\log$ the expression $\ln(x/y)=\ln |x| - \ln |y| = x + y$ is fine.
As an alternative we can consider directly the two cases

*

*$x,y>0$
$$\ln\left(\frac xy\right) = x + y \iff \ln x - \ln y=x+y $$

*

*$x,y<0$
$$\ln\left(\frac {-x}{-y}\right) = x + y \iff \ln (-x) - \ln (-y)=x+y$$
More effectively, to isolate $y$, let take exponential both side to obtain
$$\ln\left(\frac xy\right) = x + y \iff \frac x y=e^xe^y\iff ye^y =xe^{-x} $$
that is
$$y=W(xe^{-x})$$
where $W$ is the Lambert function.
A: In itself, $\ln |x| - \ln |y| = x + y$ will produce spurious solutions of the form $x=-y$.
An alternative approach could be to solve $\ln x - \ln y = x + y$ when $x>0$ and $y>0$
and then note that any positive solution $x=a,y=b$ which satisfies that also produces the negative solution $x=-b,y=-a$
The positive solutions are not simple, but using the Lambert W function you have $$y=W\left(x e^{-x}\right).$$  With the reflection for the negative solutions you get an answer like this in red, with a discontinuity at $(0,0)$; the extreme values on top and to the left are about $(1, 0.2784645)$  and its reflection $(-0.2784645,-1)$

