# Error raising a complex number to a power

I am trying to do

$(3+7i)^5$

which acording to WolframAlpha and Mathway should be:

$23028−11228i$

Yet I instead get: $6123+14287i$

--

I'm getting that answer by doing:

$3^5 (7i)^0 + 3^4 (7i)^1 + 3^3 (7i)^2 + 3^2 (7i)^3 + 3^1 (7i)^4 + 3^0 (7i)^5$

and then just combining the like terms. Could anyone shed some light on what I'm doing wrong??

-
You missed all the $C^n_r$ terms. – Arctic Char Apr 11 '14 at 6:04
I'm still learning this, can you link me to somewhere or let me know what that is? I'm kinda finding my way in the dark on this one. – user2059300 Apr 11 '14 at 6:06

As John pointed out in the comment, you have used $$(a+b)^n = \sum_{k=0}^n a^k b^{n-k},$$ which is wrong. Instead, you should use $$(a+b)^n = \sum_{k=0}^n \binom{n}{k} a^k b^{n-k}.$$

-
Thank you so much! That was exactly what I needed! – user2059300 Apr 11 '14 at 6:15

Hint: An easier way to do this might be to first convert your number into polar form: $z = re^{i\theta}$. Then $z^5 = re^{i5\theta}$. From there, you can re-expand using Euler's formula.

-

You can save time by doing it another way:
By Euler :$3+7i=e^{iarctan\frac 73}$,
which means $(3+7i)^5=e^{i5arctan\frac 73}$
Now use a calculator to evaluate $5arctan \frac 73$. If we know that $5arctan \frac 73=\phi$
Then by Euler's equation again: $(3+7i)^5=e^{i\phi}=cos\phi+isin\phi$ . As to the reason why you didn't get it right:
$3^5 (7i)^0 + 3^4 (7i)^1 + 3^3 (7i)^2 + 3^2 (7i)^3 + 3^1 (7i)^4 + 3^0 (7i)^5$should actually be:
$3^5 (7i)^0 + 5*3^4 (7i)^1 + 10*3^3 (7i)^2 + 10*3^2 (7i)^3 + 5*3^1 (7i)^4 + 3^0 (7i)^5$.
To calculate the coefficients: Suppose we want to expand $(a+b)^n$, then $(a+b)^n=\Sigma^n_{r=0} \frac{n!}{r!(n-r)!}a^rb^{n-r}$. Now you get it.

-
Thanks for a great answer, but unfortunately I'm doing this for a very specific application and need it done in this way. I just need to learn what's missing from my above calculation. John said it's the Cnr terms, any idea where I can go from that? – user2059300 Apr 11 '14 at 6:14
you should notice that each term in the expansion should have a specific coefficient which is given by $\frac {m!}{n!(m-n)!}$. – pxc3110 Apr 11 '14 at 6:18