Answer
a) $\dfrac{-1}{2}$
b) $1$
c) $\dfrac{1}{4}$
Work Step by Step
(a) Split the integration into regions $[-1,0],[0,1]$.
$\int_{-1}^1 g(x)dx=\int_{-1}^0 g(x)dx+\int_{0}^1 g(x) \ dx \\=\int_{-1}^0 (-x-1) \ dx+\int_{0}^1 (x-1)\ dx \\=(-\dfrac{x^2}{2}-x)|_{-1}^0+(\dfrac{x^2}{2}-x)]_{0}^1 \\= (\dfrac{(-1)^2}{2}-1)+(\dfrac{1^2}{2}-1)=-1$
So, the average will become:
$\bar g_{[-1,1]}=av(g)=\dfrac{-1}{1-(-1)}=-\dfrac{1}{2}$
(b)$\int_{1}^3 g(x)dx=\int_{1}^3 (x-1)dx =[\dfrac{x^2}{2}-x)|_{1}^3\\=[\dfrac{(3)^2}{2}-3) -(\dfrac{1^2}{2}-1]\\=2$
So, the average will become:
$\bar g_{[1,3]}=av(g)=\dfrac{2}{3-1}=1$
(c) We need to combine the above results from parts (a) and (b).
$\int_{-1}^3 g(x) \ dx=\int_{-1}^1 g(x) \ dx+\int_{1}^3 g(x) \ dx=2-1=1$
Now, $\bar g_{[-1,3]}=av(g)=\dfrac{1}{3-(-1)}=\dfrac{1}{4}$