E[x-q(x))^2] = Integral from -inf to inf (x-q(x))^2*fx(x)dx =integral from 0 to 1 (x-q(x))^2dx
E[g(x)] = integral from -inf to inf g(x)fx(x)dx
E[x-q(x))^2] = split the integral up at 1/2
= integral 0 to 1/2 (x-0)^2dx + integral 1/2 to 1 (x-1/2)^2dx
E[x-q(x))^2] = Integral from -inf to inf (x-q(x))^2*fx(x)dx =integral from 0 to 1 (x-q(x))^2dx
E[g(x)] = integral from -inf to inf g(x)fx(x)dx
E[x-q(x))^2] = split the integral up at 1/2
= integral 0 to 1/2 (x-0)^2dx + integral 1/2 to 1 (x-1/2)^2dx