[Math] $(-1)^X?$ complex numbersgraphing-functionswolfram alpha Why the negative number raised to X gives strange graph? Y = (-1) ^ X This is sine and cosine both functions in real and imaginary part. How to explain this? Best Answer If you heard about complex numbers, you should wonder how powers are evaluated in the complex. A possible definition is with the polar representation $$z=re^{i\theta}\implies z^x=r^xe^{i\theta x}$$ where $x$ is a real number. Then $$(-1)^x=(e^{i\pi})^x=e^{i\pi x}=\cos(\pi x)+i\sin(\pi x).$$ Beware that this is not the definition, because one also has $$(-1)^x=(e^{i3\pi})^x=\cos(3\pi x)+i\sin(3\pi x)$$ and similar with other $2\pi$ increments. More generally, a complex raised to a complex power can be defined by logarithms, $$z^w=e^{w\log z}=e^{w(\log r+i\theta)}=e^{x\log r-y\theta+i(x\theta+y\log r)}=e^{x\log r-y\theta}(\cos(x\theta+y\log r)+i\sin(x\theta+y\log r)).$$ Related Solutions[Math] Plotting $\frac{1}{\ln x}$ Using this software you should get following graph for $\frac{1}{\ln x}$ ,when $x>0$ [Math] Graph of a Log Function $\ln(x)$ is formally defined as the solution to the equation $e^y=x$. If $x$ is positive, this equation has an unique real solution, anyhow if $x$ is negative this doesn't have a real solution. But it has complex roots. Indeed, $\ln(x)= a+ib$ is equivalent to $$x= e^{a+ib}= e^{a} (\cos(b)+i \sin (b)) \,.$$ If $x <0$ we need $e^{a}=|x|$, $\cos(b)=-1$ and $\sin(b)=0$. Thus, $a= \ln(|x|)$ and $b=\frac{3\pi}{2}+2k\pi$.... Related Question
Best Answer
If you heard about complex numbers, you should wonder how powers are evaluated in the complex.
A possible definition is with the polar representation
$$z=re^{i\theta}\implies z^x=r^xe^{i\theta x}$$ where $x$ is a real number.
Then
$$(-1)^x=(e^{i\pi})^x=e^{i\pi x}=\cos(\pi x)+i\sin(\pi x).$$
Beware that this is not the definition, because one also has
$$(-1)^x=(e^{i3\pi})^x=\cos(3\pi x)+i\sin(3\pi x)$$ and similar with other $2\pi$ increments.
More generally, a complex raised to a complex power can be defined by logarithms,
$$z^w=e^{w\log z}=e^{w(\log r+i\theta)}=e^{x\log r-y\theta+i(x\theta+y\log r)}=e^{x\log r-y\theta}(\cos(x\theta+y\log r)+i\sin(x\theta+y\log r)).$$