Isn't my book doing this math about differentiation wrongly? Problem:
Differentiate with respect to $x$: $\ln(e^x(\frac{x-1}{x+1})^{\frac{3}{2}})$
My attempt:
Let,
$$y=\ln(e^x(\frac{x-1}{x+1})^{\frac{3}{2}})$$
Both $e^x$ and $\frac{x-1}{x+1}$ are positive: $e^x$ can never be negative, and you can take the square root of only positive numbers, so $\frac{x-1}{x+1}$ is positive as well. So, we can apply logarithm properties:
$$=\ln e^x+\ln(\frac{x-1}{x+1})^{\frac{3}{2}}$$
$$=x+\frac{3}{2}\ln(\frac{x-1}{x+1})$$
Now,
$$\frac{dy}{dx}=1+\frac{3}{2}.\frac{x+1}{x-1}.\frac{d}{dx}(\frac{x-1}{x+1})$$
$$=1+\frac{3}{2}.\frac{x+1}{x-1}.\frac{x+1-x+1}{(x+1)^2}$$
$$=1+\frac{3}{2}.\frac{x+1}{x-1}.\frac{2}{(x+1)^2}$$
We can cancel $(x+1)$ and $(x+1)$ in the numerator and denominator because the graph doesn't change.
$$=1+\frac{3}{x^2-1}$$
$$=\frac{x^2+2}{x^2-1}$$
My book's attempt:
Let,
$$y=\ln(e^x(\frac{x-1}{x+1})^{\frac{3}{2}})$$
$$=\ln e^x+\ln(\frac{x-1}{x+1})^{\frac{3}{2}}$$
$$=x+\frac{3}{2}\ln(\frac{x-1}{x+1})$$
$$=x+\frac{3}{2}(\ln(x-1)-\ln(x+1))\tag{1}$$
$$...$$
$$\frac{dy}{dx}=\frac{x^2+2}{x^2-1}$$
Question:

*

*In my book's attempt, is line $(1)$ valid? I think my book's assumption in $(1)$ that $(x-1)$ and  $(x+1)$ must be positive is unfounded. I deduced that $\frac{x-1}{x+1}$ is positive; $\frac{x-1}{x+1}$ can be positive even when both $(x-1)$ and $(x+1)$ is negative. So, is line $(1)$ of my book valid?

 A: Giving a restriction of the domain is an issue of this problem, because that quantity is defined only for $x<-1\lor x>1$. In my opinion, if this were part of a "gauntlet of exercises" in some textbook, then an indication of the domain should be specified, if the purpose of the exercise lies elsewhere: at the very least, to avoid wasting time.
For instance, I think that such a thing would be very important in the chapters about antiderivatives.
You're right: based on the information you've given, $\ln\frac{x-1}{x+1}=\ln(x-1)-\ln(x+1)$ is unwarranted, because the natural way to address the problem would be for all $x$ such that $x<-1\lor x>1$. The book could have solved the issue by saying that $\ln\frac{x-1}{x+1}=\ln\lvert x-1\rvert-\ln\lvert x+1\rvert$ (which is true in the natural domain) and then using $\frac{d}{dt}\ln\lvert t\rvert=\frac1t$.
A: 
My book's attempt:
$$y=x+\frac{3}{2}\ln(\frac{x-1}{x+1})$$
$$=x+\frac{3}{2}(\ln(x-1)-\ln(x+1))\tag{1}\\\ldots$$
$$\frac{dy}{dx}=\frac{x^2+2}{x^2-1}$$
is line $(1)$ valid? I think my book's assumption that $(x-1)$ & $(x+1)$ must be positive is unfounded. $\frac{x-1}{x+1}$ can be positive even when both $(x-1)$ & $(x+1)$ are negative.

The author is hand-waving; pretending that $x-1$ and $x+1$ are nonnegative doesn't affect the result.
To be rigorous: on our domain of interest, $$\frac{\mathrm d}{\mathrm dx}\left(x+\frac32\ln \left(\frac{x-1}{x+1}\right)\right)\\ =\frac{\mathrm d}{\mathrm dx}\left(x+\frac32\ln \left|\frac{x-1}{x+1}\right|\right)\\ =\frac{\mathrm d}{\mathrm dx}\left(x+\frac32\Big(\ln \left|{x-1}\right|-\ln\left|{x+1}\right| \Big)\right),$$ noting that $$\frac{\mathrm d}{\mathrm dx}\ln|f(x)|=\frac{f’(x)}{f(x)}.$$
This hand-wavy issue of implicit modulus signs when there are logarithmic functions, is also common when solving differential equations: see here and here.
And here is a related answer: How is taking $\ln$ on both sides justified?

Addendum
For negative $f(x),$ $$\frac{\mathrm d}{\mathrm dx}\ln\left|f(x)\right|\\=\frac{\mathrm d}{\mathrm dx}\ln\left(-f(x)\right)\\=\frac{-f'(x)}{-f(x)}\\=\frac{f'(x)}{f(x)};$$ for positive $f(x),$ again $$\frac{\mathrm d}{\mathrm dx}\ln\left|f(x)\right|=\frac{f'(x)}{f(x)}.$$
