# Silly question: Why is $\sqrt{(9x^2)}$ not $3x$?

I had to find the derivative of $f(x) = \sqrt{(9x^2)}$. I applied chain rule with the following steps.

Let $f(x)$ be $\sqrt{x}$ and $g(x)$ be $9x^2$

\begin{align} &f'(g(x)) \times g'(x) \\ & = \frac{1}{2\sqrt{(9x^2)}} \times 18x \\ & = \frac{18x}{2\sqrt{9x^2}} \\ & = \frac{9x}{3\sqrt{x^2}}\\ & = \frac{9x}{3\sqrt{x^2}} \\ & = \frac{3x}{\sqrt{x^2}} \end{align}

I got the answer but I don't understand why the last bit doesn't simplify to $3$ because $\sqrt{x^2}$ is $x$ and if it does then why does the back of my textbook and W|A say that it is not?

EDIT:

Okay, so from what I understand, it should be actually $3|x|$. If for example, I had $\sqrt{4x^2}$, I will have $2|x|$, if my understanding is correct.

-
Why is $\sqrt{9(-1)^2}$ not $-3$? –  1015 Feb 19 '13 at 14:45
Because it's $3|x|$. ${}\qquad\qquad{}$ –  Michael Hardy Feb 19 '13 at 14:47

$\sqrt{x^2}=x$ if and only if $x\ge 0$; if $x<0$, then $\sqrt{x^2}=-x$. The correct general formula is $\sqrt{x^2}=|x|$.

-
So, the answer should be actually $\frac{3x}{|x|}$? –  Jeel Shah Feb 19 '13 at 14:45
@gekkostate: Both that and $\frac{3x}{\sqrt{x^2}}$ are correct. –  Brian M. Scott Feb 19 '13 at 14:47
Nice/leading words. + –  Babak S. Feb 19 '13 at 14:53

Hint: We always know that: $$\sqrt{a^2x^2}=|ax|$$

-
Nice and concise! + 1 –  amWhy Feb 19 '13 at 16:48

Remember that $\sqrt{x^2}$ is the positive number whose square is $x^2$ (this is the definition of the square root sign). If $x$ is positive, then that number is $x$, otherwise, it is $-x$. For example, $\sqrt{(-3)^2} = \sqrt{9} = 3$, not $-3$. You can always say that $\sqrt{x^2} = \left| x \right|$.

-
You mean "non-negative". :) –  Blue Feb 19 '13 at 15:25
Yes, that's right, @Blue. –  Omar Antolín-Camarena Feb 19 '13 at 17:53