SOLUTION: Consider the function f(x)= |x-1|+|x-2| Show that f(x)= -2x+3, if x &#8804; 1 1 if 1 < x < 2 2x-3 if x &#8805; 2

Algebra.Com
Question 1087149: Consider the function f(x)= |x-1|+|x-2|
Show that f(x)= -2x+3, if x ≤ 1
1 if 1 < x < 2
2x-3 if x ≥ 2

Answer by jim_thompson5910(35256)   (Show Source): You can put this solution on YOUR website!
Given function:
Let and
That means

We can write the absolute value functions, g(x) and h(x), into piecewise function form
For g(x) we have

which basically says if OR if
and for h(x) we have

which basically says if OR if

We have three intervals
Interval A: the interval where
Interval B: the interval where
Interval C: the interval where

Focus on interval A. Since here this means that and
Therefore, when
In short, when

Now move onto interval B. We have . This interval will have us use g(x) = x-1 and h(x) = -(x-2). Add the functions to get
when
In short, when

Finally interval C. Now . For this interval and
So, when
In short, when

To recap, we found the following
when
when
when
Which can be combined to form the piecewise function

So this proves that overall, for all real numbers x

As visual confirmation, here is a graph showing a side by side comparision of f(x) and k(x). I let f(x) = |x-1|+|x-2| while k(x) is the piecewise function equivalent form. The two function curves are blue and brown respectively. As you can see, they are identical. If you laid them on the same xy coordinate system then you'd have the same graph. One function curve would overlap the other perfectly.
Note: The graph was created with GeoGebra (free graphing software).

RELATED QUESTIONS

Evalue the piecewise function at the indicatied values x^2+$x if x if x ≤... (answered by Boreal)
Evaluate each piecewise function for x=-3 and x=4. A). f(x)= {10 if x < 4 {-1 if x (answered by stanbon)
evaluate the piecewise defined function at the indicated values X^2+4x if x ≤... (answered by Fombitz)
If f(x)= x+ 1/x, show that f(x).f(x+1/x)=f(x^2)+3 Thanks!!... (answered by tommyt3rd)
Evaluate the piecewise function at the given value of the independent variable. f(x)= (answered by stanbon)
Piecewise confuse me. Please help me understand this equation. Evaluate the piecewise (answered by TimothyLamb)
If f(x)=log(1-x/1+x) that show that... (answered by KMST)
Function: f(x)= 2x^2-x-1 If f(x)= =1, what is x? (answered by algebrahouse.com,MathLover1)
given the function f(x)= 2x, if 0 (answered by Fombitz)