Find g(x) from Piecewise Function g(x)=f(|x|)+|f(x)|

Find \(g(x)\) if \(g(x)=f(|x|)+|f(x)|\)

Question

If \(f(x)\) be defined on \([-2,2]\) and is given by

\[ f(x)= \begin{cases} -1, & -2 \le x \le 0 \\ x-1, & 0 < x \le 2 \end{cases} \]

and

\[ g(x)=f(|x|)+|f(x)| \]

Find \(g(x)\).

Solution

Given

\[ f(x)= \begin{cases} -1, & -2 \le x \le 0 \\ x-1, & 0 < x \le 2 \end{cases} \]

We need to find

\[ g(x)=f(|x|)+|f(x)| \]

Case 1: \(-2 \le x \le 0\)

Since \(x \le 0\),

\[ |x|=-x \]

Now \(|x| \in [0,2]\), therefore

\[ f(|x|)=|x|-1=-x-1 \]

Also,

\[ f(x)=-1 \]

Hence,

\[ |f(x)|=1 \]

Therefore,

\[ g(x)=(-x-1)+1=-x \]

So,

\[ g(x)=-x \qquad \text{for } -2\le x\le0 \]

Case 2: \(0 < x \le 1\)

Since \(x>0\),

\[ |x|=x \]

Thus,

\[ f(|x|)=f(x)=x-1 \]

Now for \(0 \[ x-1\le0 \]

Therefore,

\[ |f(x)|=|x-1|=1-x \]

Hence,

\[ g(x)=(x-1)+(1-x)=0 \]

So,

\[ g(x)=0 \qquad \text{for } 0Case 3: \(1 < x \le 2\)

Here also,

\[ |x|=x \]

Therefore,

\[ f(|x|)=f(x)=x-1 \]

Since \(x>1\),

\[ x-1>0 \]

Thus,

\[ |f(x)|=x-1 \]

Hence,

\[ g(x)=(x-1)+(x-1) \] \[ =2x-2 \]

So,

\[ g(x)=2x-2 \qquad \text{for } 1Final Answer \[ g(x)= \begin{cases} -x, & -2\le x\le0 \\ 0, & 0

Next Question / Full Exercise

Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *