# I can't find a absolute value function that have [-1,1] range

I want a function $f:\mathbb{R}\to[-1,1]$ with absolute value like $f(x)=|a-x|\ldots$ that have $[-1,1]$ range. Can anybody help me?

-
What is it exactly that you are asking? $f:[-1,1]\mapsto [0,1]$ or some function that $f:[a,b]\mapsto [-1,1]$? Whats wrong with the regular absolute value function on that range? –  example Apr 5 '12 at 9:17
@example regular absolute value function on that range??? –  ahmadali shafiee Apr 5 '12 at 9:19
I thought you meant $f:[-1,1]\mapsto [0,1]$, in that case $f(x)=|x|=\begin{cases}x\quad x\ge 0 \\ -x\quad x<0\end{cases}$ works fine. You want $f:\mathbb{R}\mapsto[-1,1]$. may I ask in what way it should map there? (obviously it's not the absolute value function) –  example Apr 5 '12 at 9:23
It would help if you elaborated on why you want such a function and what you intend to do with it. –  Rahul Apr 5 '12 at 9:33

The question is unclear. Maybe this answer will move you to clarify. Let $f(x)=\sin x$. Then $f$ has domain $\bf R$ and range $[-1,1]$, as you want.

EDIT: Here's one that uses the absolute value function: $$f(x)=-1+{2|x|\over\sqrt{x^2+1}}$$

-
with absolute value? –  ahmadali shafiee Apr 5 '12 at 19:33
You don't seem to be getting the idea. Nobody knows what you mean! No one is going to be able to help you until you explain what you want, and that explanation has to be more than just an inane repetition of the phrase, "absolute value!". –  Gerry Myerson Apr 10 '12 at 12:49

What i have understood is, For what values of x, the function f(x) belongs to [-1 ,1]. Am I correct???

If it is correct, the answer is, x belongs to [a-1 , a+1].

-
not it's not correct! $f:\mathbb{R}\to[-1,1]$ –  ahmadali shafiee Apr 5 '12 at 19:19
Ok. Let me know what we find in this problem? –  Prasad G Apr 6 '12 at 3:57
you said the domain of the function that it's range is $[-1,1]$ –  ahmadali shafiee Apr 6 '12 at 7:12
Ok. Take f(x) = cos x and sin x . The domain of these functions is Set of real numbers and Range is [-1,1]. –  Prasad G Apr 6 '12 at 7:38
absolute value function! –  ahmadali shafiee Apr 6 '12 at 7:39