Web Analytics

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.

Verified Answer :

By the definition for the absolute value,

\(|x-1|=\begin{cases}x-1&\text{for }x\ge1\\-(x-1)&\text{for }x<1\end{cases}\)
\(|x+1|=\begin{cases}x+1&\text{for }x\ge-1\\-(x+1)&\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&\text{for }x<-1\\1-(-(x-1))+(x+1)=2x+1&\text{for }-1\le x<1\\1-(x-1)+(x+1)=3&\text{for }x\ge1\end{cases}\)