I would start by breaking down the curve into 4 straight lines like below
line 1: (-1,-1) to (1,-1); y is constant
line 2: (1,-1) to (1,1); x is constant
line 3: (1,1) to (-1,1); y is constant
line 4: (-1,1) to (-1,-1); x is constant
so do line integrate on those four lines and sum them up like below
line 1: integrate F(x,-1,z) * <dx,0,0> from x = -1 to 1
line 2: integrate F(1,y,z) * <0,dy,0> from y = -1 to 1
line 3: integrate F(x,1,z) * <-dx,0,0> from x = 1 to -1
line 4: integrate F(-1,y,z) * <0,-dy,0> from y = 1 to -1
Plugging in the values we know and doing the dot product,
integrate ((1 + z^2) * dx) from x = -1 to 1
integrate ((1 + y^2) * dy) from y = -1 to 1
integrate (-(1 + z^2) * dx) from x = 1 to -1
integrate (-(1 + y^2) * dy) from y = 1 to -1
so essentially
(line 1 int) + (line 2 int) + (line 3 int) + (line 4 int) = your answer; eq to solve
{(1 + z^2) * (2)} + (8/3) + {(1 + z^2) * (2)} + (8/3); evaluating integrands
4(1 + z^2) + (16/3); simplifying
well at least i think it's the answer. kinda rusty on vector calculus. That z in the last equation is set to whatever z you are looking for. Simply 0 if you are looking at the xy plane at z = 0. And i might have gotten some algebra wrong, so please check my work and go thru as well, might have missed negatives or integrated it wrong lol. like i said, i'm kinda rusty on calculus.
This post was edited by liljohn_jy on Dec 9 2020 05:55pm