What is the general form for complex numbers raised to whole number powers?

827 Views Asked by At

Say I have a complex number, $a+bi$, and I want to raise it to a whole number power $n$. I know I can calculate it as: $$(a+bi)^n= \sum_0^n{n\choose k}a^{n-k}(bi)^{k}$$ However, I want to be able to calculate the real and imaginary parts separately, for reasons dealing with computer programming that are irrelevant to the question. I attempted this with: $$\Re\{(a+bi)^n\} = a^n-\sum_1^{\lfloor{\frac{n}{2}}\rfloor}{n\choose 2k}a^{n-2k}b^{2k}$$ and $$\Im\{(a+bi)^n\} = i\sum_0^{\lceil{\frac{n}{2}}\rceil}{n\choose 2k+1}a^{n-(2k+1)}b^{2k+1}(-1)^k$$ But I am 100% convinced I have made a mistake and lost the plot on what I'm trying to do.

Am I correct in my thinking? And if not, how could I fix these equations?

2

There are 2 best solutions below

1
On BEST ANSWER

Take a look at this thread:

Given a complex number $z=a+bi$, its $n$th power can be written in closed form as $$(a+bi)^n=\sum_{k=0}^{\left\lfloor n/2\right\rfloor }\left(\begin{array}{c} n\\ 2k \end{array}\right)(-1)^{k}a^{n-2k}b^{2k}+i\sum_{k=0}^{\left\lfloor n/2\right\rfloor }\left(\begin{array}{c} n\\ 2k+1 \end{array}\right)(-1)^{k}a^{n-2k-1}b^{2k+1}.$$

5
On

Write the number in polar form:

$$a+ib=z=|z|e^{it}\implies z^n=|z|^ne^{int}\implies$$

$$\text{Re}\,(z^n)=|z|^n\cos nt\;,\;\;\text{Im}\,(z^n)=|z|^n\sin nt$$

...as simple as that!