What is the range of the function f(x) = x/(1+|x|)?

2 Answers
Jun 25, 2018

(-1,1)

Explanation:

First split it into 2 functions, when x>=0 let f^1(x)=x/(1+x)
and when x<0 let f^2(x)=x/(1-x) now we have 2 functions that are continuous on their domains.

Take the lim_(x->oo) x/(1+x) Substitution give (oo)/(oo) therefore we can use L' Hopitale to show the function approaches 1 at infinity.

Take the lim_(x->-oo) x/(1-x) Substitution gives -(oo)/(oo)
therefore we can use L'Hopitale once more to show the function approaches -1 at -oo therefore adding the range of our two continous function shows the original f(x) in (-1,1)

Jun 25, 2018

(-1,+1) over the non-infinite real domain

Explanation:

First search for minima and maxima of the function. We do this by setting its first derivative to zero. But there's a catch with this function - the modulus of the variable that is in the denominator of the fraction.

By the quotient rule,
d/dx[x/(1+|x|)]=((1+|x|)-xd/dx[1+|x|])/(1+|x|)^2

But what is d/dx|x|?

We split the function g(x)=|x| into two parts, around its change of behaviour at x=0:
If x>=0, then g(x)=x
If x<0, then g(x)=-x
Note that at x=0, both apply: g(x)=x=-x.

We can differentiate each of these separately to obtain a derivative for each part of the function (note that we'll leave x=0 out for now):
If x>0, then g'(x)=1
If x<0, then g'(x)=-1
As there is a sharp kink in the function |x| at x=0, it is not differentiable there and there is no immediately obvious value to assign to its derivative at that point.

There are a couple of ways of writing g(x) as a single expression. We can write it without introducing new notation by writing g(x)=|x|/x (or equivalently x/|x|), but this is a bit cumbersome when it is basically a piecewise constant function. A better solution is to use the sign function (also known as signum), defined by
If x>0, then sgn(x)=1
If x=0, then sgn(x)=0
If x<0, then sgn(x)=-1

The choice of value for x=0 is largely immaterial, fits the concept of the function, and has the advantage of symmetry. But let's not forget that we've made a choice here.

Return to problem

We'd deduced that
d/dx[x/(1+|x|)]=((1+|x|)-xd/dx[1+|x|])/(1+|x|)^2

Now we can complete this differentiation and set it to zero:
((1+|x|)-xsgn(x))/(1+|x|)^2=0

We know that for any real number x the denominator will never be <1, so there are no nasty infinite blow-ups lurking. We simplify:
1+|x|-xsgn(x)=0
1+|x|=xsgn(x)

Let's split this into pieces again:
If x>0, then we want 1+x=x, i.e. 1=0
If x=0, then we want 1=0 (notice that the chosen value doesn't matter)
If x<0, then we want 1-x=-x, i.e. 1=0

All three produce an immediate contradiction, so there are no solutions over the real numbers to (df)/dx=0. Thus f has no turning points - it is monotonic over the whole range (-oo,oo). So its two real infinite limits give us the two extremes of the range, and we can now solve the problem.

Real infinite limits

The positive infinite limit is 1: |x| dominates the constant in the denominator for large absolute values, and is equal to the x numerator for positive values. Hence lim_(x->+oo)x/(1+|x|)=lim_(x->+oo)x/|x|=1

The negative infinite limit is -1: |x| is equal to -x for negative values. lim_(x->-oo)x/(1+|x|)=lim_(x->-oo)x/|x|=-1

So the range of our function f(x) with the domain taken as the real axis (not including infinities) is (-1,+1). If we do include infinities, we add the end points of the open interval to make it closed: [-1,+1].

Sanity check our solution by plotting the graph of the function along with the asymptotes that we've deduced:
graph{(y-x/(1+|x|))(y-1)(y+1)=0 [-100, 100, -2, 2]}