I have heard the comparison between line integrals and work, so how would I minimize a line integral of two points in a non-conservative vector field. (if it were conservative, the line integral would be constant). I understand something like the Euler Lagrange Equation is needed to find a function that minimizes the line integral, however I am confused as to how to set up the Lagrangian and how to evaluate the equation. Take the following example:

> Find a function that minimizes the absolute value of the line integral between (-1, 2) to (2, 8) over the vector field $F=<y^2 * cos(x), sin(xy)>$.