Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a useful (see below to understand bit more what is useful) function with the properties:

$$f(x)=0 \quad x< k$$ and $$f(x)=1 \quad x\geq k$$ to $$k \in \mathbb{R}$$

But it couldn't be a piecewise function like

$$f(x)=$$ \begin{cases} 0 & x< k \\ 1 & x\geq k \end{cases}

because this type of function can't help so much to manipulate formulas, for use in integration, derivative, transformations, hiperbolic and so on. This kind of function is calculated by a comparision, and I need a calculation using calculus, products, sums, etc.

This kind of function could be very useful and interesting to validate two different formulas. For example, if I have a formula (g1(x)) that holds to a problem when $x<k$ and another that holds when $x\geq k$ (g2(x)), I could use this function (f(x)) to wrote something like:

$$h(x)=f(x)g1(x)+(1-f(x))g2(x)$$

and this give to me a function $h(x)$ that will hold to all $x\in \mathbb{R}$.

To functions in integers we can write something like

$$h(x)=\frac{(-1)^{n-1}+1}{2}g1(x)+\frac{(-1)^n+1}{2}g2(x)$$

and the $g1(x)$ will hold to all $x\equiv 1 \mod 2$ and $g2(x)$ to all $x\equiv 0 \mod 2$.

Pratice:

Here are one example to understand a little about this strange $f$ function.

To $k=0$, $f(x)=0$ to $x<0$ and $f(x)=1$ to $x\geq 0$

Se we can define $h(x)=f(x)x-(1-f(x))x=xf(x)-x+xf(x)=2xf(x)-x=x(2f(x)-1)$

and this function, $x(2f(x)-1)$ is the modulus of the absolute value of a real number $x$.

Test this to $x=0$, $x=-1$ (or negative) and $x=1$ (or positive) and you will see.

share|improve this question
6  
Your first and second paragraphs each define a function; in fact, exactly the same function. Therefore, what you are asking seems to be, is there a function $f$ which is not the same as the same function $f$. –  Rahul Apr 13 '12 at 0:44
3  
Your question makes no sense, because the function is defined by what it does, not by how you express what it does. –  Zev Chonoles Apr 13 '12 at 0:48
    
The answer is: Yes, it is a step function and is indeed very useful in math and electrical engineering. See for example the Heaveside Step Function. –  Peter Grill Apr 13 '12 at 0:53
    
Rahul Narain is right: you specify the function in your first paragraph, and then ask for a different function with the same values. Strictly speaking, that makes no sense. Maybe what you mean is: "Is there a way to describe this function without defining it piecewise?" nubis gives an answer to this question, by describing it as the limit of smooth functions –  you Apr 13 '12 at 0:55
1  
@you, you're right, I was searching a way to describe it withou the piecewise. The truth, describe in a useful way. –  GarouDan Apr 13 '12 at 1:26

1 Answer 1

up vote 3 down vote accepted

A large number of functions like this exist, for instance: $$\lim_{n\rightarrow\infty}\frac{1}{2}+\frac{1}{\pi}\arctan(nx)$$

But there is really no reason not to use the Heaviside step function as it is popularly called, you can write the derivative as a dirac delta function.

More analytic function that suite your problem can be found here as well.

share|improve this answer
4  
Strictly, there is exactly one such function :) –  Mariano Suárez-Alvarez Apr 13 '12 at 0:57
    
@MarianoSuárez-Alvarez Would you be interested in reading a ""paper"" in Spanish I want to present to a professor in the UBA? (it is not long at all, and I'm guessing you'll find it interesting). –  Pedro Tamaroff Apr 13 '12 at 1:01
    
@MarianoSuárez-Alvarez - There are more than one, as you can see in the Wikipedia link. The logistic function is but one. –  nbubis Apr 13 '12 at 1:04
3  
What you mean is that there are many formulas which give that function but the function is one. –  Mariano Suárez-Alvarez Apr 13 '12 at 1:09
1  
For example: let $H$ be the Heavyside step function, take $g:\mathbb R\to\mathbb R$ to be any function whatsoever and consider the sequence $f_n=H+\frac1n g$, $n\geq1$. Then $f_n\to H$ pointwise. –  Mariano Suárez-Alvarez Apr 13 '12 at 1:16

Your Answer

 
discard

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.