108k views
2 votes
Consider the function f(x)= 1-|x-1|+|x+1| for -3<x<3. Recall that the absolute function can be represented as a piece wise function: 
|x| = \left \{ {{-x ,x\ \textless \ 0} \atop {x, x \geq 0}} \right. Use this to express f(x) as a piece wise function.

hence graph.

User Lepike
by
6.5k points

1 Answer

3 votes
By the definition for the absolute value,


|x-1|=\begin{cases}x-1&amp;\text{for }x\ge1\\-(x-1)&amp;\text{for }x<1\end{cases}

|x+1|=\begin{cases}x+1&amp;\text{for }x\ge-1\\-(x+1)&amp;\text{for }x<-1\end{cases}

So for the compound function
f(x)=1-|x-1|+|x+1|, there are three intervals to consider. What happens when
x<-1? when
-1\le x<1? when
x\ge1?

You have


f(x)=\begin{cases}1-(-(x-1))+(-(x+1))=-1&amp;\text{for }x<-1\\1-(-(x-1))+(x+1)=2x+1&amp;\text{for }-1\le x<1\\1-(x-1)+(x+1)=3&amp;\text{for }x\ge1\end{cases}
User No Id
by
6.7k points