14

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:

  1. 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?

2 Answers2

9

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$.

  • Thanks for your answer!! My way of doing the math is correct though, right? How does my book reach the correct answer if its method was incorrect? – tryingtobeastoic Oct 12 '21 at 12:29
  • 1
    @tryingtobeastoic Sometimes a proof wrong, but the final result is true. In point of fact, it's what mathematicians lowkey hope for when we'll have AI-s review the literature of the last 50 years. –  Oct 12 '21 at 12:30
  • Hmmm, I see. My way of doing the math was correct, right? – tryingtobeastoic Oct 12 '21 at 12:31
  • 1
    @tryingtobeastoic Yes, it's fine. –  Oct 12 '21 at 12:33
  • tbh you have pointed out a great thing. I missed out this argument when I solved this problem. Thanks mate – MSKB Mar 17 '22 at 15:09
5

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)}.$$

ryang
  • 38,879
  • 14
  • 81
  • 179
  • 1
    I think your second line should be

    $$\frac{d}{dx}[\ln e^x+\frac{3}{2}\ln(|\frac{x-1}{x+1}|)]$$

    You didn't add the modulus sign

    – tryingtobeastoic Oct 13 '21 at 07:51
  • 1
    @tryingtobeastoic No, it’s correct and I intentionally displayed that step for clarity: as you’ve ownself pointed out in your Question, the fraction in parentheses is positive (though this was NOT the relevant reasoning for your 2nd line there). This is why adding the modulus symbol in the next line is valid. – ryang Oct 13 '21 at 08:42
  • 5
    @tryingtobeastoic P.S. I hope you continue asking these thoughtful questions, on issues that tend to be glossed over in textbooks. I think MSE is a great forum / knowledge base for such Q&A’s. – ryang Oct 13 '21 at 09:58
  • 3
    @tryingtobeastoic I second ryang's suggestion. Please do continue to ask such thoughtful questions. +1! =) – Jose Arnaldo Bebita Dris Nov 27 '21 at 05:23