Vector algebra & vector calculus

Vector calculus is not listed as a topic on the math section, but it is worth reviewing. Note: this page is slow to load. Please be patient.

In the section on linear algebra, different symbols were used for vectors and their representation in a particular bases. In this section, we deal only with the vectors themselves. When vectors need to be expressed in a basis, \(3\times 1\) matrices are used. It is therefore not necessary to distinguish between \(\vec{v}\) and \(\mathsf{v}\) (and between \(A\) and \(\mathsf{A}\)).

Some of the problems below come from chapter 1 of Introduction to Electrodynamics by D. J. Griffiths.

  1. Suppose we have a barrel of fruit that contains \(a_x\) bananas, \(a_y\) pears, and \(a_z\) apples. Denoting \(\vec{e}_n\) as the unit vector in the \(n\) direction in space, is \(\vec{a} = a_x\vec{e}_x + a_y\vec{e}_y + a_z\vec{e}_z\), a vector? Explain. [answer]

    No, because \(\vec{a}\) does not obey coordinate transformations. For example, choosing a different set of axes does not turn a pear into a banana. By definition, "a vector is any set of three components that transforms in the same manner as a displacement when you change coordinates." (from Griffiths Introduction to Electrodynamics, section 1.1.5).

  2. How do the components \(a_x\), \(a_y\), and \(a_z\) of a vector \(\vec{a} = a_x \vec{e}_x + a_y \vec{e}_y + a_z \vec{e}_z \) transform under the translation of coordinates? \begin{align*} x' &= x\\ y' &= y-a\\ z' &= z \end{align*} In other words, what happens to \(a_x\), \(a_y\), and \(a_z\) when \(\vec{a}\) is written as \(\vec{a} = a_x \vec{e}_x' + a_y \vec{e}_y' + a_z \vec{e}_z' \)? [answer]

    The components of a vector are invariant under this transformation.

  3. How do the components of a vector transform under the inversion of coordinates? \begin{align*} x' &= -x\\ y' &= -y\\ z' &= -z \end{align*} In other words, what happens to \(a_x\), \(a_y\), and \(a_z\) when \(\vec{a}\) is written as \(\vec{a} = a_x \vec{e}_x' + a_y \vec{e}_y' + a_z \vec{e}_z' \)? [answer]

    The components are also inverted. \(a_x\mapsto -a_x\), \(a_y\mapsto -a_y\), and \(a_z\mapsto -a_y\).

  4. How does the cross product of two vectors \(\vec{u}\) and \(\vec{v}\) transform under the inversion of coordinates? Is the cross product of two vectors really a vector? [answer]

    The cross product \(\vec{w} = \vec{u} \times \vec{v}\) is invariant under the inversion, because \(\vec{w} = -\vec{u} \times -\vec{v}\). Thus \(\vec{w}\) is a different kind of quantity than vectors \(\vec{u}\) and \(\vec{w}\). It is called a psuedovector.

  5. How does the scalar triple product of \(\vec{w}\cdot(\vec{u} \times \vec{v})\) transform under the inversion of coordinates? Is the scalar triple product really a scalar? (Griffiths problem 1.10d) [answer]

    The scalar triple product transforms as \(-\vec{w}\cdot(-\vec{u} \times -\vec{v}) = -\vec{w}\cdot(\vec{u} \times \vec{v})\), i.e., the product changes signs when the coordinates are inverted. This is in contrast with the fact that scalars are invariant under coordinate inversions. Thus the scalar triple product is a different kind of quantity than an ordinary scalar. It is called a psuedoscalar.

  6. In what direction does the gradient of a function point? [answer]

    The gradient of a function points in the direction of the steepest ascent.

  7. Show that \( |\vec{u}\times \vec{v}|^2 + (\vec{u}\cdot \vec{v})^2 = |\vec{u}|^2|\vec{v}|^2 \). [answer]

    \begin{align*} |\vec{u}\times \vec{v}|^2 + (\vec{u}\cdot \vec{v})^2 &=\epsilon_{ijk}u_j v_k \epsilon_{ilm}u_l v_m + u_i v_i u_j v_j\\ &= \epsilon_{ijk}\epsilon_{ilm}u_j v_k u_l v_m + u_i v_i u_j v_j\\ &=(\delta_{jl}\delta_{km}-\delta_{jm}\delta_{kl})u_j v_k u_l v_m + u_i v_i u_j v_j\\ &=\delta_{jl}\delta_{km}u_j v_k u_l v_m -\delta_{jm}\delta_{kl}u_j v_k u_l v_m + u_i v_i u_j v_j \\ &=u_l u_l v_k v_k - u_m v_m v_k u_k + u_i v_i u_j v_j \\ &=u_l u_l v_k v_k - u_i v_i u_j v_j + u_i v_i u_j v_j \\ &=|\vec{u}|^2|\vec{v}|^2 \end{align*}

  8. ☸ Prove that \(\nablav (\vec{a} \cdot \vec{b}) = \vec{a}\times(\nablav \times \vec{b}) + \vec{b}\times(\nablav\times \vec{a}) + (\vec{a}\cdot\nablav)\vec{b} + (\vec{b} \cdot \nablav)\vec{a}\). [answer]

    It is much easier to go from the right-hand side to the left-hand side. \begin{align*} [\vec{a}\times(\nablav \times \vec{b}) &+ \vec{b}\times(\nablav\times \vec{a}) + (\vec{a}\cdot\nablav)\vec{b} + (\vec{b} \cdot \nablav)\vec{a}]_i\\ &=\epsilon_{ijk}a_j (\epsilon_{klm}\partial_l b_m) + \epsilon_{ijk}b_j (\epsilon_{klm}\partial_l a_m) + (a_j \partial_j)b_i + (b_j\partial_j)a_i\\ &= \epsilon_{kij}\epsilon_{klm}a_j \partial_l b_m + \epsilon_{kij}\epsilon_{klm} b_j \partial_l a_m + (a_j \partial_j)b_i + (b_j\partial_j)a_i\\ &= (\delta_{il}\delta_{jm}-\delta_{im}\delta_{lj})a_j \partial_l b_m + (\delta_{il}\delta_{jm}-\delta_{im}\delta_{lj}) b_j \partial_l a_m + (a_j \partial_j)b_i + (b_j\partial_j)a_i\\ &= a_m \partial_i b_m - a_l \partial_l b_i + b_j \partial_i a_j- b_l \partial_l a_i + (a_j \partial_j)b_i + (b_j\partial_j)a_i\\ &= a_j \partial_i b_j + b_j \partial_i a_j\\ &= \partial_i (a_j b_j)\\ &= [\nablav (\vec{a} \cdot \vec{b})]_i \end{align*}

    Since this holds for all three components, the proof is complete.
  9. Prove that \(\nablav\times(\vec{a}\times \vec{b}) = (\vec{b}\cdot \nablav)\vec{a} - (\vec{a}\cdot\nablav)\vec{b} + \vec{a}(\nablav\cdot\vec{b}) -\vec{b}(\nablav\cdot\vec{a})\). [answer]

    \begin{align*} \nablav\times(\vec{a}\times \vec{b}) &= \epsilon_{ijk}\partial_j (\epsilon_{klm}a_l b_m)\\ &=\epsilon_{ijk}\epsilon_{klm} \partial_j a_l b_m\\ &=\epsilon_{kij}\epsilon_{klm} \partial_j a_l b_m\\ &= (\delta_{il}\delta_{jm}- \delta_{im}\delta_{jl})\partial_j a_l b_m\\ &= \delta_{il}\delta_{jm}\partial_j a_l b_m- \delta_{il}\delta_{jm}\partial_j a_l b_m\\ &= \partial_j (a_i b_j)- \partial_j (a_i b_j)\\ &= b_j \partial_j a_i + a_i \partial_j b_j - a_i \partial_j b_j - b_j \partial_j a_i\\ &= \partial_j (a_i b_j)- \partial_j (a_i b_j)\\ &= b_j \partial_j a_i - a_i \partial_j b_j + a_i \partial_j b_j - b_j \partial_j a_i\\ &= (\vec{b}\cdot \nablav)\vec{a} - (\vec{a}\cdot\nablav)\vec{b} + \vec{a}(\nablav\cdot\vec{b}) -\vec{b}(\nablav\cdot\vec{a}) \end{align*}

  10. Prove that the divergence of the curl is 0. [answer]

    \begin{align} \nablav \cdot (\nablav\times\vec{u}) &= \partial_i (\epsilon_{ijk}\partial_j u_k)\notag\\ &= -\partial_i (\epsilon_{jik}\partial_j u_k) \tag{permute}\\ &= -\partial_j (\epsilon_{ijk}\partial_i u_k)\tag{relabel}\\ &= -\partial_i (\epsilon_{ijk}\partial_j u_k)\tag{equality of mixed pt'ls} \end{align} \(-\partial_i (\epsilon_{ijk}\partial_j u_k) = \partial_i (\epsilon_{ijk}\partial_j u_k)\) is of the form \(a = -a\), which means that \(a=0\), i.e., \(-\partial_i (\epsilon_{jik}\partial_j u_k) = 0\), which completes the proof: \(\nablav \cdot (\nablav\times\vec{u}) = 0\).

  11. Prove that the curl of the gradient is 0. [answer]

    \begin{align} \nablav \times (\nablav f) &= \epsilon_{ijk}\partial_j (\nablav f)_k\notag\\ &=\epsilon_{ijk}\partial_j \partial_k f\notag\\ &=-\epsilon_{ikj}\partial_j \partial_k f\tag{permute}\\ &=-\epsilon_{ijk}\partial_k \partial_j f\tag{relabel}\\ &=-\epsilon_{ijk}\partial_j \partial_k f\tag{equality of mixed pt'ls}\\ \end{align} Since \(-\epsilon_{ijk}\partial_j \partial_k f = \epsilon_{ijk}\partial_j \partial_k f\), \(\epsilon_{ijk}\partial_j \partial_k f=0\), which completes the proof: \(\nablav \times (\nablav f) = 0\).

  12. Show that \(\nablav\times(\nablav\times \vec{a}) = \nablav(\nablav \cdot\vec{a})-\nabla^2 \vec{a}\). [answer]

    \begin{align*} [\nablav\times(\nablav\times \vec{a})]_i &= \epsilon_{ijk} \partial_j (\nablav\times \vec{a})_k \\ &=\epsilon_{ijk} \partial_j \epsilon_{klm} \partial_l a_m \\ &=\epsilon_{ijk} \epsilon_{klm} \partial_j \partial_l a_m \\ &=\epsilon_{kij} \epsilon_{klm} \partial_j \partial_l a_m \\ &=(\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}) \partial_j \partial_l a_m \\ &=\delta_{il}\delta_{jm}\partial_j \partial_l a_m -\delta_{im}\delta_{jl}\partial_j \partial_l a_m \\ &= \partial_i\partial_j a_j -\partial_l \partial_l a_i \\ &= \partial_i(\nablav\cdot \vec{a}) -[\nabla^2 \vec{a}]_i \\ &=[\nablav(\nablav \cdot\vec{a})-\nabla^2 \vec{a}]_i \end{align*}

  13. In Cartesian coordinates, \(\vec{r} = x\vec{e}_x + y\vec{e}_x + z\vec{e}_x\) and thus \(r = \sqrt{x^2 + y^2 + z^2}\). Find \(\nablav r \). [answer]

    \begin{align*} \nablav r &= \nablav (x^2 + y^2 +z^2)^{1/2} \\ &= \frac{1}{r}(x\vec{e}_x + y\vec{e}_x + z\vec{e}_x)\\ &= \frac{\vec{r}}{r} \end{align*}

  14. Let \(\vec{R} = \vec{r}- \vec{r}'\) be the position vector. Thus in Cartesian coordinates, \(R = \sqrt{(x-x')^2+(y-y')^2+(z-z')^2}\). Find \(\nablav R^2\). [answer]

    \begin{align*} \nablav R^2 = 2\vec{R} \end{align*}

  15. Find \(\nablav R^{-1}\). [answer]

    \begin{align*} \nablav 1/R = -\vec{R}/R^3 = -\vec{e}_r/R^2 \end{align*}

  16. What is the coordinate-free definition of the divergence of a vector field \(\vec{F}\)? [answer]

    \[\nablav \cdot \vec{F} = \lim_{V\to 0}\frac{1}{V}\oint_S \vec{F}\cdot d\vec{a}\,.\]

  17. ☸ Find the divergence of \(\vec{e}_r/r^2 = \vec{r}/r^3\) in both Cartesian and spherical coordinates. Note that the \(r\) component of the divergence of \(\vec{v}\) in spherical coordinates is \(\frac{1}{r^2}\frac{\partial}{\partial r}(r^2 v_r)\). Explain the result. [answer]

    In cartesian coordinates, \begin{align*} \nablav \cdot \frac{\vec{e}_r}{r^2}&= \nablav \cdot\frac{\vec{r}}{r^3} \\ &=\nablav \cdot \frac{x\vec{e}_x + y\vec{e}_y + z\vec{e}_z}{(x^2+y^2+z^2)^{3/2}}\\ &=\nablav \cdot ({x\vec{e}_x + y\vec{e}_y + z\vec{e}_z})(x^2+y^2+z^2)^{-3/2}\\ &=\frac{\partial}{\partial x} [x(x^2+y^2+z^2)^{-3/2}] +\frac{\partial}{\partial y} [y(x^2+y^2+z^2)^{-3/2}] +\frac{\partial}{\partial z} [z(x^2+y^2+z^2)^{-3/2}] \\ &= -\frac{3}{2}(x^2 + y^2 + z^2)^{-5/2}2x^2 + (x^2 + y^2 +z^2)^{-3/2} + \dots\\ &= \frac{3}{r^3} - \frac{3\cdot 2(x^2+y^2+z^2)}{2r^5}\\ &= \frac{3}{r^3} - \frac{3r^2}{r^5} = \frac{3}{r^3} - \frac{3}{r^3} = 0\,. \end{align*} In spherical coordinates, \begin{align*} \nablav \cdot \frac{\vec{e}_r}{r^2}&= \frac{1}{r^2} \frac{\partial}{\partial r} \bigg(r^2 \frac{1}{r^2}\bigg)\\ &= \frac{1}{r^2} \frac{\partial}{\partial r} (1) = 0\,.\\ \end{align*} It is a paradoxical result, because \(\vec{e}_r/r^2\) is a function that points away from the origin radially in all directions and quadratically falling off in amplitude. That is a pretty divergent function. The resolution to the paradox is that \(\vec{e}_r/r^2\to\infty\) at the origin, at which the divergence is not \(0\).

  18. What is the coordinate-free definition of the curl of a vector field \(\vec{F}\)? [answer]

    \[\nablav \times \vec{F} = \lim_{S\to 0}\frac{1}{S}\oint_C \vec{F}\cdot d\vecell\,.\]

  19. Construct a non-constant vector function that has zero divergence and zero curl everywhere. [answer]

    The vector-valued function \(\vec{f} = x\vec{e}_x - y\vec{e}_y\) has zero divergence and zero curl everywhere. Another example is \(\vec{f} = y\vec{e}_x + x\vec{e}_y\).

  20. Calculate the line integral of the function \(\vec{v} = y^2 \vec{e}_x + 2x(y+1)\vec{e}_y\) from \(\vec{a} = (1,1,0)\) to \(\vec{b} = (2,2,0)\), following the path from \((x,y,z) = (1,1,0)\) to \((2,1,0)\) to \((2,2,0)\). Then calculate the line integral following the path from \(\vec{a} = (1,1,0)\) to \(\vec{b} = (2,2,0)\) directly. Finally calculate \(\oint \vec{v}\cdot d\vecell\) for the loop going from \((1,1,0)\) to \((2,1,0)\) to \((2,2,0)\) to \((1,1,0)\). [answer]

    The integral for first path \(C_1\) from \((x,y,z) = (1,1,0)\) to \((2,1,0)\) (for which \(y= 1\)) and then to \((2,2,0)\) (for which \(x = 2\)) is \begin{align*} \int_{C_1} \vec{v}\cdot d\vecell &= \int_{C_1} [y^2 \vec{e}_x + 2x(y+1)\vec{e}_y]\cdot [dx\vec{e}_x + dy\vec{e}_y]\\ &=\int_{C_1} [y^2 dx + 2x(y+1)dy]\\ &= \int_1^2 1^2 dx + \int_{1}^2 2\cdot 2(y+1)dy\\ &= \int_1^2 dx + 4\int_{1}^2 (y+1)dy\\ &= 1 + 10 = 11\\ \end{align*} The integral for the second path \(C_2\) from \((x,y,z) = (1,1,0)\) to \((2,2,0)\) (for which \(y = x\)) is \begin{align*} \int_{C_2} \vec{v}\cdot d\vecell &= \int_{C_2} [y^2 \vec{e}_x + 2x(y+1)\vec{e}_y]\cdot [dx\vec{e}_x + dy\vec{e}_y]\\ &=\int_{C_2} [x^2 dx + 2y(y+1)dy]\\ &= \int_1^2 x^2 dx + \int_{1}^2 2y(y+1)dy\\ &= 10 \end{align*} The integral over the closed loop is easy to calculate, now that the individual paths forming the loop have been calculated. The loop going from \((1,1,0)\) to \((2,1,0)\) to \(2,2,0\) and finally back to \((1,1,0)\) can be written as \begin{align*} \int_{C_1} \vec{v}\cdot d\vecell - \int_{C_2} \vec{v}\cdot d\vecell = 11-10 = 1 \end{align*}

  21. Calculate the surface integral of \(\vec{v} = 2xz \vec{e}_x + (x+2)\vec{e}_y + y(z^2-3)\vec{e}_z\) over five sides (excluding the bottom) of a cubical box whose bottom edge extends from \(x = 0\) to \(x = 2\). [answer]

    The surface integral \(\int_S \vec{v} \cdot d\vec{a}\) is to be calculated. It will be given by the sum of five integrals: at \(x=2\) and \(x=0\) (for which \(d\vec{a} = dy\,dz\,\vec{e}_x\)), at \(z = 2\) and \(z=0\) (for which \(d\vec{a}= dx\,dy\,\vec{e}_z\)), and at \(y=0\) (for which \(d\vec{a} = dx\,dz\,\vec{e}_y\)). \begin{align*} \int_S \vec{v} \cdot d\vec{a}&= \int_S [2xz \vec{e}_x + (x+2)\vec{e}_y + y(z^2-3)\vec{e}_z] \cdot d\vec{a}\\ &=\int_{0}^{2}\int_{0}^{2} 4z \,dy \,dz + \int_{0}^{2}\int_{0}^{2} 0 \,dy\, dz\\&\quad + \int_{0}^{2}\int_{0}^{2} y(4-3) dx \,dy + \int_{0}^{2}\int_{0}^{2} -3y \,dx \,dy + \int_{0}^{2}\int_{0}^{2} (x+2) \,dx\, dz\\ &=16+ 0 + 4 -12 + 12 = 20 \end{align*}

  22. Calculate the volume integral of the scalar-valued field \(T = xyz^2\) over a right triangular prism of height \(z= 3\), whose lower base is the triangle with vertices at the origin, \((x,y,z) = (1,0,0)\), and \((x,y,z) = (0,1,0)\). [answer]

    The volume integral \(\int_{V'} T dV\) is to be calculated: \begin{align*} \int_{V'} xyz^2 dV &= \int_{z=0}^{z=3} \int_{y=0}^{1-x} \int_{x=0}^{x=1} xyz^2 dx dy dz\\ &=\int_{z=0}^{z=3} z^2 \int_{x=0}^{x=1} x dx \int_{y=0}^{1-x} y dy dz\\ &=\int_{z=0}^{z=3} z^2 dz\int_{x=0}^{x=1} x dx \frac{(1-x)^2}{2} \\ &=\frac{9}{2} \int_{x=0}^{x=1} (x-2x^2+x^3) dx \\ &=\frac{9}{2} \bigg(\frac{1}{2}-\frac{2}{3}+\frac{1}{4}\bigg) \\ &=\frac{9}{3}\cdot \frac{1}{12} = \frac{3}{8} \end{align*}

  23. State the gradient theorem. What is the meaning of a conservative field? Provide examples of conservative fields and nonconservative fields from physics. [answer]

    The gradient theorem states that \begin{align*} \int_{\vec{a}}^{\vec{b}} \nablav V \cdot d\vecell &= V(b) - V(a) \end{align*} A conservative field is one that is given by a scalar potential function. For example, \(\nablav V \) above is a conservative field. The gradient theorem says that the line integral over a conservative field is independent of the path. Examples of conservative fields are the gravitational and electric fields, given by minus the gradient of the gravitational and electrical potential respectively. Meanwhile, the magnetic field is given by the curl of a vector potential, and is therefore not a conservative field.

  24. Calculate the line integral \(\int_{\vec{a}}^{\vec{b}} \nablav T \cdot d\vecell\) for \(T = x^2 + 4xy + 2yz^3\) where \(\vec{a} = (0,0,0)\) and \(\vec{b} = (1,1,1)\) for the path \((0,0,0)\to (1,0,0)\to (1,1,0)\to (1,1,1)\). Then calculate the integral for the path \((0,0,0)\to (0,0,1)\to (0,1,1)\to (1,1,1)\). Next, calculate the integral for the parabolic path \(z=x^2,\, y=x\). Finally, check the result with the gradient theorem. [answer]

    For the first path from \((0,0,0)\to (1,0,0)\to (1,1,0)\to (1,1,1)\), \begin{align*} \int_{\vec{a}}^{\vec{b}} \nablav T \cdot d\vecell&= \int_{\vec{a}}^{\vec{b}} \nablav (x^2 + 4xy + 2yz^3) \cdot (dx\vec{e}_x + dy\vec{e}_y + dz\vec{e}_z)\\ &=\int_{\vec{a}}^{\vec{b}} [(2x + 4y)\vec{e}_x + (4x +2z^3)\vec{e}_y + (6yz^2)\vec{e}_z] \cdot (dx\vec{e}_x + dy\vec{e}_y + dz\vec{e}_z)\\ &=\int_{\vec{a}}^{\vec{b}} [(2x + 4y)dx + (4x +2z^3)dy + (6yz^2)dz] \end{align*} The integral splits into three integrals. For \((0,0,0)\to (1,0,0)\), \(y=z=0\). For \((1,0,0)\to (1,1,0)\), \(x=1\) and \(z=0\). For \((1,1,0)\to (1,1,1)\), \(x=y=1\): \begin{align*} \int_{\vec{a}}^{\vec{b}} [(2x + 4y)dx + (4x +2z^3)dy + (6yz^2)dz]&= \int_{0}^{1} 2x dx + \int_{0}^{1} 4 dy + \int_{0}^{1} (6z^2)dz\\ &= \int_{0}^{1} 2x dx + \int_{0}^{1} 4 dy + \int_{0}^{1} 6z^2dz\\ &=1 + 4 + 2 = 7. \end{align*} For the path \((0,0,0)\to (0,0,1)\to (0,1,1)\to (1,1,1)\), the integral is again split into three parts. For \((0,0,0)\to (0,0,1)\), \(x=y=0\). For \((0,0,1)\to (0,1,1)\), \(x=0\) and \(z=1\). For \((0,1,1)\to (1,1,1)\), \(y=z=1\). \begin{align*} \int_{\vec{a}}^{\vec{b}} [(2x + 4y)dx + (4x +2z^3)dy + (6yz^2)dz]&= \int_{0}^{1} 0 dz + \int_{0}^{1} 2 dy + \int_{0}^{1} (2x+4)dx\\ &= 0 + 2 + 5 = 7 \end{align*} Next, for the parabolic path \(z=x^2,\, y=x\), the integration is reduced to that over a single variable, which is here chosen to be \(x\). The differentials then \(dz= 2dx\) and \(dy=dx\), and the integral becomes \begin{align*} \int_{{x=0}}^{{x=1}} [(2x + 4x) + (4x +2x^6) + (6x^5)2x]dx&=\int_{{x=0}}^{{x=1}} (6x + 4x + 2x^6 + 12x^6)dx\\ &=\int_{{x=0}}^{{x=1}} (10x + 2x^6 + 12x^6)dx\\ &=5x^2 + \frac{2}{7}x^7 + \frac{12}{7}x^7\bigg\rvert_{x=0}^{x=1}\\ &= 5 + \frac{2}{7} + \frac{12}{7} = 5 + 14/7 = 7. \end{align*} Finally, the integral is simply given by \begin{align} T(\vec{b}) - T(\vec{a}) &= x^2 +4xy +2yz^3\bigg\rvert_{(0,0,0)}^{(1,1,1)}\notag\\ &=1 + 4 + 2 = 7.\tag{much easier!} \end{align}

  25. ☸ State and prove the divergence theorem and Stokes's theorem. [answer]

    The divergence theorem is \[\oint \vec{F}\cdot d\vec{a} = \int \nablav\cdot\vec{F}\, dV\,,\] and Stokes's theorem is \[\oint \vec{F}\cdot d\vecell = \int (\nablav\times\vec{F}) \cdot d\vec{a}\,.\] They are immediate from the definitions of divergence and curl above, but to see what motivates these definitions, see here.

  26. List everything that can be concluded about a vector field \(\vec{F}\) that has a vanishing curl, i.e., \(\nablav\times \vec{F} = 0\). [answer]

    • The line integral \(\int_{\vec{a}}^{\vec{b}} \vec{F}\cdot d\vecell\) is independent of the path.
    • The line integral over any closed loop is zero, i.e., \(\oint_{\vec{a}}^{\vec{a}} \vec{F}\cdot d\vecell = 0\).
    • \(\vec{F}\) is given by the gradient of a scalar potential, i.e., \(\vec{F} = -\nablav V\).

  27. List everything that can be concluded about a vector field \(\vec{F}\) that has a vanishing divergence, i.e., \(\nablav\cdot \vec{F} = 0\). [answer]

    • The surface integral \(\int_{S} \vec{F}\cdot d\vec{a}\) is indepndent of the surface (but the line integral \(\int_{\vec{a}}^{\vec{b}} \vec{F}\cdot d\vecell\) depends on the path.)
    • The integral over any closed surface is zero, i.e., \(\oint_{S}\vec{F}\cdot d\vec{a} = 0\).
    • \(\vec{F}\) is given by the curl of a vector potential, i.e., \(\vec{F} = \nablav \times \vec{A}\).

  28. Calculate the line integral \(\oint \vec{F}\cdot d\vecell\) for the vector field \(\vec{F} = x^2 y \vec{e}_x + xy^3\vec{e}_y\), where the closed path of integration is a square whose corners are given by the ordered pairs \((x,y) = (1,1)\), \((-1,1)\), \((-1,-1)\), and \((1,-1)\). Then, use Stokes's theorem to show that the same result is obtained by \(\int (\nablav \times \vec{F}) \cdot d\vec{A}\). [answer]

    The line integral consists of four sub-paths:

    1. From \((x,y)= (1,-1)\to(1,1)\), the integral is \(\int_{-1}^1 y^3 dy = 0\).
    2. From \((x,y)= (1,1)\to(-1,1)\), the integral is \(\int_{-1}^1 x^2 dx = -2/3\).
    3. From \((x,y)= (-1,1)\to(-1,-1)\), the integral is \(-\int_{1}^{-1} y^3 dy = 0\).
    4. From \((x,y)= (-1,-1)\to(1,-1)\), the integral is \(-\int_{-1}^{-1} x^2 dx = -2/3\).
    Apparently, only sub-paths (2) and (4) contribute to \(\oint \vec{F}\cdot d\vecell\); their sum is \begin{align} \oint \vec{F}\cdot d\vecell = -\tfrac{2}{3} - \tfrac{2}{3} = -\tfrac{4}{3}. \end{align} Meanwhile, according to Stokes's theorem, \(\int (\nablav \times \vec{F}) \cdot d\vec{A} \), where \begin{align} \nablav \times \vec{F} &= \begin{vmatrix} \vec{e}_x & \vec{e}_y & \vec{e}_z \\ \partial/\partial x & \partial/\partial y& \partial/\partial z \\ x^2 y & xy^3 & 0 \end{vmatrix} = (y^3 - x^2)\vec{e}_z. \end{align} Since \(d\vec{A} = \vec{e}_z dA\) (which is consistent, according to the right-hand rule, with the counter-clockwise manner in which the line integral was evaluated), the surface integral evaluates to \begin{align*} \int_{-1}^1\int_{-1}^1 (y^3 - x^2) dx\,dy &= \int_{-1}^1\left[xy^3 - \tfrac{1}{3}x^3 \right]\big\rvert_{x=-1}^{x=1} dy\\ &=\int_{-1}^1 ({y^3} - \tfrac{1}{3} - y^3 - \tfrac{1}{3}) dy \\ &= -\tfrac{2}{3}y\big\rvert_{y=-1}^{y=1} = -\tfrac{4}{3}, \end{align*} which is consistent with the evaluation of the line integral.

  29. The remaining problems of this section build on one another and should be attempted in order:

  30. Calculate the line integral \(\oint \vec{G}\cdot d\vecell\) for the vector field \(\vec{G} = -y\vec{e}_x + (x+y^2)\vec{e}_y\), where the closed path of integration is a square whose corners are given by the ordered pairs \((x,y) = (1,1)\), \((-1,1)\), \((-1,-1)\), and \((1,-1)\). Then, use Stokes's theorem to show that the same result is obtained by \(\int (\nablav \times \vec{G}) \cdot d\vec{A}\). [answer]

    The vector field is shown below. Like in the previous problem, the line integral consists of four sub-paths. This time, the integrals are combined before they are evaluated:

    1. From \((x,y)= (1,-1)\to(1,1)\), the integral is \(\int_{-1}^1 (1+y^2) dy\).
    2. From \((x,y)= (1,1)\to(-1,1)\), the integral is \(\int_{-1}^1 dx\).
    3. From \((x,y)= (-1,1)\to(-1,-1)\), the integral is \(\int_{-1}^{1} (1-y^2) dy\), where it has been noted that \(\int_{1}^{-1} = -\int_{-1}^{1}\).
    4. From \((x,y)= (-1,-1)\to(1,-1)\), the integral is \(\int_{-1}^{1} dx\).
    The integrals add to \begin{align} \oint \vec{G}\cdot d\vecell = 2\int_{-1}^1 dy + 2\int_{-1}^1 dx = 8. \end{align} Meanwhile, according to Stokes's theorem, \(\int (\nablav \times \vec{G}) \cdot d\vec{A} \), where \begin{align} \nablav \times \vec{G} &= \begin{vmatrix} \vec{e}_x & \vec{e}_y & \vec{e}_z \\ \partial/\partial x & \partial/\partial y& \partial/\partial z \\ -y & x+y^2 & 0 \end{vmatrix} = (1 + 1)\vec{e}_z = 2\vec{e}_z. \end{align} Since \(d\vec{A} = \vec{e}_z dA\), the surface integral evaluates to \begin{align*} 2\int_{-1}^1\int_{-1}^1 dx\,dy &= 2x\rvert_{-1}^1 y\rvert_{-1}^1 = 2^3 = 8, \end{align*} which is consistent with the evaluation of the line integral.

  31. Show in Cartesian coordinates \((x,y)\) that \begin{align} \int [\nablav \times (G_x\vec{e}_x + G_y\vec{e}_y)]\cdot \vec{e}_z \,d{A} = \int [\nablav \cdot (F_x\vec{e}_x + F_y\vec{e}_y)] \,dA \,, \end{align} where \(F_x = G_y\) and \(F_y = -G_x\). Then, verify the result by using \(\vec{G}\) from the previous problem, i.e., \(G_x = -y\) and \(G_y = x+y^2\) for the same path of integration. [answer]

    The desired identity is easily shown by noting that \begin{align} \nablav \times (G_x\vec{e}_x + G_y\vec{e}_y) &= \begin{vmatrix} \vec{e}_x & \vec{e}_y & \vec{e}_z \\ \partial/\partial x & \partial/\partial y& \partial/\partial z \\ G_x & G_y & 0 \end{vmatrix} = \left(\frac{\partial G_y}{\partial x} - \frac{\partial G_x}{\partial y}\right)\vec{e}_z. \end{align} Thus \[[\nablav \times (G_x\vec{e}_x + G_y\vec{e}_y)]\cdot \vec{e}_z = \frac{\partial G_y}{\partial x} - \frac{\partial G_x}{\partial y}.\] Replacing \(G_y\) with \(F_x\) and \(G_x\) with \(-F_y\) shows that \begin{align} [\nablav \times (G_x\vec{e}_x + G_y\vec{e}_y)]\cdot \vec{e}_z &= \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} = \nablav \cdot (F_x\vec{e}_x + F_y\vec{e}_y), \end{align} completing the proof.

    The result is now verified for \(G_x = -y\) and \(G_y = x+y^2\), for which \(F_x = x+y^2\) and \(F_y = y\). The divergence of \(\vec{F}\) is \begin{align} \nablav \cdot \vec{F} = 1 + 1 = 2. \end{align} Thus \begin{align} \int \nablav \cdot \vec{F} \,dA = 2\int_{-1}^1 \int_{-1}^1 dx\,dy = 8, \end{align} recovering the result of the previous problem.

  32. The mapping \(F_x = G_y\) and \(F_y = -G_x\) and can be written as a rotation of the vector field \(\vec{F}\). The rotation in Cartesian coordinates reads \begin{align} \begin{pmatrix}F_x \\ F_y \end{pmatrix} = \begin{pmatrix}0 & 1\\ -1 &0\end{pmatrix} \begin{pmatrix}G_x \\ G_y \end{pmatrix}\,. \end{align} In words, the equation above says that \(\vec{F}\) equals a clockwise rotation by \(90^\circ\) of \(\vec{G}\). Given that \(\oint \vec{G}\cdot d\vecell = \int (\nablav \times \vec{G}) \cdot d\vec{A}\) (Stokes's theorem) and the identity proved in the previous problem [written symbolically as \(\int( \nablav \times \vec{G})\cdot d\vec{A} = \int \nablav\cdot \vec{F} dA\)], show that \[\int \nablav\cdot \vec{F} \,dA = \oint \vec{F}\cdot \vec{e}_n\, d\ell,\] where the unit normal vector to the boundary is \(\vec{e}_n\), which equals \({R}\cdot d\vecell\), where \(R\) is the rotation matrix for the clockwise rotation. Note that the rotation matrix is orthogonal, i.e., \({R}^{-1} = R^\mathrm{T}\). [answer]

    In terms of \(R\), the equation of rotation is \begin{align} \vec{F} = R \cdot \vec{G}. \end{align} Invoking the fact that \(R\) is an orthogonal matrix allows the equation of rotation to be written as \(\vec{G} = R^\mathrm{T} \cdot \vec{F}\), insertion of which into Stokes's theorem yields \begin{align} \oint (R^\mathrm{T}\cdot \vec{F})\cdot d\vecell = \int (\nablav \times \vec{G}) \cdot d\vec{A} = \int \nablav \cdot \vec{F}\, dA\,, \end{align} where the second equality holds from the previous problem. By the definition of the transpose operation, \((R^\mathrm{T}\cdot \vec{F})\cdot d\vecell = \vec{F} \cdot (R \cdot d\vecell)\). Noting that \(R \cdot d\vecell = \vec{e}_n d\ell\) yields the desired equality, \begin{align} \oint \vec{F}\cdot \vec{e}_n d\ell = \int \nablav \cdot \vec{F}\, dA \,. \end{align} The above result is surprisingly hard to find in books, but it can be found on this Wikipedia page (where it is discussed slightly differently).

    The above exercise shows that for two-dimensional vector fields, the divergence theorem for the vector field \(\vec{F}\) is equivalent to Stokes's theorem for the vector field \(\vec{G}\), where \(\vec{F} = R\cdot \vec{G}\). See this discussion for more.

  33. Calculate \(\oint \vec{F}\cdot \vec{e}_n\, d\ell\), where \(\vec{F} = (x+y^2)\vec{e}_x + y\vec{e}_y\), and where the domain of integration is the same as in problems 29 and 30. Check to see that the result is equivalent to that of problem 30, i.e., \(\oint \vec{F}\cdot \vec{e}_n\, d\ell = \int \nablav\cdot \vec{F} \,dA = 8\). [answer]

    The integral \(\oint \vec{F}\cdot \vec{e}_n\, d\ell\) consists of four contributions. For \(F_x = x+y^2\) and \(F_y = y\), the contributions are

    1. \(\int_{-1}^1 F_x\rvert_{x=1}\, dy = \int_{-1}^1 (1 + y^2)dy = 2 + \tfrac{2}{3}\)
    2. \(\int_{-1}^1 F_y\rvert_{y=1}\, dx = \int_{-1}^1 dx = 2\)
    3. \(-\int_{-1}^1 F_x\rvert_{x=-1}\, dy = -\int_{-1}^1 (-1+y^2)dy = 2-\tfrac{2}{3}\)
    4. \(-\int_{-1}^1 F_y\rvert_{y=-1}\, dx = \int_{-1}^1 dx = 2 \)
    The minus sign arise for contribution (3) because \(\vec{e}_x\cdot \vec{e}_n = -1 \). Similarly, for contribution (4), \(\vec{e}_y\cdot \vec{e}_n = -1 \).

    Adding up the contributions yields \(\oint \vec{F}\cdot \vec{e}_n\, d\ell = 2 + 2 + 2+ 2 = 8\), matching the results of problems 29 and 30.

↑ Return to math index ← Return to previous topic → Advance to next topic