1/500*integral from 0 to 40 of (-0.0000156(t-20)^{4}+2.5 cos ((pi t)/500)) dt