What is the domain of $f(x)=(\sqrt{x})^2$ ? Is it all real numbers, or are negative numbers still excluded, even after the square?
Edit: What I'm really wondering is whether $\lim\limits_{x \to 0} f(x)$ is defined. Sorry for the confusion.
What is the domain of $f(x)=(\sqrt{x})^2$ ? Is it all real numbers, or are negative numbers still excluded, even after the square?
Edit: What I'm really wondering is whether $\lim\limits_{x \to 0} f(x)$ is defined. Sorry for the confusion.
If $A$ is a set and $f\colon A\longrightarrow\Bbb R$ is a function, then the domain of $f^2$ is equal to the domain of $f$, which is $A$. So, in particular, the domain of $\sqrt x^2$ is $[0,\infty)$, in spite of the fact that you always have $\sqrt x^2=x$.
Concerning $\lim_{x\to0}\sqrt x^2$, since $\sqrt x^2$ is defined only on $[0,\infty)$, it is equal to $\lim_{x\to0^+}x(=0)$ .
The maximal domain will be non negative real numbers if you consider $f(x) = g(x) \cdot g(x)$ where $g(x) = \sqrt x$ since the domain of $g$ is $[0,\infty)$.
But if you consider the function $h(x) = x$ then the domain of $h$ can be $\mathbb{R}$.
Negative values for $x$ should be included for the function
$$h(x)=\sqrt{x^2}=|x|$$
but as noticed in this case $f(x)=\left(\sqrt {x}\right)^2$ stands for $f(x)=\sqrt x\sqrt x$ therefore negative values for $x$ are not allowed.
More precisely the given function is the composition $f=g\circ h$ of $h(x)=\sqrt x$ with $g(x)=x^2$ and by definition we first apply $h$ and then $g$.
edit
Therefore $\lim\limits_{x \to 0} f(x)$ is defined only as right side limit that is
$$\lim\limits_{x \to 0^+} f(x)$$
Usually we simply write
$$\lim\limits_{x \to 0} \sqrt x=0$$
implicitly assuming $x\ge 0$ that is $x\to 0^+$.
You can't "determine" a domain. The domain is given. The domain of $\sqrt{x}$ is anything you want it to be. What do you want? You want only real values (as the image)? Ok, then you must decide the domain is $x \in \mathbb{R}: x \geq 0$.
I will add, since I guess this is closer to your question: Is $\left(\sqrt{-1}\right)^2 = -1$? And does the fact that (it at least appears) we can have $x = -1$ and still get a real ($\mathbb{R}$) result. So does this "expand" the domain?
The answer is absolutely not. $\sqrt{-1} = i$ (and indeed $i^2 = -1$), so if you're afraid of complex numbers then you're still not allowed to use the negative square root.
Fundamentally, what you are asking is: is $\lim\limits_{x\rightarrow 0}f^{-1}(f(x)) = 0$ because when you square the square root (you're "undoing" the square root). I find this to be a somewhat silly question because it comes down to domain (obviously $f^{-1}(f(x)) = x$ for all "normal" values of $x$). So then we have to wonder about "non-normal" values (e.g. $x = -0.0000001$ when thinking about $\sqrt{x}$).
This now becomes a vastly more complicated problem because an inverse is a strange thing: if a function is one-to-one (if I "know" $x$, then I "know" $y$--not the case when $f(x) = x^2$ because knowing that $f(x) = 1$ doesn't tell me the $x$ value--could be $x = 1$ or could be $x = -1$).
In this case, it's easy: $f^{-1}(f(x)) = x$ and we're done!
But what if this isn't the case--what if, like $\arcsin$ the inverse can give multiple solutions (I mean, the square root gives multiple solutions...so....)?
At that point, we look at the square root as "the problem" (it's really the inverse), so we don't actually have $f^{-1}(f(x))$ what we have is $f\left(f^{-1}(x)\right)$. Which means if $f(x)$ is well defined it doesn't matter what ridiculous value $f^{-1}(x)$ returns, $f\left(f^{-1}(x)\right) = x$, regardless (it's literally the definition of the inverse).
Edit
The square root is a "bad" function (because it's not a function at all)--it's an inverse function of the squared function ($f(x) = x^2$). You need to understand this. $f(x) = x^2$ isn't one-to-one which means the inverse isn't a function. A function must have: "one input" and "one output". The problem with the inverse of $x^2$ (the square root) is that it has two values--thus not a function.
Note
imo, the more "interesting" question is what is $\sqrt{x^2}$? And the answer is: $\sqrt{}$ is an inverse function and isn't well-defined (i.e. it's not a function). So we certainly can not say that $\sqrt{x^2} = x$ whereas we absolutely can say $\left(\sqrt{x}\right)^2 = x$.