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.