Taking limits of powers containing 'x'? If we have $lim_{x\rightarrow 0}\sqrt{x^2+sinx-tanx}$ we can write this as
$\sqrt{lim_{x\rightarrow \:0}\left(x^2+sinx-tanx\right)}$
OR If we have $lim_{x\rightarrow \:0}\left(x^3+secx-cosecx\right)^n$. We can write this as
$\left(lim_{x\rightarrow \:\:0}\left(x^3+secx-cosecx\right)\right)^n$
So if we have a limit as follows:
$lim_{x\rightarrow \:\:\:0}\left(\frac{sinx}{x}\right)^{\frac{1}{x^2}}$
We expand the limit as :
$lim_{x\rightarrow 0}\left(\frac{sinx}{x}\right)^{\frac{1}{x^2}}=lim_{x\rightarrow 0}\left(\frac{x-\frac{x^3}{3!}+\frac{x^5}{5!}.....}{x}\right)^{\frac{1}{x^2}}=lim_{x\rightarrow 0}\left(1+\left[-\frac{x^2}{3!}+\frac{x^4}{5!}....\right]\right)^{\frac{1}{x^2}}=lim_{x\rightarrow \:0}\left(\left(1+\left[-\frac{x^2}{3!}+\frac{x^4}{5!}....\right]\right)^{\frac{1}{-\frac{x^2}{3!}+\frac{x^4}{5!}....}}\right)^{\frac{-\frac{x^2}{3!}+\frac{x^4}{5!}....}{x^2}}$$=e^{\left(lim_{x\rightarrow 0}\frac{-\frac{x^2}{3!}+\frac{x^4}{5!}....}{x^2}\right)}=e^{\left(lim_{x\rightarrow \:0}-\frac{1}{3!}+\frac{x^2}{5!}....\right)=}e^{-\frac{1}{6}}$
So why can't we take the limit as we did in the initial case as:
$lim_{x\rightarrow \:\:\:0}\left(\frac{sinx}{x}\right)^{\frac{1}{x^2}}$$=lim_{x\rightarrow 0}\left(\frac{sinx}{x}\right).lim_{x\rightarrow 0}\left(\frac{sinx}{x}\right).lim_{x\rightarrow \:0}\left(\frac{sinx}{x}\right)......\left(\frac{1}{x^2}times\right)=\left[lim_{x\rightarrow 0}\left(\frac{sinx}{x}\right)\right]^{lim_{x\rightarrow 0}\left(\frac{1}{x^2}\right)}=\left(1\right)^{lim_{x\rightarrow \:\:0}\frac{1}{x^2}}=1$
which is wrong. I know I am wrong somewhere, please point it out.

You can't simply take a product $1/x^2$ times when $1/x^2$ may not be an integer. Regardless, your computation leads to $1^{\infty}$, which is an indeterminate form: it can take on any finite value at least $1$, or $\infty,$ which is why you have to compute the limit in a different way.
In both your introductory examples, the exponent $n$ or $1/2$ does not vary with $x$, and the functions $x^n$ and $\sqrt x$ are continuous, so it's valid to interchange them with limits. For a function like $f(x)^{g(x)}$, where $f$ and $g$ are both continuous, we'll have $\lim_{x\to x_0}(f^g)=(\lim_{x\to x_0}f(x))^{\lim_{x\to x_0} g(x)}$ whenever both limits exists. But in your case $g=1/x^2$ does not have a limit at zero, so the manipulation you propose is invalid.
