(e^ix )^n = cos(nx) + i sin(nx) is called de Moivre’s formula.
The formula is named after the 17 th. century French huguenot mathematician Abraham de Moivre.
Also the variable in of a function can be a complex number. f(z) =z^2 and z = x + iy gives x^2 + 2ixy + y^2 with real part x^2 + y*2 and imaginary part 2xy.
A necessary condition for a function of a complex variable to be differentaible is that it satisfies the Cauchy -Riemann equations.