when do you use chain rule with square root If i have a question like this:
$$
\sqrt{3x}
$$
..differentiate...
$$
(3x)^{1/2}\rightarrow\frac12(3x)^{-1/2}
$$
Done using power rule... 
Now i have seen examples where chain rule is applied too.. maybe i missed something..
$$
f(g(x))' = f'(g(x))\, g'(x).
$$
$$
\frac12(3x)^{-1/2} (3)
$$
derivative $3x$ is $3$.
$f(x) = \sqrt{3x}$. and... $g(x)=3x$.
 A: The chain rule is required here: the derivative of $(3x)^{1/2}$ with respect to $x$ is not $\frac12(3x)^{-1/2}$, but rather
$$\frac12(3x)^{-1/2}\cdot\frac{d}{dx}(3x)=\frac12(3x)^{-1/2}\cdot3=\frac32(3x)^{-1/2}\;.$$
This has nothing to do specifically with the square root function: the chain rule is always required when you’re differentiating a composite function, a ‘function of a function’, so to speak. Here you’re differentiating not the square root of $x$, but the square root of some function of $x$, and the derivative has to take that other function into account; the chain rule is the mechanism by which this is done.
A: Think of it like this:
$$
\frac{\mathrm{d}u}{\mathrm{d}x}=\frac{\mathrm{d}u}{\mathrm{d}t}\frac{\mathrm{d}t}{\mathrm{d}x}
$$
Now substitute $u=\sqrt{t}$ and $t=3x$. Then the power rule gives
$$
\frac{\mathrm{d}u}{\mathrm{d}t}=\frac12t^{-1/2}
$$
and
$$
\frac{\mathrm{d}t}{\mathrm{d}x}=3
$$
Thus,
$$
\begin{align}
\frac{\mathrm{d}u}{\mathrm{d}x}
&=3\cdot\frac12t^{-1/2}\\
&=\frac32\frac1{\sqrt{3x}}
\end{align}
$$

Appealing to the Definition
Consider the definition of the derivative applied to a composition:
$$
\begin{align}
f(g(x))'
&=\lim_{h\to0}\frac{f(g(x+h))-f(g(x))}{h}\\
&=\lim_{h\to0}\frac{f(g(x)+\color{#C00000}{g(x+h)-g(x)})-f(g(x))}{\color{#C00000}{g(x+h)-g(x)}}&&\lim_{h\to0}\frac{g(x+h)-g(x)}{h}\\
&=f'(g(x))&&g'(x)
\end{align}
$$
as long as $g$ is continuous at $x$, $g(x+h)-g(x)\to0$ as $h\to0$.

Examples of Composition
$$
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}x}\left(\color{#C00000}{x^2}\right)^2
&=2\left(\color{#C00000}{x^2}\right)\frac{\mathrm{d}}{\mathrm{d}x}\color{#C00000}{x^2}\\
&=2\left(x^2\right)2x\\
&=4x^3
\end{align}
$$
This is also $\frac{\mathrm{d}}{\mathrm{d}x}x^4=4x^3$.
You can even be overly pedantic and use the chain rule for the trivial composition
$$
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}x}\sin(\color{#C00000}{x})
&=\cos(\color{#C00000}{x})\frac{\mathrm{d}}{\mathrm{d}x}\color{#C00000}{x}\\
&=\cos(x)\cdot1\\
&=\cos(x)
\end{align}
$$
A: I'm not sure what you mean by "done by power rule".  Maybe you mean you've already done what I'm about to suggest: it's a lot easier to avoid the chain rule entirely and write $\sqrt{3x}$ as $\sqrt{3}*\sqrt{x}=\sqrt{3}*x^{1/2}$, unless someone tells you you have to use the chain rule.  I'll leave the rest to you.
