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.

If $$f(x) = 0$$

when

$$0 < x \le 50$$

and

$$f(x) = 100$$

when

$$50 < x \le 100$$

How do you express the $f(x)$?

e.g. \begin{align} f(0) & = 0 \\ f(50) & = 0 \\ f(51) & = 100 \\ f(100) & = 100 \end{align}

share|improve this question
    
That is correct. –  qnoid Jan 12 '13 at 21:50
    
You have written $0\lt x\le50=0$, which is clearly not what you meant to write, since $50$ doesn't equal zero. Can you edit the body of your question, please, to bring it into line with what you actually mean to ask? –  Gerry Myerson Jan 12 '13 at 21:50
2  
@qnoid You already have a representation $$f(x) = \begin{cases} 0 & x \in [0,50]\\ 100 & x \in (50,100]\end{cases}$$ –  user17762 Jan 12 '13 at 21:56
add comment

3 Answers

up vote 2 down vote accepted

The proper expression would be $$f(x)=\begin{cases}0&:\ 0\leq x\leq 50\\ 100 &:\ 50<x\leq 100\end{cases}.$$

share|improve this answer
    
does this mean that a single function that finds y does not exist? –  qnoid Jan 12 '13 at 22:00
    
You are not likely to find an expression simpler than this. –  Austin Mohr Jan 12 '13 at 22:08
1  
@qnoid: This is what is called a piecewise function. It is a single function with different definitions depending on where $x$ is located. –  Clayton Jan 12 '13 at 22:11
add comment

Maybe this counts?

$f(x) = 100 \left[\frac{x}{50+0}\right]$, defined for $0\le x\le 100$

share|improve this answer
1  
This is basically the same answer, since the greatest integer function itself has a piecewise definition. –  Austin Mohr Jan 12 '13 at 22:12
add comment

It is easy to see:

$$f(x) = \begin{cases}0 & 0 \le x \le 50 \\ 100 & 50 < x \le 100\end{cases}$$

If you want an expression which can be put into "one equation" so to speak, you can have it, but whether it is better or worse is debatable.

$$ f(x) = 100 \left\lfloor \frac{x}{50} \right\rfloor$$

Where $\lfloor x \rfloor$ is the integer less than $x$. Note that this a little different, for example, this is defined even for $x \not\in [0, 100]$

share|improve this answer
    
This is basically the same answer, since the greatest integer function itself has a piecewise definition. –  Austin Mohr Jan 12 '13 at 22:13
    
@AustinMohr, agreed, and there is absolutely no way, or reason, to want to put a simple piecewise definition into a confusing linear one. –  George V. Williams Jan 12 '13 at 22:15
add comment

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.