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?
 A: 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.
A: You have to define properly the square root of a complex number. Use the polar representation $z=re^{i \theta}$ and solve this equation for $z=i$ 
A: The square root is not a well defined function on the whole complex plane $\mathbb{C}$. It is defined as
$$
\sqrt{z}=e^{\tfrac{1}{2} \log{z} }
$$
But the complex logarithm is not defined on the whole complex plane, you have to remove a semiline - https://en.wikipedia.org/wiki/Complex_logarithm.
The natural way to define the complex logarithm is to consider it as a function from $\mathbb{C}\backslash \mathbb{R}_{\leq0} =\{ z=\rho e^{i\theta}~|~ \rho>0\text{ and  } \theta\in(-\pi,\pi)\}$, that is the complex plane without the negative reals. Now the logarithm of an element $z=\rho e^{i\theta}$ becomes
$$
\log{z}=\log{\rho e^{i\theta}}=\log{\rho} + i\theta
$$
This way, the square root becomes
$$
\sqrt{z}=e^{\tfrac{1}{2}\log{z}}=e^{\tfrac{\log{\rho}}{2}+i\tfrac{\theta}{2}}=\sqrt{\rho}e^{i\tfrac{\theta}{2}}
$$
where by $\sqrt{\rho}$ i consider the square root of a real pisitive number $\rho$ that is an unique real positive number whose square is equal to $\rho$. It's just the natural square root you use for positive numbers, for example $\sqrt{25}=5$, $\sqrt{2}=1,41421\ldots$ .
Now, if you use this definition for the square root you will get
\begin{align}
\sqrt{i}=\frac{1+i}{\sqrt{2}}\\
\sqrt{-i}=\frac{1-i}{\sqrt{2}}
\end{align}
and putting this back in your equation you will find no contraddictions. This will also work if you change the branch of logarithm (https://en.wikipedia.org/wiki/Complex_logarithm#Branches_of_the_complex_logarithm) and the logarithm you are using. For example
$$
\log{\rho e^{i\theta}}=\log{\rho}+i\theta+i2\pi
$$
will also work, but will give you different results for the square root
\begin{align}
\sqrt{i}=-\frac{1+i}{\sqrt{2}}\\
\sqrt{-i}=-\frac{1-i}{\sqrt{2}}
\end{align}
As you can see the problem comes from the fact that $e^{i\theta}$ and $e^{i(\theta+2\pi)}$ are the same number, even though the exponents are different, so working with logarithms without being precise can lead to errors.
So, where did the problem come from? Well, essentially you didn't define $\sqrt{z}$ as a function, but as a set. You said
$$
\sqrt{i}=\pm\frac{1+i}{\sqrt{2}}
$$
Now this is not a function because it has multiple outputs, this is like saying that $\{\pm\frac{1+i}{\sqrt{2}}\}$ is the set of solutions of $x^2=i$. Now talking about values of $\sqrt{i} + \sqrt{-i}$ makes no sense, because you are talking about sums of sets. What is $\{3,5\} + \{6,2-i\}$? You have defined it as
$$
\{3,5\} + \{6,2-i\}=\{3+6,3+2-i,5+6,5+2-i\}
$$
that is, the set containing the sums of pars of elements from the original sets. To be honest, this is not so wrong, and sums of sets defined this way are often used. The main error came from the following reasoning. You said that 
$$
\sqrt{i}+\sqrt{-i}=i\sqrt{2}
$$
leads to an error when squaring because you obtain 
$$
2\sqrt{i}\sqrt{-i}=i\sqrt{2}
$$
Well, your error is hidden in the product. Being that $\sqrt{i}=\{\pm\frac{1+i}{\sqrt{2}}\}$ and $\sqrt{-i}=\{\pm\frac{1-i}{\sqrt{2}}\}$ we have that the product of these sets is the set $\sqrt{i}\sqrt{-i}=\{\pm\frac{1+i}{\sqrt{2}}\frac{1+i}{\sqrt{2}}\}=\{\pm 1\}$. In other words, to obtain $\sqrt{i}+\sqrt{i}=i\sqrt{2}$ you had to use $\sqrt{i}=\frac{1+i}{2}$ and $\sqrt{-i}=-\frac{1-i}{2}$. If put these values in the equation you will obtain $2\sqrt{i}\sqrt{-i}=2\frac{1+i}{2}\left(-\frac{1-i}{2}\right)=-2$, no contraddiction.\
Essentialy you have to be carefull when you work with things that have mutliple outputs ($\sqrt{i}=\pm\tfrac{1+i}{\sqrt{2}}$) because the relationships between these things depend on the output that you chose.
A: When writing $\sqrt{z}$, i.e., implying that the square root is a function on the complex plane, the common convention is that the result has a positive real part, and if $z$ is negative real, that the root with a positive imaginary part is chosen. Thus the result should read
$$
\sqrt{i}=\frac{1+i}{\sqrt2},\quad\sqrt{-i}=\frac{1-i}{\sqrt2}
$$
and consequently $\sqrt{i}+\sqrt{-i}=\sqrt2$.
That the result is real is compatible with $\overline{\sqrt{z}}=\sqrt{\bar z}$ (except at the discontinuous negative real half axis) so that $\sqrt{z}+\sqrt{\bar z}=2\,Re(\sqrt z)$ is (almost) always a real number.
A: $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}$
