Trouble computing $\int_0^\pi e^{ix} dx$ 
I am trying to compute the integral of $\int_0^\pi e^{ix} dx$ but get the wrong answer. My calculations are $$
\begin{eqnarray}
\int_0^\pi e^{ix} dx &=& (1/i) \int_0^\pi e^{ix} \cdot i \cdot dx = (1/i) \Bigl[ e^{ix} \Bigr]_0^{\pi} \\
&=& (1/i) \Bigl[ e^{i\cdot \pi} - e^{i\cdot 0} \Bigr] = (1/i) \Bigl[ -1 - 1 \Bigr] \\
&=& -2 / i
\end{eqnarray}
$$

But WolframAlpha says the answer is $2i$. What am I missing?

your answer is correct just see that $-i =\frac{1}{i}$. Whereas it could be simpler to write 
$$e^{ix} = \cos x+i\sin x$$
Then $$\int_0^\pi e^{ix} dx = \int_0^\pi \cos x dx+i\int_0^\pi \sin x dx \\ =\left[\sin x\right]_0^\pi+i\left[-\cos x\right]_0^\pi=2i$$
