1

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?

Jordan
  • 333
  • The answers in the other question provide equations for the power. Perhaps you would elaborate exactly what you don't understand about them. Also, as mentioned, you will have many different values for the the power, you need to select a range for the answer to fall. – EuYu Nov 21 '12 at 07:21
  • There will be infinitely many possible values. Which one you need will depend on what you need it for, most of the time the principal branch will suffice. – EuYu Nov 21 '12 at 07:37
  • http://math.stackexchange.com/questions/189703/does-ii-and-i1-over-e-have-more-than-one-root-in-0-2-pi/191966#191966 – lab bhattacharjee Nov 21 '12 at 07:55
  • I'm trying to work out the complex root of a complex number to make a fractal similar to the mandelbrot. but instead of z^2 + c, the zth root of c – Jordan Nov 21 '12 at 08:08

1 Answers1

1

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$.