Calculating z^n without trigonometric functions

85 Views Asked by At

I'm looking for a formula to calculate z^n for complex z and integer n. I know that I can use the Moivre's formula but I will use the formula in a computer program so I don't want to use any trigonometric functions because of the low precisions.

Is there any other formula for this without any trigonometric functions?

2

There are 2 best solutions below

0
On BEST ANSWER

Exponentiation by squaring, as suggested by arbautjc in comments, will be more efficient than Abhra's binomial expansion.

Exponentiation by squaring works for repeating any associative binary operation a given number of times. Multiplication is one such operation, no matter whether what you multiply is ordinary real numbers or complex ones.

(For example, we can apply the general structure of "exponentiation" by "squaring" to repeated addition instead of repeated multiplication, to get a procedure for multiplying something by a positive integer. This yields Egyptian multiplication.)

0
On

Let $z=(x+iy)$,

then $z^n=(x+iy)^n=\sum_{j=0}^{n}\binom{n}{j}x^j(iy)^{(n-j)}$

Induction easily proves it.