Why do we not consider the negative case for u-substitutions involving $u^2$

calculusintegration

In general, why don't we consider the negative case when doing $u$ substitutions that involve a $u^2$ (i.e. when subbing back in for $x$ the square root only has the positive value $+\sqrt{x}$ rather than $-\sqrt{x}$ or whatever function is being square rooted)

A simple example from my textbook:

integrate $f(x)=\int \frac{1}{1+\sqrt{x}} dx $ by substitution of $x=(u-1)^2$

through some simple substitution the textbook answers reach:

$f(x)=2(1+\sqrt{x})-2(\ln(1+\sqrt{x}))+C$

why cannot the case $f(x)=2(1-\sqrt{x})-2(\ln(1-\sqrt{x}))+C$ work in this method?

Is it just that you first define $u=1+\sqrt{x}$ rather than the substitution they give in the question, and then reach the $x(u)$ function?

I thought that it might be because $x(u)$ and $u(x)$ functions must be inverse of each other, but you can still define that inverse as the negative and it should work. Any input is appreciated, am I just missing something extremely obvious?

Best Answer

Let $u = 1 - \sqrt{x}$. Then $x = (u - 1)^2$, so $dx = 2(u - 1) du$.

And $\sqrt{x} = \sqrt{(u - 1)^2} = |u - 1|$. Note that $u \le 1$, so $u - 1 \le 0$, so $|u - 1| = -(u - 1) = 1 - u$.

$$\int \frac{1}{1 + \sqrt{x}} dx$$ $$\int \frac{1}{1 + ( 1 - u)} 2(u-1) du$$ $$\int \frac{2u - 2}{2 - u} du$$ $$\int \frac{2 - 2(2 - u)}{2 - u} du$$ $$\int (\frac{2}{2 - u} - 2) du$$ $$-2 \ln{|2 - u|} - 2u + C$$ $$-2 \ln{|2 - (1 - \sqrt{x})|} - 2(1 - \sqrt{x}) + C_1$$ $$-2 \ln{|1 + \sqrt{x}|} - 2 + 2\sqrt{x} + C_1$$ $$2\sqrt{x} - 2 \ln(1 + \sqrt{x}) + C_2$$

Which is the same as your textbook gets for the $u = 1 + \sqrt{x}$ substitution, except differing by a constant (which is irrelevant anyway for indefinite integrals).

How did you get your answer? You forgot the absolute value operators, didn't you?