# Absolute value

1. Oct 3, 2008

### garyljc

1. The problem statement, all variables and given/known data
Rewrite the following expressions without absolute value signs, treating various cases separately where neccesary

2. Relevant equations
a-Abs[(a-(abs)a)]

the question is do i have 2 answers to this ?

2. Oct 3, 2008

### Hootenanny

Staff Emeritus
Yes there will be two cases. At first inspection one might conclude that there would be four cases, but you should note that one of the absolute functions is not necessary.

3. Oct 3, 2008

### HallsofIvy

Staff Emeritus
There is only one[/b\] function for this, which may have different parts.

If f(x)= a- |a- |x||, then, of course, you need to look at x< 0 and x> 0, then at the cases |x|> a and |x|< a.

You could also write this as a single "formula" using the Heaviside step function which is defined as H(x)= 0 if x< 0, H(x)= 1 if $x\ge 0$.

4. Oct 3, 2008

### garyljc

why would there be 4 cases ?

5. Oct 3, 2008

### HallsofIvy

Staff Emeritus
Hmmm, the function is a-|a- |x||. If x> 0 that is a- |a- x| so if x< a, that is if a-x> 0, we have a- (a- x)= x. If x> a, that is if a- x< 0, |a-x|= -(a-x) and we have a+(a-x)= 2a- x.

If x< 0, so we have a- |a+ x|. Now if a> -x, so x+ a> 0, that is a- (a+ x)= -x. Finally if a< -x so x+ a< 0, that is a+ (a+x)= 2a+ x. Looks like 4 cases to me.