A vector field is a function that takes in a vector and spits out a vector, and a scalar field is a function that takes in a vector and spits out a scalar.
Over a scalar field
Say we have some scalar field f:R3→R and some curve
C parametrized by r(t):[a,b]→R3. We want to
integrate f along C:
∫Cfds
Since the curve is parametrized by r, we can write an equivalent integral:
∫abf(r(t))dr
Where dr is the length of a differential slice of the curve. We can
calculate this length as dr=∥r′(t)∥dt. This
gives us the general equation for a line integral over a scalar field:
∫Cfds=∫abf(r(t))∥r′(t)∥dt
Recall
If r(t)=x(t)y(t)z(t), ∥r′(t)∥=(x′)2+(y′)2+(z′)2
Over a vector field
Say we have some vector field F=(P,Q,R) and a curve C parametrized by r:[a,b]→R3. We want to integrate the dot product of F along C (both of these forms mean the same thing):
∫CF⋅dr=∫CPdx+Qdy+Rdz
dr is the differential change in position along the curve. Note that in this case it is a vector, simply r′(t)dt. This gives us the final equation:
∫CF⋅dr=∫abF(r(t))⋅x′(t)y′(t)z′(t)dt
In general, you can follow these steps to compute a line integral over a vector field:
Choose a parametrization r(t)=(x,y,z),t∈[a,b].
Substitute x,y,z in the integrand (F).
Also substitute dx=x′dt, dy=y′dt, dz=z′dt and ds=∥r′∥dt, dr=r′dt.
The result will be a single variable integral that you can compute directly.
Fundamental theorem of calculus
Let’s say we have a curve C that goes from points A to B, and a scalar function f:R3→R. Then the fundamental theorem of calculus says: