Tutorials › Calculus III › Orienting Piecewise Smooth Boundaries

Stokes’ Theorem · Tutorial 938 of 999

Orienting Piecewise Smooth Boundaries

Learn to trace a piecewise smooth boundary in the orientation induced by its surface and compute its circulation by summing the integrals along the ordered pieces.

Advanced 10 min read

What You'll Learn

  • Define a piecewise smooth boundary as a sequence of smoothly parametrized arcs joined at endpoints.
  • Order boundary pieces so each arc ends where the next one begins.
  • Select the travel direction consistent with the surface orientation.
  • Set up and compute a line integral separately on each smooth piece.
  • Sum the piece integrals and check the result using Stokes’ theorem.

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.

Key idea: Order the pieces by matching endpoints, orient the resulting traversal consistently with the surface, and add the line integral from each piece in that direction.

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:

$$ \int_{C_i}\mathbf F\cdot d\mathbf r = \int_{a_i}^{b_i}\mathbf F\bigl(\mathbf r_i(t)\bigr)\cdot\mathbf r_i'(t)\,dt. $$

If the ordered pieces are \(C_1,\ldots,C_m\), the line integral along the complete boundary is the sum of the piece integrals:

$$ \int_{\partial S}\mathbf F\cdot d\mathbf r = \sum_{i=1}^{m}\int_{C_i}\mathbf F\cdot d\mathbf r. $$

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.

1
Identify the pieces and their endpoints.
Record where each available arc starts and ends in its given parametrization.
2
Determine the required surface orientation.
Use the chosen normal and the right-hand rule to decide the positive direction around the boundary.
3
Put the pieces in travel order.
Arrange them so each piece ends at the starting point of the next, including the closing join.
4
Integrate on each piece and add.
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\):

$$ \mathbf r_1(t)=(2t,0,0),\qquad \mathbf r_2(t)=(2-2t,t,0),\qquad \mathbf r_3(t)=(0,1-t,0). $$

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:

$$ \int_{AB}\mathbf F\cdot d\mathbf r = \int_0^1(0,2t,0)\cdot(2,0,0)\,dt = \int_0^1 0\,dt = 0. $$

On \(BC\), \(\mathbf r_2'(t)=(-2,1,0)\) and \(\mathbf F(\mathbf r_2(t))=(-t,2-2t,0)\). Therefore:

$$ \int_{BC}\mathbf F\cdot d\mathbf r = \int_0^1(-t,2-2t,0)\cdot(-2,1,0)\,dt = \int_0^1\bigl(2t+2-2t\bigr)\,dt = \int_0^1 2\,dt = 2. $$

On \(CA\), \(\mathbf r_3'(t)=(0,-1,0)\) and \(\mathbf F(\mathbf r_3(t))=(-1+t,0,0)\). Hence:

$$ \int_{CA}\mathbf F\cdot d\mathbf r = \int_0^1(-1+t,0,0)\cdot(0,-1,0)\,dt = \int_0^1 0\,dt = 0. $$

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:

$$ \int_{\partial S}\mathbf F\cdot d\mathbf r = \iint_S(\nabla\times\mathbf F)\cdot\mathbf n\,dS. $$

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.

Why corners are allowed: Stokes’ theorem requires a piecewise smooth boundary, not a boundary with a single continuously changing tangent everywhere. Each smooth piece has its own line integral, and the finite sum accounts for the complete boundary.

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:

$$ \int_{C_1}\mathbf F\cdot d\mathbf r = \int_0^\pi \left( \frac{\sin^2 t}{2}+\frac{\cos^2 t}{2} \right)dt = \int_0^\pi\frac12\,dt = \frac{\pi}{2}. $$

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:

$$ \int_{C_2}\mathbf F\cdot d\mathbf r = \int_0^1(0,(-1+2t)/2,0)\cdot(2,0,0)\,dt = \int_0^1 0\,dt = 0. $$

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:

$$ \begin{aligned} \int_{(0,0)\to(2,0)}\mathbf F\cdot d\mathbf r &=\int_0^2 0\,dx=0,\\ \int_{(2,0)\to(2,1)}\mathbf F\cdot d\mathbf r &=\int_0^1 2\,dy=2,\\ \int_{(2,1)\to(1,1)}\mathbf F\cdot d\mathbf r &=\int_2^1 -1\,dx=1,\\ \int_{(1,1)\to(1,2)}\mathbf F\cdot d\mathbf r &=\int_1^2 1\,dy=1,\\ \int_{(1,2)\to(0,2)}\mathbf F\cdot d\mathbf r &=\int_1^0 -2\,dx=2,\\ \int_{(0,2)\to(0,0)}\mathbf F\cdot d\mathbf r &=\int_2^0 0\,dy=0. \end{aligned} $$

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.

  1. What condition must the endpoints of consecutive parametrized arcs satisfy for them to form an ordered traversal?
  2. For a planar region in the \(xy\)-plane with upward normal, which direction is positive around its outer boundary?
  3. Why can a boundary have a corner and still be piecewise smooth?
  4. If a boundary consists of four ordered smooth pieces, how is its line integral calculated from the four piece integrals?
  5. What endpoint check can reveal that one boundary piece has been parametrized in the wrong direction?