# Two irrational functions that seem equivalent to me have different positivity

I was analysing the following function:

$f(x)=\sqrt{\dfrac{x^2-4}{x^2-1}}$

And when I had to differentiate I found the first derivative as:

$f'(x)=\dfrac{3x}{\left(x^2-1\right)\sqrt{\left(x^2-4\right)\left(x^2-1\right)}}$

I studied its positivity and I found it was positive for -1 < x < 0 or x > 2. This went in contrast with what the function should be like because the original is increasing for 0 < x < 1 or x > 2.

I asked my friend for a hand and he calculated the derivative as:

$f'(x) = \dfrac{3x}{\left(x^2-1\right)^2\sqrt{\frac{x^2-4}{x^2-1}}}$

Which to me seems equivalent because you could take $(x^2-1)$ and bring it inside the square root. By simplifying I get my own derivative, but the positivity of this function is the correct one (positive for 0 < x < 1 or x > 2) while mine is wrong.

Both derivatives have the same domain of f(x) if I'm not mistaken.

Are these two functions not equivalent? Or perhaps I'm missing a facepalm-worthy basic algebraic rule?

No, they are not equivalent. This a simpler example of what is happening: if $x<0$ then $$x\sqrt {\strut y\,x} \text{ is not equivalent to } x^2\sqrt{\strut y/x}.$$

• But would $$x\sqrt x \text = x^2\sqrt{x/x^2}.$$ ? That's the actual question that I'm asking. Also if the problem would be in the domain, I actually find that both my derivatives have the same domain. – user3624242 Mar 20 '17 at 17:24
• Not exactly. What you have is $x\,\sqrt {y\,x}$ and $x^2\sqrt{y/x}$. $y\,x$ and $x/y$ have the same sign, but $x$ and $x^2$ have different sign if $x<0$. – Julián Aguirre Mar 20 '17 at 18:27
• Yes, exactly! That's the point I'm trying to understand: which algebraic rules did I break while doing that? Because to me it seems correct, but I see that the result is wrong. Even while differentiating I didn't notice any evident rule that would block me from getting to the result I had before. Perhaps later I can send all the calculations I did for the derivative. – user3624242 Mar 20 '17 at 19:47

$$x\sqrt{x} = \sqrt{x^2 x} = \sqrt{\frac{x^4}{x^2} x} = x^2 \sqrt{\frac{x}{x^2}}$$

EDIT: Note that this only works for $x \geq 0$, as pointed out in the comment below.
• But your first equality holds only when $x\ge0$. It’s not true that $\sqrt{x^2}=x$. Rather it’s the case that $\sqrt{x^2}=|x|$. – Lubin Mar 20 '17 at 20:17