Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of z^Infinity and Infinity^z #24

Open
harrysarson opened this issue Mar 9, 2018 · 29 comments
Open

Behaviour of z^Infinity and Infinity^z #24

harrysarson opened this issue Mar 9, 2018 · 29 comments

Comments

@harrysarson
Copy link
Contributor

What does the Riemann mapping say when it comes to the complex exponential?

@derknorton
@balagge

@harrysarson harrysarson changed the title Behaviour of Complex(Infinity).exp()? Behaviour of Complex(Infinity).exp()? Mar 9, 2018
@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@harrysarson
Copy link
Contributor Author

What does that make Complex(Infinity).exp() equal to?

@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@balagge
Copy link

balagge commented Mar 9, 2018

indeterminate. (no value, NaN, whatever. same as 0 / 0)

@balagge
Copy link

balagge commented Mar 9, 2018

wolfram:
kepernyokep 2018-03-09 17 26 18

@balagge
Copy link

balagge commented Mar 9, 2018

This is because
kepernyokep 2018-03-09 17 32 33
which means that if z = x + iy and z goes to infinity, then we cannot determine the limit of exp(z). For example, take the following z values: 0, i, 2i, 3i, .... Then the limit exp(0), exp(i), exp(2i), ... will be meaningless, as exp(n i) = cos n + i sin n, which is essentially a "random" point on the unit circle, clearly does not converge (neither to infinity, nor to any given complex number)

@balagge
Copy link

balagge commented Mar 9, 2018

or, if you take the z values: 0, i*pi, 2 i*pi, 3 i*pi, etc. (clearly z goes to infinity) then the exp(z) values will be +1, -1, +1, ... as exp(n i pi) is -1 if n is odd and + 1 if n is even.
complex exponentiation is always tricky.

@balagge
Copy link

balagge commented Mar 9, 2018

truly confusing, I never liked this part of complex theory.
https://en.wikipedia.org/wiki/Exponential_function#Complex_plane

@balagge
Copy link

balagge commented Mar 9, 2018

this is how wikipedia pictures the complex exp function. pretty cool. Brightness means the absolute value, color means the direction.

Now if you approach infinity "to the right", then you will have a sequence that also goes to infinity. However, if you approach it "to the top" (as in the example I wrote above), then you will be going around the unit circle. Same with the bottom direction.

If you go left (to the same complex infinity) than the exponentiation will go to zero...

https://upload.wikimedia.org/wikipedia/commons/a/a7/Complex_exp.jpg

@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@harrysarson
Copy link
Contributor Author

@derknorton Both cases are relivant but to clarify:

Complex(Infinity).exp() calculates e^Infinity so I was talking about the second case.

@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@harrysarson
Copy link
Contributor Author

harrysarson commented Mar 9, 2018

To summarise for complex z :

  1. 0 ^ Infinity === 0
  2. 1 ^ Infinity === 1
  3. z ^ Infinity === |z| < 1 ? 0 : NaN
  4. Infinity ^ Infinity === NaN
  5. Infinity ^ 0 === NaN
  6. Infinity ^ 1 === Infinity
  7. Infinity ^ z === Infinity

maybe?

@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@harrysarson
Copy link
Contributor Author

#24 (comment) says it should not

@derknorton
Copy link
Contributor

derknorton commented Mar 9, 2018 via email

@balagge
Copy link

balagge commented Mar 9, 2018

Wait. There are quite a few problems with exponentiation in the general cases. As a start, check out
https://en.wikipedia.org/wiki/Exponentiation#Complex_exponents_with_positive_real_bases
and
https://en.wikipedia.org/wiki/Exponentiation#Powers_of_complex_numbers
just to see the complexity of the issue.
It is not necessary to understand everything (or anything), but it is quite clear that exponentiation has a lot of pitfalls on the complex plane and cannot be easily handled.

Whenever an exponentiation involves Infinity (which, on the Riemann sphere means a single complex infinity), the only way to define the meaning is by using limits, so e.g. a ^ Infinity is the limit of a ^ z where z -> Infinity. However, determining such limits is not always intuitive, and, for some of the cases, even the simple exponentiation z ^ w (neither being Infinity) is hard.

I thought the question was about e ^ Infinity, because that is usually understood by the function exp(), and I think the Complex library has the same meaning.

@balagge
Copy link

balagge commented Mar 9, 2018

So I checked all of the other examples first on Wolfram Cloud, and actually most of them are indeterminate. I am still working on understanding each case, but there are serious challenges here, although I have a degree in math :)

Ok, so:

  1. 0 ^ Infinity is indeterminate. This one is not so difficult to see, because choosing a sequence z_n = 1, 2, ..., you get 0 ^ (z_n) = 0,0,0,..., however another sequence w_n = -1, -2, -3, ... yields 0 ^ (w_n) = Infinity, Infinity, Infinity, ..... Therefore, the expression 0 ^ z has no definite limit if z -> Infinity.

@balagge
Copy link

balagge commented Mar 9, 2018

  1. 1 ^ Infinity is indeterminate. This I do not understand as of yet. Still working on it.

@balagge
Copy link

balagge commented Mar 9, 2018

  1. z ^ Infinity is indeterminate, even if |z| < 1. This would require determining a definite limit for z ^ w (where w -> Infinity). However, unless z is a positive real number, such powers are difficult to calculate and some (most) do not even have a single well-defined value, but many different (sometimes infinitely many different) possible results. As I have said before, exponentiation on the complex plane is hard and counter-intuitive.

Quote from wikipedia:

"Trying to extend these functions to the general case of noninteger powers of complex numbers that are not positive reals leads to difficulties. Either we define discontinuous functions or multivalued functions. Neither of these options is entirely satisfactory."

In other words, z ^ w is better left undefined, unless z is a positive real.

This means that the infinite case, z ^ Infinity should, in my opinion, be indeterminate for the general case (z is not a positive real).

However, for the positive real case: this is also indeterminate, unless z = 1, which is the case above, and I am not sure about it. This case is basically very similar to e ^ Infinity, because a power a ^ w can be solved by writing a ^ w = e ^ (ln(a) w ). Then decompose w = x + i y, you get e ^ (ln(a) * (x + i y)), which is e ^ (ln(a) x + i ln(a) y) = a ^ x * (cos (ln(a) y) + i sin (ln(a) y). This is a bit of a mess at first sight, but it is essentially the same as the natural base case mentioned earlier, unless a = 1. For a <> 1, you can always choose some silly w's, so that e.g. the real part of w (which is x) is fixed, and then you get "random" numbers on the circle with radius a^x, clearly divergent.

@balagge
Copy link

balagge commented Mar 9, 2018

  1. Infinity ^ Infinity === NaN that is correct.
  2. Infinity ^ 0 === NaN
  3. Infinity ^ 1 === Infinity that is correct by definition.
  4. Infinity ^ z is, unfortunately, again indeterminate, unless z is a non-zero real number. However, for reals, this may have a value: Infinity ^ x is Infinity, if x is positive, 0 if x is negative. I am a bit tired to be 100% sure, but this is what Wolfram gives as a result and it seems ok.

@balagge
Copy link

balagge commented Mar 9, 2018

Summary:

Any exponentiation involving Infinity (either as base or exponent) is indeterminate, except:

(6) Infinity ^ 1 === Infinity,
(7a) Infinity ^ z === Infinity, if z is a positive real number (Im(z) === 0, Re(z) >0)
(7b) Infinity ^ z === 0, if z is a negative real number (Im(z) === 0, Re(z) < 0)

And, the only question is the result of 1 ^ Infinity, but I need some more time on that one. (but wolfram gives indeterminate for that as well)

@harrysarson
Copy link
Contributor Author

For (7b) could we qnot have Infinity ^ z === 0 if the real part of z is negative. Wolfram agrees:
image.

I can buy that (1), (3) and (4) should all be NaN.

As for 1 ^ Infinity, could this not be 1? The best argument that I can think of against this is that it is z ^ Infinity is NaN for all z !== 1 so it might as well be NaN for 1 aswell.

@harrysarson harrysarson changed the title Behaviour of Complex(Infinity).exp()? Behaviour of z^Infinity and Infinity^z Mar 14, 2018
@harrysarson
Copy link
Contributor Author

harrysarson commented Mar 14, 2018

To summarise for any complex z:

  1. z ^ Infinity === NaN
  2. Infinity ^ z === Infinity if Im(z) === 0 and Re(z) > 0
  3. Infinity ^ z === 0 if Re(z) < 0
  4. Infinity ^ 0 === 1
  5. Infinity ^ z === NaN otherwise

Question: should Infinity ^ 0 === 1 which would fit with behavour for Numbers in js?

@derknorton
Copy link
Contributor

derknorton commented Mar 15, 2018 via email

@harrysarson
Copy link
Contributor Author

image

harrysarson added a commit to harrysarson/Complex.js that referenced this issue Mar 15, 2018
Previous behaviour was inconsistant and was not tested for. This
commit ensures that z^inf and inf^z return reasonable and consistant
values.

See infusion#24 for the dicussion on the behaviour which can be summaried as:

    z ^ Infinity === NaN
    Infinity ^ z === Infinity if Im(z) === 0 and Re(z) > 0
    Infinity ^ z === 0 if Re(z) < 0
    Infinity ^ 0 === 1
    Infinity ^ z === NaN otherwise
@balagge
Copy link

balagge commented Mar 21, 2018

@harrysarson

For (7b) could we qnot have Infinity ^ z === 0 if the real part of z is negative.

you are right, provided that exponentiation is otherwise defined with a fixed branch cut of the log() function.

Wikipedia has a good explanation on how to compute a complex power:

https://en.wikipedia.org/wiki/Exponentiation#Computing_complex_powers

So if we want to compute w^z, we must choose a branch cut of log(), normally (-pi, pi]

Then w must be written in polar decomposition w = r e^(i theta) (choosing theta so that pi < theta <= pi, the principal branch cut), and z in Cartesian decomposition z = c + d i). The following formula gives the result:

w^z = r^c e^(-d theta) (cos(d log(r) + c theta) + i sin (d log(r) + c theta))

This indeed converges if Re(z) = c < 0 (w -> Infinity) , because the r^c part will converge to 0, the e^(-d theta) part is within a fixed range (here we use heavily that theta is in a fixed finite interval), and the rest is just a point on the unit circle, again bounded.

Generally, with multi-valued powers, this does not work, because theta can have any value and might "work against" the r^c part, hence no convergence.

Bottom line: if Complex.js defines z^w using this approach of a fixed branch cut, then Infinity^z = 0 if Re(z) < 0. You are right, I was wrong. :)

@balagge
Copy link

balagge commented Mar 21, 2018

For Infinity ^ 0 all material that I can find says it is indeterminate (even with real infinity)

https://en.wikipedia.org/wiki/Indeterminate_form

Infinity ^ 0 cannot be computed with lim z^0 (z -> Infinity). (That approach would yield Infinity * 0 = 0 as well, clearly wrong, az Infinity * 0 is also indeterminate)

The right way is with lim z^w (z -> Infinity, w -> 0). And that does not converge generally.

@balagge
Copy link

balagge commented Mar 21, 2018

Funny that javascript has Math.pow(Infinity,0) === 1. Yeah, that is a problem. But javascript also has Math.pow(-2, Infinity) === Infinity, which is even more silly. I do not know where they got that idea ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants