Solveeit Logo

Question

Question: If \(f\left( x \right)\) is defined on \(\left[ -2,2 \right]\) and given by \(f\left( x \right)=\lef...

If f(x)f\left( x \right) is defined on [2,2]\left[ -2,2 \right] and given by f\left( x \right)=\left\\{ \begin{matrix} -1,\text{ }-2\le x\le 0 \\\ x-1,\text{ }0\le x\le 2 \\\ \end{matrix} \right. and g(x)=f(x)+f(x)g\left( x \right)=f\left( \left| x \right| \right)+\left| f\left( x \right) \right|. Find g(x)g\left( x \right)

Explanation

Solution

We will find the values of f(x)f\left( \left| x \right| \right) and f(x)\left| f\left( x \right) \right| by using the function f(x)f\left( x \right) individually and adding them up to get the value of g(x)g\left( x \right).

Complete step by step solution:
Given that,
f\left( x \right)=\left\\{ \begin{matrix} -1,\text{ }-2\le x\le 0 \\\ x-1,\text{ }0\le x\le 2 \\\ \end{matrix} \right.
The function x\left| x \right| convert the ve-ve values into +ve+ve values i.e. the result of the function x\left| x \right| should be a +ve+ve value. We get the +ve+ve value from the function x\left| x \right| by substituting the appropriate value either +x+x or x-x to get the result of function as +ve+ve. Mathematically
\left| x \right|=\left\\{ \begin{matrix} +x,\text{ for }x\ge 0 \\\ -x,\text{ for }x<0 \\\ \end{matrix} \right.
Here we have x[2,2]x\in \left[ -2,2 \right] then x[0,2]\left| x \right|\in \left[ 0,2 \right], so
f(x)=x1f\left( \left| x \right| \right)=\left| x \right|-1 for all x[2,2]x\in \left[ -2,2 \right]
Substitute the function x\left| x \right| in above equation,
f\left( \left| x \right| \right)=\left\\{ \begin{matrix} x-1,\text{ }0\le x\le 2 \\\ -x-1,\text{ }-2\le x<0 \\\ \end{matrix} \right.
Now the value of f(x)\left| f\left( x \right) \right| is
\begin{aligned} & \left| f\left( x \right) \right|=\left\\{ \begin{matrix} \left| -1 \right|,\text{ }-2\le x<0 \\\ \left| x-1 \right|,\text{ }0\le x\le 2 \\\ \end{matrix} \right. \\\ & =\left\\{ \begin{matrix} 1,\text{ }-2\le x<0 \\\ \left| x-1 \right|,\text{ }0\le x\le 2 \\\ \end{matrix} \right. \end{aligned}
Now we have to change the value of x1\left| x-1 \right| in the range of [0,2]\left[ 0,2 \right] to get a +ve+ve. Hence we will take +(x1)+\left( x-1 \right) for 1x21\le x\le 2 and we will take (x1)-\left( x-1 \right) for 0x<10\le x<1. Mathematically we can write it as
\left| x-1 \right|=\left\\{ \begin{matrix} x-1,\text{ }1\le x\le 2 \\\ 1-x,\text{ }0\le x<1 \\\ \end{matrix} \right.
Hence the value of f(x)\left| f\left( x \right) \right| is
\left| f\left( x \right) \right|=\left\\{ \begin{matrix} 1,\text{ }-2\le x<0 \\\ 1-x,\text{ }0\le x<1 \\\ x-1,\text{ }1\le x\le 2 \\\ \end{matrix} \right.
Now we have given that g(x)=f(x)+f(x)g\left( x \right)=f\left( \left| x \right| \right)+\left| f\left( x \right) \right|, so
\begin{aligned} & g\left( x \right)=\left\\{ \begin{matrix} -x-1,\text{ }-2\le x\le 0 \\\ x-1,\text{ }0\le x<1 \\\ x-1,\text{ }1\le x\le 2 \\\ \end{matrix} \right.+\left\\{ \begin{matrix} 1,\text{ }-2\le x<0 \\\ 1-x,\text{ }0\le x<1 \\\ x-1,\text{ }1\le x\le 2 \\\ \end{matrix} \right. \\\ & =\left\\{ \begin{matrix} -x-1+1,\text{ }-2\le x\le 0\text{ } \\\ x-1+1-x,\text{ }0\le x<1 \\\ x-1+x-1,\text{ }1\le x\le 2 \\\ \end{matrix} \right. \\\ & =\left\\{ \begin{matrix} -x,\text{ }-2\le x\le 0 \\\ 0,\text{ }0\le x<1 \\\ 2\left( x-1 \right),\text{ }1\le x\le 2 \\\ \end{matrix} \right. \end{aligned}

Note: The value of x\left| x \right| in the function f(x)f\left( \left| x \right| \right) is modified as +x+x and x-x in the range of x[0,2]x\in \left[ 0,2 \right] and 2x<0-2\le x<0 respectively. While finding the value of f(x)\left| f\left( x \right) \right| first apply mode function to the variables in the function f(x)f\left( x \right) and then modify the variables based on the range of that variable in order to get a +ve+ve value.