# Absolute value function

#### paulmdrdo

##### Active member
Define f(x)= |x+3|-|x-3| without absolute value bars piecewise in the following intervals (-∞,-3);[-3,3);[3,+∞).

this is how i do the problem,

I removed the absolute value bars first

f(x)= x+3-x+3 = 6

now i don't know how to define it piecewise. can you show me how define it correctly. thanks!

#### MarkFL

Staff member
Re: absolute value function.

On the interval:

i) $$\displaystyle (-\infty,-3)$$

we have:

$$\displaystyle x+3<0\,\therefore\,|x+3|=-(x+3)$$

$$\displaystyle x-3<0\,\therefore\,|x-3|=-(x-3)$$

and so $$\displaystyle f(x)=(-(x+3))-(-(x-3))=-6$$

Can you try the other two intervals?