<<Calculus`Math225`
i = {1,0,0}; j = {0,1,0}; k = {0,0,1};

Flow Integrals

The integral of F.dr  over a curve C defined by
r[t] = x[t]i + y[t]j + z[t]k, a<=t<=b is

Integrate[F.r'[t],{t,a,b}]

Example: Let C be defined by r[t_] = t i + t^2 j + t^3 k
for -2<=t<=2. Compute the flow integral of
  F = x y i + y z j + x z k
along C.

Solution:

r[t_] = t i + t^2 j + t^3 k

r'[t]

F = x y i + y z j + x z k

F /. {x->t, y->t^2, z->t^3}

%.r'[t]

Integrate[%, {t,-2,2}]

?FlowIntegrate

FlowIntegrate[F,r[t],{t,-2,2}]

Example: Let C be  the plane curve defined by
    r[t_] = (t^3-1)i + t^2 j + (t^3+1)k
    0<=t<=1.
Compute the integral of 
    2 x y dx + (x^2 + 2 y z)dy + (y^2+1)dz
along C.

Solution:

We'll use the F. T. L. I. We need to find a function f[x,y,z] such
that Grad[f[x,y,z]] ==
        (2 x y)i + (x^2 + 2 y z)j + (y^2+1)k
or:
  D[f[x,y,z],x] == 2 x y
  D[f[x,y,z],y] == x^2 + 2 y z
  D[f[x,y,z],z] == y^2+1

The first equation gives

f[x_,y_,z_] = Integrate[2 x y, x] + g[y,z]

To make the second equation true we need

D[f[x,y,z],y] == x^2 + 2 y z

so D[g[y,z],y] == 2 y z and

g[y_,z_] = Integrate[2 y z, y] + h[z]

f[x,y,z]

To make the third equation true we need

D[f[x,y,z],z] == y^2 + 1

or h'[z] == 1. This implies

h[z_] = z;
 f[x,y,z]

By the F.T.L.I., the integral equals f[x,y,z] evaluated at the end points
of the curve.

r[t_] = (t^3-1)i + t^2 j + (t^3+1)k

p = r[0]

q = r[1]

f[0,1,2] - f[-1,0,1]

We could also do this integral using the usual formula for flow integrals.

FlowIntegrate[{2x y, x^2+2y z, y^2+1},
        r[t],{t,0,1}]