Hey, I must be getting something wrong about how to calculate line integrals, so I was wondering if someone here might want to give me a pointer to set me straight.

We have a Cartesian vector field

F = (yx^2)i - (y)j,

where I use i, j and k as the unit vectors in the x, y and z directions. We then have a loop in the form of a triangle, with the first leg starting at the origin and going to point (1,1), the second leg going from (1,1) to (2,0) and the third from (2,0) back to the origin. I want to calculate the line integral of F around this loop.

On the third leg y = 0, so the line integral should be 0 as well.

For the first leg, I've got the notion that

x = y, dx = dy, and the differential displacement should be dl = (dx)i + (dy)j.

Taking the dot product between F and dl gives

(yx^2)dx - (y)dy = (x^3 - x)dx

Taking the integral of this from x = 0 to x = 1 gives the line integral along leg 1, I1 = -1/4

For the second leg we have

y = -x, dy = -dx and differential displacement dl = (dx)i - (dy)j.

Taking the dot product between F and dl gives

(yx^2)dx + (y)dy = (-x^3 + x)dx

Taking the line integral of this from x = 1 to x = 2 gives the line integral along leg 2, I2 = -7/4

I1 + I2 = -2, and the answer should supposedly be 7/6, so I must be getting something hilariously wrong about all this. Any help finding my mistake/misunderstanding greatly appreciated!