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

  • 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
    @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
    @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