1
$\begingroup$

How to express this function in closed form without condition verfication and Re and Im functions (only with absolute value function)?

$$f(z)= \begin{cases} - \operatorname{sgn}(\operatorname{Im}(z)), & \mbox{if } \operatorname{Re}(x)=0 \\ \operatorname{sgn}(\operatorname{Re}(z)), & \mbox{if } \operatorname{Re}(x)\ne 0 \end{cases}$$

  • 1
    Is this a question, or a puzzle? If the former, why the arbitrary restriction? If you must have a one-line formula for this, you could do it using indicator functions, for example...2011-03-22
  • 0
    Yes, I want a one-line formula.2011-03-22

2 Answers 2

2

Does ${\rm sgn}(x) = 0$ if $x = 0$? If so, then using Zhen's indicator function idea and simplifying,

$$f(z) = {\rm sgn}({\rm Re}(z)) - {\rm sgn}({\rm Im}(z)) (1-{\rm sgn}({\rm Re}(z))^2)$$

But you may find that with $\rm sgn$ any sort of derivation you'll probably want to split up into cases that are already conveniently split up. That is, even though at first the definition by cases seems more obscure and not 'closed form', it may in the end be easier to manipulate in the 'by cases' form.

('closed form' has many interpretations, and 'by cases' can fall on either side)

  • 0
    Thank you. It seems this expression can be expressed without Im and Re.2011-03-22
  • 0
    @Anixx: Yes, I forgot about that. $Re(z) = \frac{z+\bar{z}}{2}$ and $Im(z) = \frac{z-\bar{z}}{2}$. But then you may also want to remove $\bar{z}$, which can be done with exponential's and trig. At this point you're getting pretty messy, and you still have no way of removing 'sgn' nicely (see Eelvex's comment) because at the places where $x\over |x|$ is undefined is exactly where you have special cases in your function. So the exercise to convert to 'elementary' functions might be interesting, but I don't think it is immediately useful.2011-03-23
  • 0
    @Annix: I have since learned that I was wrong that $\bar{z}$ can be done 'closed' form with exponentials and trig (meaning 'elementary functions') See: http://math.stackexchange.com/questions/28594/complex-conjugate-of-z-without-knowing-z-xi-y/28769 . But my point still stands: sometimes closed form is a good thing, but sometimes it just obfuscates what is going on (where a case analysis, despite felling clunky, would still be more ... instructive)2011-03-29
1

One way would be:

$$ f(z) = -\operatorname{sgn}(-iz)(1-g(x)) + \operatorname{sgn}(\frac{z+\bar{z}}{2})g(x)$$

where

$$ g(x) = |\operatorname{sgn}(\frac{z+\bar{z}}{2})| $$

Or:

$$ f(z) = \operatorname{sgn}(iz)(1-|\operatorname{sgn}(\frac{z+\bar{z}}{2})|) + \operatorname{sgn}(\frac{z+\bar{z}}{2}) $$

  • 0
    Is the sgn(iz), i.e of an imaginable value defined somehow?2011-03-22
  • 0
    @Anixx: you can't express $\rm{sgn}$ without using some step function unless you know that $z\neq 0$. In that case $\rm{sgn}(z) = \frac{z}{|z|}$.2011-03-22