Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a homotopy between $y=x$ to $y = {\rm step}(x-1)$ (to the limit; a very steep sigmoid is also ok). More formally, I look for a family $$y_\epsilon \in C^1(A,A)$$ where $$A = [0,\infty)$$ $$\epsilon \in [0, 1)$$ such that $$y_0 = y$$ $$\lim_{\epsilon \rightarrow 1} y_\epsilon = {\rm step}(x-1)$$ Any hint is appreciated.

share|cite|improve this question
What is $\mathrm{step}(x)$ supposed to be, the unit step function? In which case, formulae 17-27 here might be useful. – J. M. May 7 '12 at 2:26
It might help if you provided some context. Also, echoing @J.M., what is the value of step(0)? – copper.hat May 7 '12 at 4:06
Thanks for your replies! @J.M.: Yes, step(x) is unit step function. I've check the link but it hasn't helped me yet. In most of the formulas there (still checking some), the limit for $ t \rightarrow 0 $ ($\epsilon \rightarrow 1 $ in my notation) is $y=0.5$, and not $y=x$. I've tried to fix this adding some linear term, but I've realized there is an additional property I'd like to be satisfied: $y_\epsilon (0) = 0 $ for any $\epsilon$ – stefano May 7 '12 at 4:31
@copper.hat: In several optimal control problems, the optimal control $y$ is function of a costate $x\ge 0$. In bang-bang solutions, $y(x)$ is a step function, with $y(x) = 0$ for $x\in[0,1)$, and $y(x) = 1$ for $x\in [1,\infty)$. In minimum-effort solutions, $y(x) = x$. I am looking for a family of $C^1$ functions that can help my code transition between one case and the other (I need differentiability to use numerical continuation methods). Stefano – stefano May 7 '12 at 4:31
I don't follow, but am curious. When you change the cost function from, say, min. effort to min. time, the solution will change, typically from something smooth to some extreme value control. But surely that should happen by changing the cost, not by how you represent the solution 'vector'? – copper.hat May 7 '12 at 5:37

How about: $$ y_\epsilon(x) = (1-\epsilon) x + \epsilon\left( \frac{1}{2} + \frac{1}{\pi} \arctan\left(\frac{x-1}{1-\epsilon}\right)\right) $$ Clearly $y_0(x) = x$ and $$ \lim_{\epsilon \uparrow 1} y_\epsilon(x) = \lim_{\epsilon \uparrow 1} \left( \frac{1}{2} + \frac{1}{\pi}\arctan\left(\frac{x-1}{1-\epsilon}\right)\right) = \cases{1 & x > 1 \\ 1/2 & x=1 \\ 0 & x<1} $$

share|cite|improve this answer
Terrific, thanks! This will do. First time I check this website and already love it. Thanks guys! Stefano – stefano May 7 '12 at 4:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.