Will there be two square roots for a Complex number? We know that in real numbers $\sqrt{x^2}=|x|$. But in complex numbers my query is we can have two square roots. For example in my book the question is to find the value of 
$$z=\sqrt{i}-\sqrt{-i}$$ I did squaring on both sides and got
$$z^2=(\sqrt{i})^2+(\sqrt{-i})^2-2\sqrt{i \times -i}=-2\sqrt{1}=-2$$
since $z^2=-2$ we have $z=\pm i\sqrt{2}$
But my book answer is only $z=i\sqrt{2}$.
I am confused why the other value is not taken
 A: It is true that the equation $z^2 = -2$ has both $z = i\sqrt2$ and $z = -i\sqrt2$ as solutions.  But the original problem was to find the value of (i.e., simplify) $z = \sqrt i - \sqrt{-i}$.  You did this by squaring both sides.  This is fine as long as you remember that squaring both sides of an equation could potentially introduce extraneous solutions.
You may recall from precalculus that this can happen with equations where we only care about real solutions.  For example, $\sqrt{x+2} = x$ has only $x = 2$ as its solution, but if we solve by squaring both sides first then we get $x+2 = x^2$, which has both $x=-1$ and $x=2$ as solutions.  $x=-1$ is extraneous because it does not satisfy the original equation $\sqrt{x+2} = x$, because $\sqrt{-1+2} = 1 \ne -1$.  This is the same thing that happened in your case, just with imaginary numbers instead of real numbers.
I don't know if you were allowed to use the exponential form of complex numbers but that's how I would've done it:
\begin{align*}
  \sqrt i - \sqrt{-i} &= \sqrt{e^{i\pi/2}} - \sqrt{e^{-i\pi/2}}\\[0.3cm]
    &= e^{i\pi/4} - e^{-i\pi/4}\\[0.3cm]
    &= \left(\cos\frac\pi4 + i\sin\frac\pi4\right) - \left[\cos\left(-\frac\pi4\right) + i\sin\left(-\frac\pi4\right)\right]\\[0.3cm]
    &= \cos\frac\pi4 + i\sin\frac\pi4 - \underbrace{\left(\cos\frac\pi4 - i\sin\frac\pi4\right)}_{\text{$\cos$ is even, $\sin$ is odd}}\\[0.3cm]
    &= 2i\sin\frac\pi4\\[0.3cm]
    &= i\sqrt2
\end{align*}
A: Here's another way of looking at the problem.  What do we mean by $\sqrt{i}$?  Well, there are two numbers $z$ for which $z^2 = i$; it's not too hard to show that they are $z = \pm (1 + i)/\sqrt{2}.$  Similarly, there are two numbers for which $z^2 = -i$;  they are $z = \pm (1 - i)/\sqrt{2}$.  Thus, we have
$$
\sqrt{i} - \sqrt{ -i} = \pm \frac{1 + i}{\sqrt{2}} - \left( \pm \frac{1 - i}{\sqrt{2}} \right)
$$
The book's answer of $i \sqrt{2}$ corresponds to picking the positive sign in both cases.  Your other answer of $-i \sqrt{2}$ corresponds to picking the minus sign in both cases.  Both are valid answers, depending on what you mean by "the" square root of $i$.  You could define "the" square root to be the one with the positive real part, for example;  this would be most closely analogous to what we do on the real number line.  But this doesn't make the other answer wrong, per se;  it just means that we've made a choice to focus on one particular choice of the square root.
A: The arithmetic convention is that $\sqrt A$ is the non-negative solution $x$ of $x^2=A$ only when $A$ is a non-negative real number, and it is also a convention that $\sqrt B$ is meaningless when $B$ is not a non-negative real number.
This is because there is no linear ordering on the complex numbers that has the  relationships to complex arithmetic that    the order on the reals  has (That is, $a<b\to a+c<b+c$ and $[a<b\land 0<c]\to a c<b c.$) So there is no reason to choose one of the solutions of $x^2=B$ to the other, when $\neg (B\geq 0).$
We speak of a square root of $i$, not the square root of $i$. Of course there are $2$ solutions to $x^2=i$, which are $\pm(1+ i)/\sqrt 2.$
I would say that a book written after about 1750 or so that uses $\sqrt i$ needs  a re-write.
