If f(x) be defined on [-2, 2] and is given by f(x)={−1, −2≤x≤0x−1, 0<x≤2
and g(x)=f(|x|)+|f(x)|. Find g(x).
We have,
{−1, −2≤x≤0x−1, 0<x≤2
Now,
f(x)=|x|−1, where −2≤x≤2
and f(x)=⎧⎪⎨⎪⎩1, −2≤x≤0−(x−1), 0≤x≤1(x−1), 1≤x≤2
∴g(x)=f(|x|)+|f(x)|=⎧⎪⎨⎪⎩−x −2≤x≤00 0<x<12(x−1), 1≤x≤2