F(x)=(1/2)*∫(0,x) (x^2-2xt+t^2)*g(t)dt=(1/2)*[x^2*∫(0,x) g(t)dt-2x*∫(0,x) tg(t)dt+∫(0,x)t^2*g(t)dt]F'(x)=(1/2)*[2x*∫(0,x) g(t)dt+x^2*g(x)-2∫(0,x) tg(t)dt-2x^2*g(x)+x^2*g(x)]=(1/2)*[(2x-2)*∫(0,x) g(t)dt]=(x-1)*∫(0,x) g(t)dt