# Convert $\mathrm{i}^\pi$ into trigonometric form

How can I convert the complex number $$\mathrm i^\pi$$ to trigonometric form?

I usually do these steps:

1. take $$Z = a + b\mathrm i$$ form,
2. find $$r = \sqrt{a^2 + b^2}$$,
3. $$\cos(\phi) = a / r, \sin(\phi) = b / r$$,
4. find $$\phi$$ from the above 2 equations.

For $$\mathrm i^\pi$$ I have $$a = 1, b = 1, r = 1$$, $$\cos(\phi) = 1, \sin(\phi) = 1$$. There's no such $$\phi$$.

The online Convert Complex Numbers to Polar Form gives the answer $$\phi = 77.2567$$ or just, $$\phi = \dfrac{180 \arg(\mathrm i^\pi)}{\pi}$$

Some useful identities:

$$i = e^{i\pi/2}$$

$$(a^b)^c = a^{(bc)}$$

$$e^{i\phi} = \cos{\phi} + i\sin{\phi}$$

$$i^\pi = (e^{i\pi/2})^\pi = e^{i\pi^2/2} = 1 (\cos{(\pi^2/2)} + i \sin{(\pi^2/2}))$$

ComplexExpand [$$i^\pi$$]

$$\cos(\frac{\pi^2}{2}) + i\sin(\frac{\pi^2}{2})$$

• i don't get the logic behind the calculations. where is the pi^2/2 from? – user3132457 Nov 6 '18 at 6:21
• @user3132457 $\mathrm i = \mathrm e^{\mathrm i \pi/2}$ – Αλέξανδρος Ζεγγ Nov 6 '18 at 7:26

That Gravity Guy answers it very nicely, but if you want to see a drawn out calculation, first get your value into Exp[x] form:

I^Pi == E^x

Log[%[]] == Log[%[]] // PowerExpand
(*(I π^2)/2 == x*)

Solve[%, x] // Flatten
(*{x -> (I π^2)/2}*)


Now we can just convert to trig

ExpToTrig[E^x] /. %
(*Cos[π^2/2] + I Sin[π^2/2]*)


Get r, ϕ from

{Re[%], Im[%]} // ToPolarCoordinates // N
(*{1., -1.34838}*)


If you like degrees better

{%[], %[]/°}
(*{1., -77.2567}*)


So, first of all, you made a small mistake : In your method, you have $$a = 0$$, and not $$a=1$$ that makes $$b=1$$, $$r=1$$, $$\cos(\phi)=0$$ and $$\sin(\phi)=1$$, that implies $$\phi = \frac{\pi}{2} + 2k\pi$$ for any $$k \in \mathbb{Z}$$.

The problem is all values of $$k$$ are correct (as $$\cos(\alpha) = \cos(\alpha+2\pi)$$, whatever the value of $$\alpha$$, and we have the same for $$\sin$$), and as such, $$i^\pi$$ doesn't make any mathematical sense, since $$e^{i\frac{\pi^2}{2}} \neq e^{i\frac{5\pi^2}{2}}$$, and mathematically speaking, you have no reason to chose one over the other.

Math software usually ignore this by arbitrarily choosing the argument value that is between $$-\pi$$ and $$\pi$$ (or sometimes $$0$$ and $$2\pi$$, which even there can lead to different results if you took, for instance, "$$(-i)^\pi$$" )

• in this case phi is (Pi^2)/2 + 2 Pi k and E^(I*(Pi^2/2)) does indeed equal E^(I*(Pi^2/2 + 2*Pi)). You seem to be adding 2*Pi^2 to phi which is not right. I^Pi makes perfectly good mathematical sense. – Bill Watts Nov 6 '18 at 18:57