Wikipedia:Reference desk/Archives/Mathematics/2016 March 8

Mathematics desk
< March 7 << Feb | March | Apr >> March 9 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


March 8 edit

Extract the real part of a complex number (without cheating!) edit

This is a question that has been on my mind lately, and also off-and-on over the years: How can one determine the real part (or equivalently the imaginary part) of an arbitrary and unknown complex number z?

More formally, I am looking for a function from the complex numbers (C) to the real numbers (R) that does the exact same thing that Re(z) does, but preferably composed of a suitable combination of elementary functions and/or operations, none of which rely on any sort of a posteriori knowledge of the real part, the imaginary part, or even the absolute magnitude or argument-angle (from  ) of a given z in the first place.

In the absence of such a function, I would conjecture that this is not possible; but I would be very interested in seeing a proof of that. DWIII (talk) 14:19, 8 March 2016 (UTC)[reply]

What "elementary functions" are allowed? If by that you mean things like sine, cosine, polynomials, etc., then it's true that you can't extract the real part because the function Re(z) is not a holomorphic function. Sławomir
Biały
14:27, 8 March 2016 (UTC)[reply]
Yes, if you restrict yourself to holomophic functions then no, as every combination of such is also a holomorphic function and Re(z) definitely isn’t. But one trivial exception is 1/2 (z + z), with z the complex conjugate. The conjugate is not holomorphic but it is an elementary complex function.--JohnBlackburnewordsdeeds 17:32, 8 March 2016 (UTC)[reply]
I'm not convinced that the complex conjugate is elementary. In fact our article on them states that elementary functions are analytic almost everywhere, though you do have to allow for multiple valued functions in that statement. But z is not analytic anywhere so it would be ruled out. That's assuming you're taking z as a function of a single complex variable z, but if you're taking z as a function of two variables x, y where z= x+iy, then it is elementary, but I'm pretty sure that counts as cheating in this context. I think you can actually state a stronger result, that if f(x)=x for real x (which would include Re) and f is analytic (which would include elementary functions) then f(z)=z for all complex z. This follows from the identity theorem, which is a pretty high powered result but you can show using only the Cauchy–Riemann equations that if f(x) is real for real x, and f is analytic and not constant, then f(z) is not real for all z. --RDBury (talk) 20:34, 8 March 2016 (UTC)[reply]
I concur: using the complex conjugate constitutes "cheating" since it immediately begs the question "How do you determine the complex conjugate of z without knowing z's imaginary part?". I admit I am still having trouble seeing as how the concept of holomorphic functions ties into all this, however (yes, I am continuing to read that and any associated articles)... DWIII (talk) 21:21, 9 March 2016 (UTC)[reply]
Holomorphic functions include the elementary functions so if you prove something can't be done with with them it proves it can't be done with elementary functions a fortiori. Note that in the context of complex variables, holomorphic and analytic are the same (different definitions which can be shown equivalent). Btw, what I should have said above is that you can show using only the Cauchy–Riemann equations that if f is analytic and not constant, then f(z) is not real for all z; it still holds even if the domain doesn't include the real line. (I do assume implicitly that the domain of f is open, otherwise the notion of being analytic is a bit unclear.) --RDBury (talk) 01:42, 10 March 2016 (UTC)[reply]
Over the quaternions, Re(q) = (q − iqi − jqj − kqk)/4. Since the complex numbers embed in the quaternions, you can get the real part of a complex number this way, but it might be considered cheating. -- BenRG (talk) 21:08, 8 March 2016 (UTC)[reply]
Quaternions usually make me roll my eyes, but this is cute and clever. --JBL (talk) 14:08, 9 March 2016 (UTC)[reply]
Amazing(!); the quaternion version works like a charm. I ran a quick test with my homebrew library of javascript functions with an arbitrary q as follows:
    q=[pi(),e(),phi(),gammaconstant()]
    i=[0,1,0,0]
    j=[0,0,1,0]
    k=[0,0,0,1]
    n=[-1,0,0,0]
    c=[0.25,0,0,0]
    a1=q
    a2=chainright(quaternionproduct,[n,i,q,i])
    a3=chainright(quaternionproduct,[n,j,q,j])
    a4=chainright(quaternionproduct,[n,k,q,k])
    realpart=quaternionproduct(c,chainright(directsum,[a1,a2,a3,a4]))
    OUTPUT: [3.141592653589793,0,0,0]
I'm looking forward to see if I can adapt this procedure for determining the i-j-k parts as well... DWIII (talk) 20:36, 9 March 2016 (UTC)[reply]