Let $s \in R^{n}$ (meaning $s$ is $n \times 1$ vector), where $n$ is the dimension of the vector. The ideal sliding term, $\nu$ is taken to be:
 \begin{equation}
 \nu = \frac{s}{\|s\|}
 \end{equation} 
where $\| . \|$ is taken to be the Euclidean norm. When $n = 1$, the above equation represents a step function but with the value of at $s=0$ undefined.


So, my question is what other continuous approximations can I use to approximate the above equation such that all values are well-defined and the function is smooth? Notice that the approximation has to be able to hold true for vectors. Considering just the scalar case is not good enough for me. Ideally, I would the approximation to have the following characteristics:


1. **[differentiable](http://en.wikipedia.org/wiki/Differentiable_function#Differentiability_in_higher_dimensions) with respect to all s**
2. **having a closed form expression**
3. **Isn't a piecewise function**


I know this might sound a lot. I looking something like that so that I can use it to do Lyapunov analysis (stability theory). I have a feeling that there is something simple out there. 


I have written a long description in PDF format. You can download it [here](https://sites.google.com/site/yaohongkok/downloads/qca.pdf?attredirects=0&d=1). Any input is greatly appreciated. If there is anything unclear, feel free to ask me. Thank you!



Approximating higher dimension step function
A first pass to get continuity: for $||s||\geq \epsilon$, $f(s) = s/||s||$. For $||s||<\epsilon$,


$f(s) = \frac{s}{||s||} (e^{1/\epsilon^2-1/||s||^2})$


If you want differentiability you just need to fiddle with the $< \epsilon$ function to have a derivative of 0 in the increasing $||s||$ direction at $||s||=\epsilon$ (I'm not quite motivated enough to figure it out)


Alternatively if you're willing to accept your function never quite being correct


$f(s) = e^{-\epsilon/||s||^2} \frac{s}{||s||}$


