Simplified way of finding a complex number raised to another complex number

268 Views Asked by At

This question here has the answer but I'm still in school and I don't understand any of it. I'm writing a computer program that takes a complex number a + ib and raises it to c + id and I need to return the resulting complex number x + iy.

My Question is: What do I get when I raise (a + ib) to (c + id) to get an answer in the form (x + iy)?

I don't need to understand it all I just need to set

realPart = ....

and

imaginaryPart = ...

If there are multiple possible values then which one do I want? and how many possible values?

1

There are 1 best solutions below

3
On

The definition of exponentiation is $$a^b = \exp({b \log a})$$

You can compute $\exp$ and $\log$ using the power series

  • $$\exp_N(z) = \sum_{n=0}^N \frac{z^2}{n!}$$
  • $$\log_N(z+1) = -\sum_{n=1}^N \frac{(-1)^n z^n}{n}$$

where you make $N$ as bigger to get more accurate results.

If you already know how get the real and imaginary parts of sums and products of complex numbers you should be able to use these series to get the real and imaginary parts of $a^b$.