$i^{2+ib},$ where $b\in\mathbb R$ 
Let $b\in\mathbb R.$ Find all the values of $i^{2+ib},$ and show that they are all real.

My attempt:
Let $y = i^{2+ib}.$
$$\ln y = (2+ib)\ln i\\
= (2+ib)\ln e^{i((\frac\pi2)+2n\pi)}\\
= (2i-b)((\frac\pi2)+2n\pi)$$
I am stuck at this step. How do I continue from here?
 A: Easiest is to forgo any consideration of logarithms.
$\displaystyle i = e^{i\pi/2}.$
Therefore, $~\displaystyle i^{2 + ib} = \left[e^{i\pi/2}\right]^{2 + ib}$.
This equals $~\displaystyle e^{(i\pi/2) \times (2 + ib)}.$
This equals $~\displaystyle e^{[(-b\pi/2) + i(\pi)]}.$
This equals
$$e^{-b\pi/2} \times e^{i(\pi)}. \tag1 $$
Since both factors in (1) above are real numbers, the product is a real number.

Addendum
To a certain extent, I pulled a fast one.
The assertion that $~\displaystyle i = e^{i\pi/2}$ is convention dependent.
More generally, $~\displaystyle i = e^{i[(\pi/2) + 2k\pi]} ~: ~k \in \Bbb{Z}.$
Therefore, $~\displaystyle i^{2 + ib} = \left[e^{i[(\pi/2) + 2k\pi]}\right]^{2 + ib}$.
This equals $~\displaystyle e^{i[(\pi/2) + 2k\pi] \times (2 + ib)}.$
This equals $~\displaystyle e^{(-b)(\pi/2 + 2k\pi) + i(\pi + 4k\pi)]}.$
This equals
$$e^{-b(\pi/2 + 2k\pi)} \times e^{i(\pi + 4k\pi)}. \tag2 $$
Since both factors in (2) above are real numbers, the product is a real number.
A: $$\Large i^{2+ib}\\\Large=e^{(2+ib)\log(i)}\\\Large=e^{(2+ib)\;i(\frac\pi2+2k\pi)}\\\Large=e^{i(4k+1)\pi}\:e^{-\frac b2(4k+1)\pi}\\\large\in\mathbb R.$$
A: You can have a look at my general presentation for $z^u$ when both $z$ and $u$ are complex numbers.
https://math.stackexchange.com/a/3729281/399263
So as I indicated express $z=i$ in polar form and write the periodicity explicitly: $$i=\exp\left(i\frac{\pi}2+2ik\pi\right)\text{ for }k\in\mathbb Z$$
Then multiply the inners of the exponential by $u=2+ib$ in cartesian form:
$i^{2+ib}=\exp\left((i\frac{\pi}2+2ik\pi)(2+ib)\right)=\exp\left(-\frac{\pi\,b}2-2k\pi\,b+i(\pi+4k\pi)\right)$
To make the principal value appear, separate what's depends on $k$ and what's not:
$$\begin{cases}z_{[0]}=\exp\left(-\frac{\pi\,b}2+i\pi\right)=-\exp(-\frac{\pi\,b}2)\\\\w^k=\exp\big(-2k\pi\,b+\underbrace{4ik\pi}_{=1}\big)=\exp(-2k\pi\,b)\end{cases}$$
Finally you get the multivalued expression $i^{2+ib}=z_{[0]}w^k\quad k\in\mathbb Z$, where $z_{[0]}$ is called the principal value, and $w$ the multiplicative factor, in this case you notice that the result takes only real values.
