Parametrize the line segment by
r(t)=(0,0,1)+t{(2,1,0)−(0,0,1)}=(2t,t,1−t)0≤t≤1
so that r(0)=(0,0,1) is the initial point of the line segment and
r(1)=(2,1,0) is the final point of the segment. Then
r′(t)=(2,1,−1)
and the work is
∫F⋅dr=∫01F(r(t))⋅r′(t)dt=∫01(2t−t2,t−(1−t)2,(1−t)−4t2)⋅(2,1,−1)dt=∫01(4t−2t2 + t−1+2t−t2 − 1+t+4t2)dt=∫01(t2+8t−2)dt=31+4−2=37