{"id":1527,"date":"2025-10-17T16:49:11","date_gmt":"2025-10-17T16:49:11","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/calculus3\/?post_type=chapter&#038;p=1527"},"modified":"2025-11-10T17:18:15","modified_gmt":"2025-11-10T17:18:15","slug":"the-divergence-theorem-learn-it-4","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/calculus3\/chapter\/the-divergence-theorem-learn-it-4\/","title":{"raw":"The Divergence Theorem: Learn It 4","rendered":"The Divergence Theorem: Learn It 4"},"content":{"raw":"<h2 data-type=\"title\">Application to Electrostatic Fields<\/h2>\r\n<p class=\"whitespace-normal break-words\">The divergence theorem has many applications in physics and engineering. It allows us to write many physical laws in both an integral form and a differential form (in much the same way that Stokes' theorem allowed us to translate between an integral and differential form of Faraday's law).<\/p>\r\n<p class=\"whitespace-normal break-words\">Areas of study such as fluid dynamics, electromagnetism, and quantum mechanics have equations that describe the conservation of mass, momentum, or energy. The divergence theorem allows us to give these equations in both integral and differential forms.<\/p>\r\n\r\n<h3>Gauss' Law<\/h3>\r\n<p class=\"whitespace-normal break-words\">One of the most common applications of the divergence theorem is to electrostatic fields. An important result in this subject is <strong>Gauss' law<\/strong>. This law states that if [latex]S[\/latex] is a closed surface in electrostatic field [latex]\\mathbf{E}[\/latex], then the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is the total charge enclosed by [latex]S[\/latex] (divided by an electric constant).<\/p>\r\n<p class=\"whitespace-normal break-words\">We now use the divergence theorem to justify the special case of this law in which the electrostatic field is generated by a stationary point charge at the origin.<\/p>\r\n<p id=\"fs-id1167794070480\">If [latex](x, y, z)[\/latex] is a point in space, then the distance from the point to the origin is [latex]r=\\sqrt{x^2+y^2+z^2}[\/latex]. Let [latex]{\\bf{F}}_r[\/latex] denote radial vector field:<\/p>\r\n<p style=\"text-align: center;\">[latex]{\\bf{F}}_r=\\frac1{r^2}\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex].<\/p>\r\nThe vector at a given position in space points in the direction of unit radial vector [latex]\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex] and is scaled by the quantity [latex]1\/r^2[\/latex]. Therefore, the magnitude of a vector at a given point is inversely proportional to the square of the vector\u2019s distance from the origin.\r\n\r\nSuppose we have a stationary charge of [latex]q[\/latex] Coulombs at the origin, existing in a vacuum. The charge generates electrostatic field [latex]{\\bf{E}}[\/latex] given by:\r\n<p style=\"text-align: center;\">[latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r[\/latex],<\/p>\r\nwhere the approximation [latex]\\varepsilon_0 = 8.854 \\times 10^{-12}[\/latex] farad (F)\/m is an electric constant. (The constant [latex]\\varepsilon_0[\/latex] is a measure of the resistance encountered when forming an electric field in a vacuum.)\r\n\r\nNotice that [latex]\\mathbf{E}[\/latex] is a radial vector field. The difference from a gravitational field is that this field points outward whereas the gravitational field points inward. Because:\r\n<p style=\"text-align: center;\">[latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r=\\frac{q}{4\\pi\\varepsilon_0}\\left(\\frac1{r^1}\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle\\right)[\/latex],<\/p>\r\n<p class=\"whitespace-normal break-words\">we say that electrostatic fields obey an <strong>inverse-square law<\/strong>. That is, the electrostatic force at a given point is inversely proportional to the square of the distance from the source of the charge (which in this case is at the origin).<\/p>\r\n<p class=\"whitespace-normal break-words\">Given this vector field, we show that the flux across closed surface [latex]S[\/latex] is zero if the charge is outside of [latex]S[\/latex], and that the flux is [latex]q\/\\varepsilon_0[\/latex] if the charge is inside of [latex]S[\/latex]. In other words, the flux across [latex]S[\/latex] is the charge inside the surface divided by constant [latex]\\varepsilon_0[\/latex]. This is a special case of Gauss' law, and here we use the divergence theorem to justify this special case.<\/p>\r\n<p id=\"fs-id1167794246555\">To show that the flux across [latex]S[\/latex] is the charge inside the surface divided by constant [latex]\\varepsilon_0[\/latex], we need two intermediate steps. First we show that the divergence of [latex]{\\bf{F}}_r[\/latex] is zero and then we show that the flux of [latex]{\\bf{F}}_r[\/latex] across any smooth surface [latex]S[\/latex] is either zero or [latex]4\\pi[\/latex]. We can then justify this special case of Gauss\u2019 law.<\/p>\r\n\r\n<section class=\"textbox example\" aria-label=\"Example\">Verify that the divergence of [latex]{\\bf{F}}_r[\/latex] is zero where [latex]{\\bf{F}}_r[\/latex] is defined (away from the origin).[reveal-answer q=\"724687101\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"724687101\"]\r\n<p id=\"fs-id1167794126259\">Since [latex]r=\\sqrt{x^2+y^2+z^2}[\/latex], the quotient rule gives us<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\n\\frac{\\partial}{\\partial{x}}\\left(\\frac{x}{r^3}\\right)&amp;=\\frac{\\partial}{\\partial{x}}\\left(\\frac{x}{(x^2+y^2+z^2)^{3\/2}}\\right) \\\\\r\n&amp;=\\frac{(x^2+y^2+z^2)^{3\/2}-x\\left[\\frac32(x^2+y^2+z^2)^{1\/2}2x\\right]}{(x^2+y^2+z^2)^3} \\\\\r\n&amp;=\\frac{r^3-3x^2r}{r^6}=\\frac{r^2-3x^2}{r^5}\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1167793639946\">Similarly,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial}{\\partial{y}}\\left(\\frac{y}{r^3}\\right)=\\frac{r^2-3y^2}{r^5}\\text{ and }\\frac{\\partial}{\\partial{z}}\\left(\\frac{z}{r^3}\\right)=\\frac{r^2-3z^2}{r^5}}[\/latex].<\/p>\r\n<p id=\"fs-id1167794122035\">Therefore,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\n\\text{div }{\\bf{F}}_r&amp;=\\frac{r^2-3x^2}{r^5}+\\frac{r^2-3y^2}{r^5}+\\frac{r^2-3z^2}{r^5} \\\\\r\n&amp;=\\frac{3r^2-3(x^2+y^2+z^2)}{r^5} \\\\\r\n&amp;=\\frac{3r^2-3r^2}{r^5}=0<\/p>\r\n\\end{aligned}[\/latex].\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section>Notice that since the divergence of [latex]\\mathbf{F}_r[\/latex] is zero and [latex]\\mathbf{E}[\/latex] is [latex]\\mathbf{F}_r[\/latex] scaled by a constant, the divergence of electrostatic field [latex]\\mathbf{E}[\/latex] is also zero (except at the origin).\r\n\r\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3>flux across a smooth surface<\/h3>\r\n<p id=\"fs-id1167793444887\">Let [latex]S[\/latex] be a connected, piecewise smooth closed surface and let [latex]{\\bf{F}}_r=\\frac{1}{r^2}\\left\\langle\\frac{x}r,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex]. Then,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{equation*}\r\n\\displaystyle\\iint_S{\\bf{F}}\\cdot d{\\bf{S}} = \\left\\{\r\n\\begin{array}{ll}\r\n0 &amp; \\quad \\text{if }S\\text{ does not encompass the origin} \\\\\r\n4\\pi &amp; \\quad \\text{if }S\\text{ encompasses the origin.}\r\n\\end{array}\r\n\\right.\r\n\\end{equation*}\r\n[\/latex]<\/p>\r\n\r\n<\/section><section class=\"textbox proTip\" aria-label=\"Pro Tip\">In other words, the flux of [latex]\\mathbf{F}_r[\/latex] across any piecewise smooth closed surface [latex]S[\/latex] depends only on whether the origin is inside of [latex]S[\/latex].\r\n\r\n<\/section><section class=\"textbox connectIt\">\r\n<p style=\"text-align: center;\"><strong>Proof<\/strong><\/p>\r\n\r\n\r\n<hr \/>\r\n<p class=\"whitespace-normal break-words\">The logic of this proof follows the logic of using Green's theorem on a region with holes, only we use the divergence theorem rather than Green's theorem.<\/p>\r\n<p id=\"fs-id1167793931487\">First, suppose that [latex]S[\/latex] does not encompass the origin. In this case, the solid enclosed by [latex]S[\/latex] is in the domain of [latex]{\\bf{F}}_r[\/latex], and since the divergence of [latex]{\\bf{F}}_r[\/latex] is zero, we can immediately apply the divergence theorem and find that [latex]\\displaystyle\\iint_S{\\bf{F}}\\cdot d{\\bf{S}}[\/latex] is zero.<\/p>\r\n<p id=\"fs-id1167794138267\">Now suppose that [latex]S[\/latex] does encompass the origin. We cannot just use the divergence theorem to calculate the flux, because the field is not defined at the origin. Let [latex]S_a[\/latex] be a sphere of radius [latex]a[\/latex] inside of [latex]S[\/latex] centered at the origin. The outward normal vector field on the sphere, in spherical coordinates, is<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{{\\bf{t}}_\\phi\\times{\\bf{t}}_\\theta=\\langle a^2\\cos\\theta\\sin^2\\phi,a^2\\sin\\theta\\sin^2\\phi,a^2\\sin\\phi\\cos\\phi\\rangle}[\/latex].<\/p>\r\n<p id=\"fs-id1167793949480\">Therefore, on the surface of the sphere, the dot product [latex]{\\bf{F}}_r\\cdot{\\bf{N}}[\/latex] (in spherical coordinates) is<\/p>\r\n<p style=\"text-align: center;\">[latex]\r\n\\begin{aligned}\r\n{\\bf{F}}_r\\cdot{\\bf{N}}&amp;=\\left\\langle\\frac{\\sin\\phi\\cos\\theta}{a^2},\\frac{\\sin\\phi\\sin\\theta}{a^2},\\frac{\\cos\\phi}{a^2}\\right\\rangle\\cdot\\langle a^2\\cos\\theta\\sin^2\\phi,a^2\\sin\\theta\\sin^2\\phi,a^2\\sin\\phi\\cos\\phi\\rangle \\\\\r\n&amp;=\\sin\\phi(\\langle\\sin\\phi\\cos\\theta,\\sin\\phi\\sin\\theta,\\cos\\phi\\rangle\\cdot\\langle\\sin\\phi\\cos\\theta,\\sin\\phi\\sin\\theta,\\cos\\phi\\rangle) \\\\\r\n&amp;=\\sin\\phi\r\n\\end{aligned}[\/latex].<\/p>\r\nThe flux of [latex]{\\bf{F}}_r[\/latex] across [latex]S_a[\/latex] is\r\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_{S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS=\\displaystyle\\int_0^{2\\pi}\\displaystyle\\int_0^\\pi\\sin\\phi d\\phi d\\theta=4\\pi}[\/latex].<\/p>\r\n<p id=\"fs-id1167793245829\">Now, remember that we are interested in the flux across [latex]S[\/latex], not necessarily the flux across [latex]S_a[\/latex]. To calculate the flux across [latex]S[\/latex], let [latex]E[\/latex] be the solid between surfaces [latex]S_a[\/latex] and [latex]S[\/latex]. Then, the boundary of [latex]E[\/latex] consists of [latex]S_a[\/latex] and [latex]S[\/latex]. Denote this boundary by [latex]S-S_a[\/latex] to indicate that [latex]S[\/latex] is oriented outward but now [latex]S_a[\/latex] is oriented inward. We would like to apply the divergence theorem to solid\u00a0<em data-effect=\"italics\">E.<\/em>\u00a0Notice that the divergence theorem, as stated, can\u2019t handle a solid such as [latex]E[\/latex] because [latex]E[\/latex] has a hole. However, the divergence theorem can be extended to handle solids with holes, just as Green\u2019s theorem can be extended to handle regions with holes. This allows us to use the divergence theorem in the following way. By the divergence theorem,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\n\\displaystyle\\iint_{S-S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS&amp;=\\displaystyle\\iint_S{\\bf{F}}_r\\cdot{\\bf{N}}dS-\\displaystyle\\iint_{S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS \\\\\r\n&amp;=\\displaystyle\\iiint_E\\text{div }{\\bf{F}}_r dV \\\\\r\n&amp;=\\displaystyle\\iiint_E0 \\ dV=0\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1167794098930\">Therefore,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{F}}_r\\cdot{\\bf{N}}dS=\\displaystyle\\iint_{S_a}{\\bf{F}}_r \\cdot dS=4\\pi}[\/latex],<\/p>\r\n<p id=\"fs-id1167794181311\">and we have our desired result.<\/p>\r\n[latex]_\\blacksquare[\/latex]\r\n\r\n<\/section>\r\n<h3>Applying Gauss' Law<\/h3>\r\n<p id=\"fs-id1167793502247\">Now we return to calculating the flux across a smooth surface in the context of electrostatic field [latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r[\/latex] of a point charge at the origin. Let [latex]S[\/latex] be a piecewise smooth closed surface that encompasses the origin. Then:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{aligned}\r\n\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}&amp;=\\displaystyle\\iint_S\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r\\cdot d{\\bf{S}} \\\\\r\n&amp;=\\frac{q}{4\\pi\\varepsilon_0}\\displaystyle\\iint_S{\\bf{F}}_r\\cdot d{\\bf{S}} \\\\\r\n&amp;=\\frac{q}{\\varepsilon_0}\r\n\\end{aligned}[\/latex].<\/p>\r\n<p id=\"fs-id1167793629345\">If [latex]S[\/latex] does not encompass the origin, then:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}=\\frac{q}{4\\pi\\varepsilon_0}\\displaystyle\\iint_S{\\bf{F}}_r\\cdot d{\\bf{S}}=0}[\/latex].<\/p>\r\n<p class=\"whitespace-normal break-words\">Therefore, we have justified the claim that we set out to justify: the flux across closed surface [latex]S[\/latex] is zero if the charge is outside of [latex]S[\/latex], and the flux is [latex]q\/\\varepsilon_0[\/latex] if the charge is inside of [latex]S[\/latex].<\/p>\r\n<p class=\"whitespace-normal break-words\">This analysis works only if there is a single point charge at the origin. In this case, Gauss' law says that the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is the total charge enclosed by [latex]S[\/latex].<\/p>\r\n<p class=\"whitespace-normal break-words\">Gauss' law can be extended to handle multiple charged solids in space, not just a single point charge at the origin. The logic is similar to the previous analysis, but beyond the scope of this text. In full generality, Gauss' law states that if [latex]S[\/latex] is a piecewise smooth closed surface and [latex]Q[\/latex] is the total amount of charge inside of [latex]S[\/latex], then the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is [latex]Q\/\\varepsilon_0[\/latex].<\/p>\r\n\r\n<section class=\"textbox example\" aria-label=\"Example\">Suppose we have four stationary point charges in space, all with a charge of 0.002 Coulombs (C). The charges are located at [latex](0, 1, 1)[\/latex], [latex](1, 1, 4)[\/latex], [latex](-1, 0, 0)[\/latex], and [latex](-2, -2, 2)[\/latex]. Let\u00a0[latex]{\\bf{E}}[\/latex]\u00a0denote the electrostatic field generated by these point charges. If [latex]S[\/latex] is the sphere of radius 2 oriented outward and centered at the origin, then find [latex]\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}[\/latex].[reveal-answer q=\"240167357\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"240167357\"]\r\n<p id=\"fs-id1167793936429\">According to Gauss\u2019 law, the flux of\u00a0[latex]{\\bf{E}}[\/latex]\u00a0across [latex]S[\/latex] is the total charge inside of\u00a0<em data-effect=\"italics\">S<\/em>\u00a0divided by the electric constant. Since [latex]S[\/latex] has radius 2, notice that only two of the charges are inside of [latex]S[\/latex]: the charge at [latex](0, 1, 1)[\/latex] and the charge at [latex](-1, 0, 0)[\/latex]. Therefore, the total charge encompassed by [latex]S[\/latex] is 0.004 and, by Gauss\u2019 law,<\/p>\r\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}=\\frac{0.004}{8.854\\times10^{-12}}\\approx4.518\\times10^9\\text{ V-m}}[\/latex].<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/section>","rendered":"<h2 data-type=\"title\">Application to Electrostatic Fields<\/h2>\n<p class=\"whitespace-normal break-words\">The divergence theorem has many applications in physics and engineering. It allows us to write many physical laws in both an integral form and a differential form (in much the same way that Stokes&#8217; theorem allowed us to translate between an integral and differential form of Faraday&#8217;s law).<\/p>\n<p class=\"whitespace-normal break-words\">Areas of study such as fluid dynamics, electromagnetism, and quantum mechanics have equations that describe the conservation of mass, momentum, or energy. The divergence theorem allows us to give these equations in both integral and differential forms.<\/p>\n<h3>Gauss&#8217; Law<\/h3>\n<p class=\"whitespace-normal break-words\">One of the most common applications of the divergence theorem is to electrostatic fields. An important result in this subject is <strong>Gauss&#8217; law<\/strong>. This law states that if [latex]S[\/latex] is a closed surface in electrostatic field [latex]\\mathbf{E}[\/latex], then the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is the total charge enclosed by [latex]S[\/latex] (divided by an electric constant).<\/p>\n<p class=\"whitespace-normal break-words\">We now use the divergence theorem to justify the special case of this law in which the electrostatic field is generated by a stationary point charge at the origin.<\/p>\n<p id=\"fs-id1167794070480\">If [latex](x, y, z)[\/latex] is a point in space, then the distance from the point to the origin is [latex]r=\\sqrt{x^2+y^2+z^2}[\/latex]. Let [latex]{\\bf{F}}_r[\/latex] denote radial vector field:<\/p>\n<p style=\"text-align: center;\">[latex]{\\bf{F}}_r=\\frac1{r^2}\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex].<\/p>\n<p>The vector at a given position in space points in the direction of unit radial vector [latex]\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex] and is scaled by the quantity [latex]1\/r^2[\/latex]. Therefore, the magnitude of a vector at a given point is inversely proportional to the square of the vector\u2019s distance from the origin.<\/p>\n<p>Suppose we have a stationary charge of [latex]q[\/latex] Coulombs at the origin, existing in a vacuum. The charge generates electrostatic field [latex]{\\bf{E}}[\/latex] given by:<\/p>\n<p style=\"text-align: center;\">[latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r[\/latex],<\/p>\n<p>where the approximation [latex]\\varepsilon_0 = 8.854 \\times 10^{-12}[\/latex] farad (F)\/m is an electric constant. (The constant [latex]\\varepsilon_0[\/latex] is a measure of the resistance encountered when forming an electric field in a vacuum.)<\/p>\n<p>Notice that [latex]\\mathbf{E}[\/latex] is a radial vector field. The difference from a gravitational field is that this field points outward whereas the gravitational field points inward. Because:<\/p>\n<p style=\"text-align: center;\">[latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r=\\frac{q}{4\\pi\\varepsilon_0}\\left(\\frac1{r^1}\\left\\langle\\frac{x}y,\\frac{y}r,\\frac{z}r\\right\\rangle\\right)[\/latex],<\/p>\n<p class=\"whitespace-normal break-words\">we say that electrostatic fields obey an <strong>inverse-square law<\/strong>. That is, the electrostatic force at a given point is inversely proportional to the square of the distance from the source of the charge (which in this case is at the origin).<\/p>\n<p class=\"whitespace-normal break-words\">Given this vector field, we show that the flux across closed surface [latex]S[\/latex] is zero if the charge is outside of [latex]S[\/latex], and that the flux is [latex]q\/\\varepsilon_0[\/latex] if the charge is inside of [latex]S[\/latex]. In other words, the flux across [latex]S[\/latex] is the charge inside the surface divided by constant [latex]\\varepsilon_0[\/latex]. This is a special case of Gauss&#8217; law, and here we use the divergence theorem to justify this special case.<\/p>\n<p id=\"fs-id1167794246555\">To show that the flux across [latex]S[\/latex] is the charge inside the surface divided by constant [latex]\\varepsilon_0[\/latex], we need two intermediate steps. First we show that the divergence of [latex]{\\bf{F}}_r[\/latex] is zero and then we show that the flux of [latex]{\\bf{F}}_r[\/latex] across any smooth surface [latex]S[\/latex] is either zero or [latex]4\\pi[\/latex]. We can then justify this special case of Gauss\u2019 law.<\/p>\n<section class=\"textbox example\" aria-label=\"Example\">Verify that the divergence of [latex]{\\bf{F}}_r[\/latex] is zero where [latex]{\\bf{F}}_r[\/latex] is defined (away from the origin).<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q724687101\">Show Solution<\/button><\/p>\n<div id=\"q724687101\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1167794126259\">Since [latex]r=\\sqrt{x^2+y^2+z^2}[\/latex], the quotient rule gives us<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  \\frac{\\partial}{\\partial{x}}\\left(\\frac{x}{r^3}\\right)&=\\frac{\\partial}{\\partial{x}}\\left(\\frac{x}{(x^2+y^2+z^2)^{3\/2}}\\right) \\\\  &=\\frac{(x^2+y^2+z^2)^{3\/2}-x\\left[\\frac32(x^2+y^2+z^2)^{1\/2}2x\\right]}{(x^2+y^2+z^2)^3} \\\\  &=\\frac{r^3-3x^2r}{r^6}=\\frac{r^2-3x^2}{r^5}  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1167793639946\">Similarly,<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\frac{\\partial}{\\partial{y}}\\left(\\frac{y}{r^3}\\right)=\\frac{r^2-3y^2}{r^5}\\text{ and }\\frac{\\partial}{\\partial{z}}\\left(\\frac{z}{r^3}\\right)=\\frac{r^2-3z^2}{r^5}}[\/latex].<\/p>\n<p id=\"fs-id1167794122035\">Therefore,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  \\text{div }{\\bf{F}}_r&=\\frac{r^2-3x^2}{r^5}+\\frac{r^2-3y^2}{r^5}+\\frac{r^2-3z^2}{r^5} \\\\  &=\\frac{3r^2-3(x^2+y^2+z^2)}{r^5} \\\\  &=\\frac{3r^2-3r^2}{r^5}=0<\/p>\n<p>  \\end{aligned}[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n<p>Notice that since the divergence of [latex]\\mathbf{F}_r[\/latex] is zero and [latex]\\mathbf{E}[\/latex] is [latex]\\mathbf{F}_r[\/latex] scaled by a constant, the divergence of electrostatic field [latex]\\mathbf{E}[\/latex] is also zero (except at the origin).<\/p>\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3>flux across a smooth surface<\/h3>\n<p id=\"fs-id1167793444887\">Let [latex]S[\/latex] be a connected, piecewise smooth closed surface and let [latex]{\\bf{F}}_r=\\frac{1}{r^2}\\left\\langle\\frac{x}r,\\frac{y}r,\\frac{z}r\\right\\rangle[\/latex]. Then,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{equation*}  \\displaystyle\\iint_S{\\bf{F}}\\cdot d{\\bf{S}} = \\left\\{  \\begin{array}{ll}  0 & \\quad \\text{if }S\\text{ does not encompass the origin} \\\\  4\\pi & \\quad \\text{if }S\\text{ encompasses the origin.}  \\end{array}  \\right.  \\end{equation*}[\/latex]<\/p>\n<\/section>\n<section class=\"textbox proTip\" aria-label=\"Pro Tip\">In other words, the flux of [latex]\\mathbf{F}_r[\/latex] across any piecewise smooth closed surface [latex]S[\/latex] depends only on whether the origin is inside of [latex]S[\/latex].<\/p>\n<\/section>\n<section class=\"textbox connectIt\">\n<p style=\"text-align: center;\"><strong>Proof<\/strong><\/p>\n<hr \/>\n<p class=\"whitespace-normal break-words\">The logic of this proof follows the logic of using Green&#8217;s theorem on a region with holes, only we use the divergence theorem rather than Green&#8217;s theorem.<\/p>\n<p id=\"fs-id1167793931487\">First, suppose that [latex]S[\/latex] does not encompass the origin. In this case, the solid enclosed by [latex]S[\/latex] is in the domain of [latex]{\\bf{F}}_r[\/latex], and since the divergence of [latex]{\\bf{F}}_r[\/latex] is zero, we can immediately apply the divergence theorem and find that [latex]\\displaystyle\\iint_S{\\bf{F}}\\cdot d{\\bf{S}}[\/latex] is zero.<\/p>\n<p id=\"fs-id1167794138267\">Now suppose that [latex]S[\/latex] does encompass the origin. We cannot just use the divergence theorem to calculate the flux, because the field is not defined at the origin. Let [latex]S_a[\/latex] be a sphere of radius [latex]a[\/latex] inside of [latex]S[\/latex] centered at the origin. The outward normal vector field on the sphere, in spherical coordinates, is<\/p>\n<p style=\"text-align: center;\">[latex]\\large{{\\bf{t}}_\\phi\\times{\\bf{t}}_\\theta=\\langle a^2\\cos\\theta\\sin^2\\phi,a^2\\sin\\theta\\sin^2\\phi,a^2\\sin\\phi\\cos\\phi\\rangle}[\/latex].<\/p>\n<p id=\"fs-id1167793949480\">Therefore, on the surface of the sphere, the dot product [latex]{\\bf{F}}_r\\cdot{\\bf{N}}[\/latex] (in spherical coordinates) is<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  {\\bf{F}}_r\\cdot{\\bf{N}}&=\\left\\langle\\frac{\\sin\\phi\\cos\\theta}{a^2},\\frac{\\sin\\phi\\sin\\theta}{a^2},\\frac{\\cos\\phi}{a^2}\\right\\rangle\\cdot\\langle a^2\\cos\\theta\\sin^2\\phi,a^2\\sin\\theta\\sin^2\\phi,a^2\\sin\\phi\\cos\\phi\\rangle \\\\  &=\\sin\\phi(\\langle\\sin\\phi\\cos\\theta,\\sin\\phi\\sin\\theta,\\cos\\phi\\rangle\\cdot\\langle\\sin\\phi\\cos\\theta,\\sin\\phi\\sin\\theta,\\cos\\phi\\rangle) \\\\  &=\\sin\\phi  \\end{aligned}[\/latex].<\/p>\n<p>The flux of [latex]{\\bf{F}}_r[\/latex] across [latex]S_a[\/latex] is<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_{S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS=\\displaystyle\\int_0^{2\\pi}\\displaystyle\\int_0^\\pi\\sin\\phi d\\phi d\\theta=4\\pi}[\/latex].<\/p>\n<p id=\"fs-id1167793245829\">Now, remember that we are interested in the flux across [latex]S[\/latex], not necessarily the flux across [latex]S_a[\/latex]. To calculate the flux across [latex]S[\/latex], let [latex]E[\/latex] be the solid between surfaces [latex]S_a[\/latex] and [latex]S[\/latex]. Then, the boundary of [latex]E[\/latex] consists of [latex]S_a[\/latex] and [latex]S[\/latex]. Denote this boundary by [latex]S-S_a[\/latex] to indicate that [latex]S[\/latex] is oriented outward but now [latex]S_a[\/latex] is oriented inward. We would like to apply the divergence theorem to solid\u00a0<em data-effect=\"italics\">E.<\/em>\u00a0Notice that the divergence theorem, as stated, can\u2019t handle a solid such as [latex]E[\/latex] because [latex]E[\/latex] has a hole. However, the divergence theorem can be extended to handle solids with holes, just as Green\u2019s theorem can be extended to handle regions with holes. This allows us to use the divergence theorem in the following way. By the divergence theorem,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  \\displaystyle\\iint_{S-S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS&=\\displaystyle\\iint_S{\\bf{F}}_r\\cdot{\\bf{N}}dS-\\displaystyle\\iint_{S_a}{\\bf{F}}_r\\cdot{\\bf{N}}dS \\\\  &=\\displaystyle\\iiint_E\\text{div }{\\bf{F}}_r dV \\\\  &=\\displaystyle\\iiint_E0 \\ dV=0  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1167794098930\">Therefore,<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{F}}_r\\cdot{\\bf{N}}dS=\\displaystyle\\iint_{S_a}{\\bf{F}}_r \\cdot dS=4\\pi}[\/latex],<\/p>\n<p id=\"fs-id1167794181311\">and we have our desired result.<\/p>\n<p>[latex]_\\blacksquare[\/latex]<\/p>\n<\/section>\n<h3>Applying Gauss&#8217; Law<\/h3>\n<p id=\"fs-id1167793502247\">Now we return to calculating the flux across a smooth surface in the context of electrostatic field [latex]{\\bf{E}}=\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r[\/latex] of a point charge at the origin. Let [latex]S[\/latex] be a piecewise smooth closed surface that encompasses the origin. Then:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{aligned}  \\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}&=\\displaystyle\\iint_S\\frac{q}{4\\pi\\varepsilon_0}{\\bf{F}}_r\\cdot d{\\bf{S}} \\\\  &=\\frac{q}{4\\pi\\varepsilon_0}\\displaystyle\\iint_S{\\bf{F}}_r\\cdot d{\\bf{S}} \\\\  &=\\frac{q}{\\varepsilon_0}  \\end{aligned}[\/latex].<\/p>\n<p id=\"fs-id1167793629345\">If [latex]S[\/latex] does not encompass the origin, then:<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}=\\frac{q}{4\\pi\\varepsilon_0}\\displaystyle\\iint_S{\\bf{F}}_r\\cdot d{\\bf{S}}=0}[\/latex].<\/p>\n<p class=\"whitespace-normal break-words\">Therefore, we have justified the claim that we set out to justify: the flux across closed surface [latex]S[\/latex] is zero if the charge is outside of [latex]S[\/latex], and the flux is [latex]q\/\\varepsilon_0[\/latex] if the charge is inside of [latex]S[\/latex].<\/p>\n<p class=\"whitespace-normal break-words\">This analysis works only if there is a single point charge at the origin. In this case, Gauss&#8217; law says that the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is the total charge enclosed by [latex]S[\/latex].<\/p>\n<p class=\"whitespace-normal break-words\">Gauss&#8217; law can be extended to handle multiple charged solids in space, not just a single point charge at the origin. The logic is similar to the previous analysis, but beyond the scope of this text. In full generality, Gauss&#8217; law states that if [latex]S[\/latex] is a piecewise smooth closed surface and [latex]Q[\/latex] is the total amount of charge inside of [latex]S[\/latex], then the flux of [latex]\\mathbf{E}[\/latex] across [latex]S[\/latex] is [latex]Q\/\\varepsilon_0[\/latex].<\/p>\n<section class=\"textbox example\" aria-label=\"Example\">Suppose we have four stationary point charges in space, all with a charge of 0.002 Coulombs (C). The charges are located at [latex](0, 1, 1)[\/latex], [latex](1, 1, 4)[\/latex], [latex](-1, 0, 0)[\/latex], and [latex](-2, -2, 2)[\/latex]. Let\u00a0[latex]{\\bf{E}}[\/latex]\u00a0denote the electrostatic field generated by these point charges. If [latex]S[\/latex] is the sphere of radius 2 oriented outward and centered at the origin, then find [latex]\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q240167357\">Show Solution<\/button><\/p>\n<div id=\"q240167357\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1167793936429\">According to Gauss\u2019 law, the flux of\u00a0[latex]{\\bf{E}}[\/latex]\u00a0across [latex]S[\/latex] is the total charge inside of\u00a0<em data-effect=\"italics\">S<\/em>\u00a0divided by the electric constant. Since [latex]S[\/latex] has radius 2, notice that only two of the charges are inside of [latex]S[\/latex]: the charge at [latex](0, 1, 1)[\/latex] and the charge at [latex](-1, 0, 0)[\/latex]. Therefore, the total charge encompassed by [latex]S[\/latex] is 0.004 and, by Gauss\u2019 law,<\/p>\n<p style=\"text-align: center;\">[latex]\\large{\\displaystyle\\iint_S{\\bf{E}}\\cdot d{\\bf{S}}=\\frac{0.004}{8.854\\times10^{-12}}\\approx4.518\\times10^9\\text{ V-m}}[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n","protected":false},"author":15,"menu_order":25,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1527","chapter","type-chapter","status-publish","hentry"],"part":438,"module-header":"- Select Header -","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":5,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1527\/revisions"}],"predecessor-version":[{"id":2116,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1527\/revisions\/2116"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/parts\/438"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapters\/1527\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/media?parent=1527"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/pressbooks\/v2\/chapter-type?post=1527"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/contributor?post=1527"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/calculus3\/wp-json\/wp\/v2\/license?post=1527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}