Help with calculating $(3+5i)^6$ I want to calculate $(3+5i)^6$ with $i = \sqrt{-1}$, but somehow I'm doing something wrong.
How I calculate it:
Say $z = x + yi = 3+5i$, so $z^6$ has to be calculated.
$$|z| = \sqrt{3^2+5^2} = \sqrt{34}$$
$$\text{Arg}(z) = \arctan\left(\frac{y}{x}\right) = \arctan\left(\frac{5}{3}\right)$$
$$z = |z|e^{i\text{Arg}(z)} = \sqrt{34}e^{i\arctan(5/3)}$$
$$z^6 = (\sqrt{34})^6e^{6i\arctan{(5/3)}} =39304e^6e^{i\arctan(5/3)} = 39304e^6(\cos{(\arctan{(5/3)})} + i\sin{(\arctan{(5/3)})}$$
Now to calculate $\cos{(\arctan{(5/3)})}$ and $\sin{(\arctan{(5/3)})}$, I draw a right triangle with an angle $\theta$ and edges that satisfy this.

From this triangle, $$\cos{(\arctan{(5/3)})} = \cos\theta = \frac{3}{\sqrt{34}}$$ and $$\sin{(\arctan{(5/3)})} = \sin\theta = \frac{5}{\sqrt{34}}$$
So $$z^6 = 39304e^6\left(\frac{3}{\sqrt{34}} + i\frac{5}{\sqrt{34}}\right) = \frac{\sqrt{117912e^6}}{\sqrt{34}} + i\times\frac{196520e^6}{\sqrt{34}}$$
When plugged into a calculator (or in this case Julia), this is approximately
julia> 117912e^6/sqrt(34) + im*196520e^6/sqrt(34)
8.158032643069409e6 + 1.3596721071782347e7im

So I get $z^6 \approx 8.16 + 1.36i$. (I'm writing this part because I want to document everything I did, since I don't know what I'm doing wrong.)
However when I calculate $(3 + 5i)^6$ directly, I get
julia> (3 + 5im)^6
39104 - 3960im

So I get $z^6 = 39104 - 3960i$.
What am I doing wrong? Thanks in advance.
 A: This is not true:
$$e^{6i\arctan{5/3}} = e^6e^{i\arctan{5/3}}.$$
Instead, you should incorporate the 6 within your angle:
$$z^6 = 39304(\cos(6\arctan5/3) + i \sin(6\arctan5/3).$$
A: So just summarizing our comments: 
The only mistake here is that $e^{6\text{stuff}} \ne e^6 e^{stuff} $
Now if we do keep that in mind and simplify using the above arguments we end up right back where we started, so you may be curious what is the best way to actually evaluate this thing.
One strategy is using Pascal's triangle: to evaluate$ (a+b)^6 
$https://en.m.wikipedia.org/wiki/Pascal%27s_triangle
As:
$$(a+b)^6 = a^6 + 6a^5b + 15a^3b^2 + 20a^3b^3 + 15 a^2b^3 + 6ab^5 + b^6$$
Then, roll up your sleeves and get ready for some work: let $a=3, b=5i$ and evaluate/simplify.
Now to speed this up we can do some tricks:
$$(a+bi)^6 = (a+bi)^4 (a+bi)^2 = ((a+bi)^2)^2)(a+bi)^2$$
This is easy to evaluate:
Let, a=3, b=5i, then
$$(3+5i)^2 = 9 -25 + 30i = -16+30i$$
$$((3+5i)^2)^2 = (-16+30i)^2 = 256 -900 -2\times 16\times 30 $$
Then multiply these together to finish :).
Lmk if you have any questions
A: Generalize the problem, when $\text{z}\in\mathbb{C}$ and $\text{n}\in\mathbb{R}$:
$$\text{z}^\text{n}=\left(\Re\left[\text{z}\right]+\Im\left[\text{z}\right]i\right)^\text{n}=\left(\left|\text{z}\right|e^{\left(\arg\left(\text{z}\right)+2\pi k\right)i}\right)^\text{n}=\left|\text{z}\right|^\text{n}e^{\text{n}\left(\arg\left(\text{z}\right)+2\pi k\right)i}=$$
$$\left|\text{z}\right|^\text{n}\cos\left(\text{n}\left(\arg\left(\text{z}\right)+2\pi k\right)\right)+\left|\text{z}\right|^\text{n}\sin\left(\text{n}\left(\arg\left(\text{z}\right)+2\pi k\right)\right)i$$
Where $\left|\text{z}\right|=\sqrt{\Re^2\left[\text{z}\right]+\Im^2\left[\text{z}\right]}$, $\arg\left(\text{z}\right)$ is the complex argument of $\text{z}$ and $k\in\mathbb{Z}$.
