Why is $x^{\left(y\cdot i\right)}=\cos \left(y\cdot \ln \left(x\right)\right)+i\cdot \sin \left(y\cdot \ln \left(x\right)\right)$

Introduction

For a few months I have been using calculations of imaginative powers and I have come across the equation that most of you are familiar with by now being:

$$x^{\left(y\cdot i\right)}=\cos \left(y\cdot \ln \left(x\right)\right)+i\cdot \sin \left(y\cdot \ln \left(x\right)\right)$$

$x$ and $y$ are both considered as variables in this instance.

Question

How is this equation come about, I have a feeling it is something to do with $e$ being the derivative of itself, however, I haven't done any calculus yet at my school (since in the United Kingdom, Calculus isn't until A level).

I was wondering if anyone would be able to give a helpful explanation of why this is true, not that I'm doubting it, just looking for some more knowledge.

I have actually created a desmos graph for any of you who are interested, it uses real numbers and maps them onto an imaginary plane. Here is the link:

$x^{\left(y\cdot i\right)}$ graph

Hope that you like the graph and hopefully you can help me out with this question.

• Wait, so have you learned the taylor expansion series yet? – Crescendo Aug 20 '17 at 15:14

That is because of how the exponential function behaves on complex plane: $$e^{a+ib} = e^a (\cos(b) + i \sin(b))$$ This identity can be proved in various ways.
The usual definition of exponentiation for real or complex numbers is that $x^y=e^{y \ln(x)}$. In the real numbers this is fine. In the complex numbers the natural log is multivalued as you can add $2\pi i$ to one value of the logarithm and get another. Once you choose the branch of the log, we have $x^{yi}=e^{yi\ln (x)}$ We can then plug that into Euler's formula $e^{iz}=\cos(z)+i \sin(z)$to get $$x^{yi}=\cos(y \ln(x))+i\sin(y\ln(x))$$
We can use the expansion$$a^x=1+x\log a+\frac {x^2\log^2a}{2!}+\frac {x^3\log^3a}{3!}+\ldots$$to expand $x^{yi}$ and show that the expansion is equivalent to $\cos\left(y\log x\right)+i\sin\left(y\log x\right)$. The formula above can be proven using Newton's generalized binomial theorem, and a bit of algebraic manipulation. Replacing $x$ with $yi$ and $a$ with $x$, we get\begin{align*}x^{yi} & =1+yi\log x-\frac {y^2\log^2x}{2!}-\frac {y^3i\log^3x}{3!}+\frac {y^4\log^4x}{4!}+\ldots\\ & =\left(1-\frac {y^2\log^2x}{2!}+\frac {y^4\log^4x}{4!}-\ldots\right)+i\left(y\log x-\frac {y^3\log^3x}{3!}+\frac {y^5\log^5x}{5!}-\ldots\right)\\ & =\cos\left(y\log x\right)+i\sin\left(y\log x\right)\end{align*}