Why the Pieces Must Be Oriented Together
A boundary curve may consist of several smooth arcs joined at corners. A corner does not prevent us from applying Stokes’ theorem: the curve need not have one smooth tangent direction at every point. What matters is that its pieces join in order and that the whole boundary is traversed with the orientation induced by the surface.
This distinction is important in a calculation. A parametrization gives a direction of travel for one arc, but that direction may not fit the orientation required for the boundary. If one piece is traversed backward while its neighbors are traversed forward, the resulting sum is not the line integral around the intended oriented boundary.
Piecewise Smooth Curves and Their Integrals
A smooth arc can be specified by a parametrization \(\mathbf r_i(t)\), where \(t\) runs from \(a_i\) to \(b_i\). The arc starts at \(\mathbf r_i(a_i)\) and ends at \(\mathbf r_i(b_i)\). A finite collection of arcs forms a piecewise smooth curve when their endpoints can be joined in sequence, with the end of each piece equal to the start of the next. For a closed curve, the last piece also ends where the first piece starts. The tangent directions on either side of a joint need not agree.
For a vector field \(\mathbf F\), the line integral along the \(i\)th oriented piece is computed using its parametrization and direction:
If the ordered pieces are \(C_1,\ldots,C_m\), the line integral along the complete boundary is the sum of the piece integrals:
The order records how the curve is travelled. It does not change the value of the integral merely because the pieces have been listed with different names; what matters is the direction of travel along each one.
Choosing the Boundary Direction
For an oriented surface, its orientation determines the positive direction around its boundary by the right-hand rule. Point your right thumb along the chosen surface normal. Your curled fingers indicate the positive boundary direction. On a planar region in the \(xy\)-plane with upward normal, this means traversing the outer boundary counterclockwise, with the region on the left as you walk along it.
At a corner, use the same orientation rule on the boundary as a whole. There is no need to invent a new tangent at the joint. Instead, check the endpoints: after choosing a starting piece, its endpoint must match the starting point of the next piece in the chosen direction.
Record where each available arc starts and ends in its given parametrization.
Use the chosen normal and the right-hand rule to decide the positive direction around the boundary.
Arrange them so each piece ends at the starting point of the next, including the closing join.
Use the parameter direction that follows the ordered traversal, then sum the resulting integrals.
Worked Example: A Triangular Boundary
Worked Example: A Triangular Boundary
Let \(S\) be the triangle in the \(xy\)-plane with vertices \(A=(0,0)\), \(B=(2,0)\), and \(C=(0,1)\), oriented by the upward normal. Let \(\mathbf F(x,y,z)=(-y,x,0)\). Find the line integral around the positively oriented boundary.
The upward normal requires counterclockwise travel, so the correct order is \(A\to B\to C\to A\). Parametrize the three pieces on \(0\leq t\leq 1\):
The endpoints match in sequence: \(\mathbf r_1(1)=B=\mathbf r_2(0)\), \(\mathbf r_2(1)=C=\mathbf r_3(0)\), and \(\mathbf r_3(1)=A=\mathbf r_1(0)\).
On \(AB\), \(\mathbf r_1'(t)=(2,0,0)\) and \(\mathbf F(\mathbf r_1(t))=(0,2t,0)\). Thus:
On \(BC\), \(\mathbf r_2'(t)=(-2,1,0)\) and \(\mathbf F(\mathbf r_2(t))=(-t,2-2t,0)\). Therefore:
On \(CA\), \(\mathbf r_3'(t)=(0,-1,0)\) and \(\mathbf F(\mathbf r_3(t))=(-1+t,0,0)\). Hence:
Adding the three contributions gives \(\int_{\partial S}\mathbf F\cdot d\mathbf r=0+2+0=2\). As a check, \(\nabla\times\mathbf F=(0,0,2)\), and the triangle has area \(\frac12(2)(1)=1\). Its upward curl flux is therefore \(2(1)=2\), in agreement with Stokes’ theorem.
Why the Sum Is the Integral Around the Whole Curve
The line integral is defined by accumulating the field’s tangential component as the curve is travelled. If the travel is divided into consecutive parameter intervals, the accumulation over the complete traversal is the accumulation over the first interval plus that over the second, and so on. For finitely many joined arcs, this gives exactly the sum of their separate line integrals.
Consequently, Stokes’ theorem applies to a piecewise smooth boundary by evaluating the line integral on each smooth piece in the induced direction and adding the results. In its standard form, if \(S\) is an oriented, piecewise smooth surface and \(\mathbf F\) has continuous first partial derivatives on an open region containing \(S\), then:
Here \(\mathbf n\) is the unit normal consistent with the chosen surface orientation, and the boundary direction is the one induced by that orientation. When the boundary has several closed components, the line integral is the sum over all components, with each component given its induced direction.
Worked Example: A Semicircle and Its Diameter
Worked Example: A Semicircle and Its Diameter
Consider the upper half of the unit disk in the \(xy\)-plane with upward normal. Its positively oriented boundary travels along the upper semicircle from \((1,0)\) to \((-1,0)\), then along the diameter from \((-1,0)\) back to \((1,0)\). For \(\mathbf F(x,y,z)=(-y/2,x/2,0)\), compute the boundary integral.
Parametrize the arc by \(\mathbf r_1(t)=(\cos t,\sin t,0)\), \(0\leq t\leq\pi\). Then \(\mathbf r_1'(t)=(-\sin t,\cos t,0)\) and \(\mathbf F(\mathbf r_1(t))=(-\sin t/2,\cos t/2,0)\). Thus:
Parametrize the diameter in the required direction by \(\mathbf r_2(t)=(-1+2t,0,0)\), \(0\leq t\leq 1\). Then \(\mathbf r_2'(t)=(2,0,0)\) and \(\mathbf F(\mathbf r_2(t))=(0,(-1+2t)/2,0)\). Therefore:
The total is \(\frac{\pi}{2}+0=\frac{\pi}{2}\). To check, \(\nabla\times\mathbf F=(0,0,1)\), and the upper half-disk has area \(\pi/2\). The curl flux is \(1\cdot\pi/2=\pi/2\), as required.
Worked Example: Ordering the Edges of an L-Shaped Boundary
Worked Example: Ordering the Edges of an L-Shaped Boundary
Let \(S\) be the planar L-shaped region whose boundary vertices, in order, are \((0,0)\), \((2,0)\), \((2,1)\), \((1,1)\), \((1,2)\), \((0,2)\), and back to \((0,0)\). The upward normal calls for counterclockwise travel. For \(\mathbf F(x,y,z)=(-y,x,0)\), calculate the integral by following these six pieces in order.
For a horizontal segment, the parametrization is \((x(t),y_0,0)\) and the integrand is \(-y_0x'(t)\). For a vertical segment, the parametrization is \((x_0,y(t),0)\) and the integrand is \(x_0y'(t)\). Applying these facts to each directed edge gives:
The signs in the horizontal integrals include the direction of \(x\): for example, on the third edge \(x\) decreases from \(2\) to \(1\), so \(\int_2^1-1\,dx=1\). Summing all six contributions gives \(0+2+1+1+2+0=6\).
For a check, the L-shaped region has area \(4-1=3\): it is a \(2\)-by-\(2\) square with a \(1\)-by-\(1\) square removed. Since \(\nabla\times\mathbf F=(0,0,2)\), its upward curl flux is \(2(3)=6\), matching the line integral.
A Common Ordering Mistake
In the triangular example, suppose the edge \(BC\) is accidentally traversed from \(C\) to \(B\), while the other two pieces are kept in the order \(A\to B\) and \(C\to A\). The integral on the reversed edge is \(-2\), not \(2\). Keeping that value would give \(0+(-2)+0=-2\), but these three directed edges do not form the intended traversal: the first edge ends at \(B\), while the reversed second edge starts at \(C\).
The correction is to follow the endpoints in order \(A\to B\to C\to A\), using \(B\to C\) for the second piece. Its contribution is then \(2\), and the total is \(2\). Before integrating, check both the orientation and the endpoint match at every join. This catches a direction error before it becomes buried in the arithmetic.
Check Your Understanding
For each question, focus first on the ordered directions of travel, then on the integral calculation.
- What condition must the endpoints of consecutive parametrized arcs satisfy for them to form an ordered traversal?
- For a planar region in the \(xy\)-plane with upward normal, which direction is positive around its outer boundary?
- Why can a boundary have a corner and still be piecewise smooth?
- If a boundary consists of four ordered smooth pieces, how is its line integral calculated from the four piece integrals?
- What endpoint check can reveal that one boundary piece has been parametrized in the wrong direction?