Problem:
Differentiate with respect to $x$: $\ln\left(e^x\left(\frac{x-1}{x+1}\right)^{\frac{3}{2}}\right)$
My attempt:
Let,
$$y=\ln\left(e^x\left(\frac{x-1}{x+1}\right)^{\frac{3}{2}}\right)$$
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\left(\frac{x-1}{x+1}\right)^{\frac{3}{2}}$$
$$=x+\frac{3}{2}\ln\left(\frac{x-1}{x+1}\right)$$
Now,
$$\frac{dy}{dx}=1+\frac{3}{2}.\frac{x+1}{x-1}.\frac{d}{dx}\left(\frac{x-1}{x+1}\right)$$
$$=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\left(e^x\left(\frac{x-1}{x+1}\right)^{\frac{3}{2}}\right)$$
$$=\ln e^x+\ln\left(\frac{x-1}{x+1}\right)^{\frac{3}{2}}$$
$$=x+\frac{3}{2}\ln\left(\frac{x-1}{x+1}\right)$$
$$=x+\frac{3}{2}\left(\ln(x-1)-\ln(x+1)\right)\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?