\int_{-1}^{1/2}x^2+2x+2-1 dx+\int_{1/2}^{2}x^2+2x+2-(6x-2)dx