what is $\sqrt{i}+\sqrt{-i}$ what is $$\sqrt{i}+\sqrt{-i}$$ My book gave four possible answers:

$$\sqrt{i}+\sqrt{-i}=\pm\left(\frac{1+i}{\sqrt{2}}\right)\pm\left(\frac{1-i}{\sqrt{2}}\right)$$ 

So possible values of $$\sqrt{i}+\sqrt{-i}$$ are $\sqrt{2}$ ,$-\sqrt{2}$$\:$,$i\sqrt{2}$ $\:$,$\:$ $-i\sqrt{2}$

But i am getting an ambiguityif we take $i\sqrt{2}$:

$$\sqrt{i}+\sqrt{-i}=i\sqrt{2}$$ squaringboth sides we get

$$i+(-i)+2\sqrt{i} \times \sqrt{-i}=-2$$i.e.,

$$2=-2$$

can i know where i went wrong?
What is the value of $\sqrt{i}\times\sqrt{-i}$? For the value of $\sqrt{i}$ and $\sqrt{-i}$ you have chosen
$$\sqrt{i}=\frac{1+i}{\sqrt{2}}\qquad\text{ and }\qquad\sqrt{-i}=-\frac{1-i}{\sqrt{2}},$$
to get $\sqrt{i}+\sqrt{-i}=i\sqrt{2}$. That means
$$\sqrt{i}\times\sqrt{-i}=\frac{1+i}{\sqrt{2}}\times-\frac{1-i}{\sqrt{2}}=-\frac{1}{2}(1+i)(1-i)=-1,$$
so everything seems to work out fine. I'm guessing you went wrong by assuming
$$\sqrt{i}\times\sqrt{-i}=\sqrt{i\times-i}=\sqrt{1}=1,$$
but unfortunately square roots only obey such a rule when considering the square root as a single-valued function on the (nonnegative) real numbers. On the complex numbers the square root is not single valued, there is no canonical square root of a complex number.
$i = e^{\pi i/2}$ \implies $\sqrt{i} = e^{\pi i/4}$

$\sqrt{-i} = e^{\pi i/2} * e^{\pi i /4}$

$\sum = e^{\pi i/4}(1 + e^{i \pi/2}) = (1 + i)/\sqrt{2}(1 + i) = i\sqrt{2}$