Simplifying |x|-|x-6|: A Math Tutorial

  • Context: Undergrad 
  • Thread starter Thread starter BoundByAxioms
  • Start date Start date
  • Tags Tags
    Simplifying Tutorial
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
BoundByAxioms
Messages
98
Reaction score
0
How could I go about expressing |x|-|x-6| without using absolute value signs?
 
Mathematics news on Phys.org
I would just look at when the expression inside each absolute value is negative or positive. For instance, if x is negative, then you easily get x - (x+6) = -6 so if x is any negative value, you'll get the constant function f(x) = -6.

You'll ultimately express it as a piecewise function but there shouldn't be many "pieces".
 
BoundByAxioms said:
How could I go about expressing |x|-|x-6| without using absolute value signs?

Here are two thoughts, entirely unsimplified (so you have something to do!).

1. |x| - |x - 6| =
(x) - (x - 6), x >= 0 and x - 6 >= 0
(x) - -(x - 6), x >= 0 and x - 6 < 0
-(x) - (x - 6), x < 0 and x - 6 >= 0
-(x) - -(x - 6), x < 0 and x - 6 < 0

2. sqrt(x^2) - sqrt((x - 6)^2)

Note that both assume that x is real.
 
If x< 0, both x and x-6 are negative so |x|- |x-6|= -x-(-(x-6)= -x+ x- 6= -6.

If [itex]0\le x< 6[/itex], x- 6 is negative so |x|- |x-6|= x- (-(x-6))= x+x- 6= 2x- 6
If [itex]6\le x[/itex], both x and x- 6 are positive so |x|- |x-6|= x- (x-6)= 6.

We can write
[tex]|x|-|x-6|= \left\{\begin{array}{cc}-6 & if x< 0\\2x-6 & if 0\le x< 6\\6 & if x>6\end{array}\right[/tex]

We could also use the Heaviside step function. H(x), which is 0 for x< 0 and 1 for [itex]x\ge 0[/itex]. We want to start with -6 for x<0 and for x> 0 we have to add 2x: -6+ 2xH(x).
Now, if x is greater than 6, we need to change that -6 to 6 and eleminate the 2x. We can do that by adding 12- 2x.

|x|- |x-6|= -6+ 2xH(x)+ (12- 2x)H(x- 6).
 
Thanks to all who responded, your help is appreciated!