integrate (dy/dx)^2 with respect to x