1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Connecting Vector Calculus to Maxwell's Equations

  1. Mar 21, 2017 #1
    I have recently finished an extensive review of vector calculus. I need to connect the exhaustive techniques of Surface Integrals and line integrals to quite a few problems involving Maxwell's Equations before I really feel certain that I am on board with both the math and the physics. I feel like if I truly understand what's going on, then my solution should be correct, but its not. The following problem is from Daniel Fliesch's "A Student's Guide to Maxwell's Equations". Yes, this problem is clearly solved step by step in the text; however the solution does not accomplish what I need it to for my months of hard work to pay off.

    1. The problem statement, all variables and given/known data

    Problem: The electric field at distance r from an infinite line charge with
    linear charge density λ is given in Table 1.1 as

    E = (1/(2πεo)) * λ/|r| * rHAT

    2. Relevant equations

    sFndS = ∫S = F ⋅ (ru × rv) dudv

    E = (1/(2πεo)) * ( λ / |r| ) * rHAT

    Use this expression to find the electric flux through a cylinder of radius R
    and height h surrounding a portion of an infinite line charge, and then use
    Gauss’s law to verify that the enclosed charge is λh.

    3. The attempt at a solution
    Instead of using Gauss's Law to find the flux, I am going to find the flux by taking a surface integral of the Electric field over the parameterized surface of a cylinder with radius r. I am going to intentionally withhold some observations such as "the electric field is constant, so we can pull it out of the integral, etc" until the very end. I need to see the nitty-gritty exhaustive details of the machinery of Vector Calculus doing what it's supposed to do before I feel like I am competent to fully appreciate the beauty of what's going on.

    Simplifying Expression for Electric Field:
    E = (1/(2πεo)) * ( λ / |r| ) * rHAT
    E = (C * λ * rHAT )/ |r|
    E = (C * λ * r )/|r|2

    where C = (1/(2πεo))

    Evaluation Theorem for Surface Integrals
    Any Surface integral (flux) of an arbitrary vector field F over a parameterized Surface can be calculated as follows

    sFndS = ∫s = F ⋅ (ru × rv)dudv

    In this case, the vector field is the Electric field E. The surface has a constant radius R, and therefore depends on angle Φ and height z. In physics texts the surface element ndA is used instead of ndS. ru and rv are the derivatives of the paramterized surface with respect to u, and with respect to v.

    ∴ ∫sEndA = ∫s E ⋅ (rΦ × rz) dΦdz

    The Cylinder surface is parameterized as:
    r = [R * cos(Φ) , R * sin(Φ), z] for 0 ≤ Z ≤ h AND 0 ≤ Φ ≤ 2π

    NOTE: |r| = √((R * cos(Φ))2 + (R * sin(Φ))2 z2)
    |r| = √(R2 + z2)
    |r|2 = R2 + z2

    The Derivatives of the parameterization
    rΦ = [-R *sin(Φ) , R*cos(Φ) , 0]
    rz = [0 , 0 , 1]

    The Cross product of derivatives yields a normal vector
    rΦ × rz = [R*sin(Φ) , R*cos(Φ) , 0]

    Substituting all the previous work into the Surface Integral Evaluation Theorem:

    sEndA = ∫S E ⋅ (rΦ × rz) dΦdz

    =∫s(C * λ * r )/|r|2 ⋅ ([R*sin(Φ) , R*cos(Φ) , 0] dΦdz

    =(C * λ) ∫s( [R * cos(Φ) , R * sin(Φ), z] )/(R2 + z2) ⋅ ([R*sin(Φ) , R*cos(Φ) , 0] dΦdz

    =(C * λ) ∫s( (R * cos(Φ))2 + (R * sin(Φ))2 )/(R2 + z2) ⋅ ([R*sin(Φ) , R*cos(Φ) , 0] dΦdz
    =(C * λ) ∫s(R2 /(R2 + z2) )dΦdz

    =(C * λ) ∫00h(R2 /(R2 + z2) )dΦdz

    =(C * λ) ∫0( tan-1(z/ r)|0h

    =(C * λ) ∫0( tan-1(h/ r) - tan-1(0/ r) dΦ

    =(C * λ) ∫0( tan-1(h/ r)) dΦ

    = C * λ * 2π * r * tan-1(h / r) *Φ|0

    = C * λ * 2π * r * tan-1(h / r) * (2π - 0)

    = (1/(2πεo))* λ * 2π * r * tan-1(h / r)

    = (λ/(εo) * r * tan-1(h / r) (which is the WRONG ANSWER
  2. jcsd
  3. Mar 21, 2017 #2
    I'm confused about what it is you're trying to accomplish. The magic of vector calculus is what gives us the Divergence Theorem, which is essentially Gauss' Law.

    But as for where you might be going wrong, the first thing I noticed is you seem to be under the impression that ##\hat r## and ##\vec r## are the same. They're not. ##\hat r## is just the directional component and it's ##\vec r## that's equal to ##\vec r = \frac r {\left| r \right|} \hat r##.
  4. Mar 21, 2017 #3
    I am trying connect the physics with the very most basic DEFINITION of flux (surface integral) to find flux an Electric Field. Even though it will be more tedious, it will cement the core facts together for me, and iron out misunderstandings I might have.

    All the math texts have a general evaluation theorem for evaluating surface integrals of a Vector Field Function. I evaluated dozens of surface integrals with this process. Sometimes this process is even used when using Stokes theorem and Divergence Theorem in reverse. Stokes Theorem (when finding the flux of a curl) and the Divergence Theorem (flux over a closed surface) can make allot of these surface integrals easier when their special conditions are met. But what about when they are NOT met? What if I want to find the flux an electric field of a portion of a surface that is assymetrical or simply not closed? "Enclosed charge" becomes undefined in such a circumstance. The flux through that surface still has meaning though. I wouldn't be able to do it, if I can't start it here with something I already know the answer to.

    Yes, I realize that the Divergence Theorem gives way to Gauss's Law. I myself used the divergence theorem myself to convince myself that the differential and integral form for 2 of Maxwell's Equations were indeed equivalent.

    While Gauss's Law is always true in electrostatics, and great for high symmetry situations (which I admit this is one such situation a situation that is symmetrical), its not particularly useful for more generalized surfaces.

    I am most certainly fully aware that rHAT is a unit vector

    However, (1/|r| ) * rHAT = (1/|r| ) * r /|r| = r )/|r|2
    I did not replace rHAT with r.
    If you look closely, when I made the exchange I raised |r| in the denominator to a power of 2.

    E = (1/(2πεo)) * ( λ / |r| ) * rHAT
    E = (C * λ * rHAT )/ |r|
    E = (C * λ * r )/|r|2

    By the way thank you for taking a peak at the problem. By the way, how do you get those pretty forumas?
  5. Mar 21, 2017 #4


    User Avatar
    Homework Helper
    Gold Member

    It looks like you are not consistent in how you are using the symbol r.

    For example, sketch the vector r as used in the electric field expression:
    E = (C * λ * r )/|r|2

    and sketch the vector r as used in the parameterization of the cylinder:
    r = [R * cos(Φ) , R * sin(Φ), z] for 0 ≤ z ≤ h AND 0 ≤ Φ ≤ 2π

    Are they the same vector?
    Last edited: Mar 21, 2017
  6. Mar 21, 2017 #5
    LaTeX. https://www.physicsforums.com/help/latexhelp/

    My point is that you shouldn't be replacing ##\hat r## with anything. The electric field for a infinite line of charge is simply ##\vec E = \frac \lambda {2\pi \epsilon_0 s} \hat s## where s is the radial component. There is no need to change anything.
  7. Mar 21, 2017 #6
    To elaborate a little further, because ##\vec E## only involves a radial component, we choose a cylinder such that the area vector is always parallel to the electric field. Dotting these together removes the directional components and gives us simply ##\iint \left | E \right | dA##.
  8. Mar 27, 2017 #7
    Tell me what you guys think! I believe I may have the solution! Taking TJGlib's reminder that that the unit vector is entirely radial into account, it must necessarily be the case that the z component of ## \vec E ## is 0. Thus the z component for the unit vector for ## \vec E ##, which is ## \hat r ## must also also zero.

    To RECAP: I am attempting to convince myself that the flux of an Electric Field can be found with direct evaluation of the Surface Integral with the textbook techniques of Surface Integration.

    Unless the each vector field is specified explicitly in component form, I do not quite know how to proceed with the surface integral. Below I will convert ##\vec E_{LINE} = \left( \frac {\lambda} {2\pi\epsilon_0\|\vec r\|} \right)\hat r## into a form more workable with the standard surface integration techniques shown in my vector calculus texts. ##\vec E_{LINE} = \begin{bmatrix} \frac {\lambda*cos(\phi)} {2\pi\epsilon_0R} & \frac {\lambda*sin(\phi)} {2\pi\epsilon_0R} & 0 \end{bmatrix} ## If this form is correct, then correct evaluation of the surface integrals for all portions of the enclosing surface should yield the correct result.

    The Electric Field of a line of charge with uniform linear charge density ##\lambda##:
    ##\vec E_{LINE} = \left( \frac {\lambda} {2\pi\epsilon_0\|\vec r\|} \right)\hat r = \left( \frac {\lambda} {2\pi\epsilon_0} \right) \frac {\hat r} {\|\vec r\|}=\left( \frac {\lambda} {2\pi\epsilon_0} \right) \frac {1}{\|\vec r\|} \frac {\vec r} {\|\vec r\|}=\left( \frac {\lambda} {2\pi\epsilon_0} \right) \frac {\vec r} {\|\vec r\|^2} ##

    A radial position vector with radial distance R from the line:
    ## \vec r (R,\phi,z) = \begin{bmatrix} R*cos(\phi) & R*sin(\phi) & 0 \end{bmatrix}##

    with ##\|\vec r\|= {\sqrt{((R*cos(\phi))^2 + (R*sin(\phi))^2 + (0)^2}} = R##

    A radial unit vector:
    ##\hat r =\frac {\vec r} {\|\vec r\|} =\frac {1} {R}\begin{bmatrix} R*cos(\phi) & R*sin(\phi) & 0 \end{bmatrix}= \begin{bmatrix} cos(\phi) & sin(\phi) & 0 \end{bmatrix}##

    ##\frac {\hat r} {\|\vec r\|} = \frac {\vec r} {\|\vec r\|^2} =\frac {1} {R} \begin{bmatrix} cos(\phi) & sin(\phi) & 0 \end{bmatrix} = \begin{bmatrix} \frac {cos(\phi)} {R} & \frac {sin(\phi)} {R} & 0 \end{bmatrix} ##

    Electric Field of a Line (Putting it all together):
    ##\vec E_{LINE}(R,\phi,z) =\left( \frac {\lambda} {2\pi\epsilon_0} \right) \frac {\vec r} {\|\vec r\|^2} =\left( \frac {\lambda} {2\pi\epsilon_0} \right) \begin{bmatrix} \frac {cos(\phi)} {R} & \frac {sin(\phi)} {R} & 0 \end{bmatrix} = \begin{bmatrix} \frac {\lambda*cos(\phi)} {2\pi\epsilon_0R} & \frac {\lambda*sin(\phi)} {2\pi\epsilon_0R} & 0 \end{bmatrix} ##

    Now THIS up here ^^ is the format that I am accustomed to seeing Vector Fields given in my Vector Calculus texts for Surface Integrals!!!

    Setting up the Surface Integral(s):

    To find the total Electric flux over a cylinder, a surface integral must be set up for all surfaces of the cylinder: the top, bottom, and curved section

    ##\Phi_{total}= \Phi_{top} +\Phi_{bottom}+ \Phi_{curved}##

    ##\Phi_{total} = \oint_S \vec E \cdot \vec n\,d A = \iint_S \vec E \cdot \vec n_{top}\,dA + \iint_S \vec E \cdot \vec n_{bottom}\,dA+\iint_S \vec E \cdot \vec n_{curved}\,d A ##

    If each composite Surface is parameterized with a vector function ##\vec S(u,v)##, Vector Calculus texts demonstrate that we can evaluate the surface integrals as follows:

    ##\iint_S \vec E \cdot \vec ndA= \iint_S \vec E \cdot \left( \frac {\partial \vec S} {\partial u}\times \frac {\partial \vec S} {\partial v}\right) \,du\,dv##

    The cross product will produce a non-unity vector that's normal to each surface. Since each oriented surface can have two equal in magnitude, but opposite in direction normal vectors depending on which order the terms in the cross-product are taken (aka ##\vec a \times \vec b = -\vec b \times \vec a ## ), I will take each cross product such that the resulting normal vectors will all point outwards from the cylinder.

    The Top of the Cylinder:
    The top of the cylinder is the flat disc ##x^2 + y^2 \leq a^2## with radius = a, located at height z = h .
    ## \vec S_{top} = \begin {bmatrix} x & y & h\end{bmatrix} =\begin {bmatrix} R*cos(\phi) & R*sin(\phi) & h\end{bmatrix}## for ## 0 \leq R \leq a## and ##0 \leq \phi \leq 2\pi##
    ##\frac {\partial \vec S} {\partial R} = \begin {bmatrix} cos(\phi) & sin(\phi) & 0\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial \phi} = \begin {bmatrix} -R*sin(\phi) & R*cos(\phi) & 0\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial R}\times \frac {\partial \vec S} {\partial \phi}= \begin{bmatrix} 0 & 0 & R\end{bmatrix}##
    ##\vec E \cdot \left( \frac {\partial \vec S} {\partial R}\times \frac {\partial \vec S} {\partial \phi}\right) =\left( \frac {\lambda} {2\pi\epsilon_0} \right) \begin{bmatrix} \frac {cos(\phi)} {R} & \frac {sin(\phi)} {R} & 0 \end{bmatrix}\cdot \begin{bmatrix} 0 & 0 & R\end{bmatrix} = 0 + 0 + 0 = 0##

    ##\iint_S \vec E \cdot \left( \frac {\partial \vec S} {\partial R}\times \frac {\partial \vec S} {\partial \phi}\right) dR\,d\phi =\int_{0}^{2\pi} \int_{0}^a 0 \, dR \, d\phi = 0##

    The Bottom of the Cylinder:
    The top of the cylinder is the flat disc ##x^2 + y^2 \leq a^2## with radius = a, located at height z = 0 .
    ## \vec S_{bottom} = \begin {bmatrix} x & y & 0\end{bmatrix} =\begin {bmatrix} R*cos(\phi) & R*sin(\phi) & h\end{bmatrix}## for ## 0 \leq R \leq a## and ##0 \leq \phi \leq 2\pi##
    ##\frac {\partial \vec S} {\partial \phi} = \begin {bmatrix} -R*sin(\phi) & R*cos(\phi) & 0\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial R} = \begin {bmatrix} cos(\phi) & sin(\phi) & 0\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial R}= \begin{bmatrix} 0 & 0 & -R\end{bmatrix}##
    ##\vec E \cdot \left( \frac {\partial \vec S} {\partial R}\times \frac {\partial \vec S} {\partial \phi}\right) =\left( \frac {\lambda} {2\pi\epsilon_0} \right) \begin{bmatrix} \frac {cos(\phi)} {R} & \frac {sin(\phi)} {R} & 0 \end{bmatrix}\cdot \begin{bmatrix} 0 & 0 & -R\end{bmatrix} = 0 + 0 + 0 = 0##

    ##\iint_S \vec E \cdot \left( \frac {\partial \vec S} {\partial R}\times \frac {\partial \vec S} {\partial \phi}\right) dR\,d\phi =
    \int_{0}^{2\pi} \int_{0}^a 0 \, dR \, d\phi = 0##

    The Curved Section of the Cylinder:
    This is a TRUE cylinder with all points existing at distance, radius = a from the line.
    ## \vec S_{curved} = \begin {bmatrix} x & y & z\end{bmatrix} =\begin {bmatrix} a*cos(\phi) & a*sin(\phi) & z\end{bmatrix}## for ## 0 \leq z \leq h## and ##0 \leq \phi \leq 2\pi##

    ##\frac {\partial \vec S} {\partial \phi} = \begin {bmatrix} -a*sin(\phi) & a*cos(\phi) & 0\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial z} = \begin {bmatrix} 0 & 0 & 1\end{bmatrix}##
    ##\frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial z}= \begin{bmatrix} a*cos(\phi) & a*sin(\phi) & 0\end{bmatrix}##
    ##\vec E \cdot \left( \frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial z}\right) =\left( \frac {\lambda} {2\pi\epsilon_0} \right) \begin{bmatrix} \frac {cos(\phi)} {a} & \frac {sin(\phi)} {a} & 0 \end{bmatrix}\cdot \begin{bmatrix} a*cos(\phi) & a*sin(\phi) & 0\end{bmatrix}##
    ##\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,=\left( \frac {\lambda} {2\pi\epsilon_0} \right) \left(\frac {a*cos^2(\phi)}{a} +\frac {a*sin^2(\phi)}{a} +0 \right)##
    ##\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,=\left( \frac {\lambda} {2\pi\epsilon_0} \right) \left(cos^2(\phi) +sin^2(\phi) \right)##
    ##\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,=\left( \frac {\lambda} {2\pi\epsilon_0} \right) \left(1 \right)##
    ##\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,= \frac {\lambda} {2\pi\epsilon_0} ##

    ##\iint_S \vec E \cdot \left( \frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial z}\right) \, dz \, d\phi =
    \int_{0}^h \int_{0}^{2\pi} \frac {\lambda} {2\pi\epsilon_0} \, d\phi \, dz= \int_{0}^h \frac {\lambda} {2\pi\epsilon_0}\phi|_0^{2\pi}= \int_{0}^h \frac {2\pi\lambda} {2\pi\epsilon_0} \, dz=\frac{\lambda} {\epsilon_0}|_0^{h}=\frac{\lambda h} {\epsilon_0}

    The Final Result:
    ##\Phi_{total}= \Phi_{top} +\Phi_{bottom}+ \Phi_{curved} = 0 + 0 + \frac {\lambda h} {\epsilon_0} = \frac {\lambda h} {\epsilon_0}##
    Last edited: Mar 27, 2017
  9. Mar 27, 2017 #8


    User Avatar
    Homework Helper
    Gold Member

    Your work looks good except for a few typographical errors:

    If the radius of the top of the cylinder is ##a##, then shouldn't the ##R## be replaced by ##a## in the above? The same comment applies for the bottom of the cylinder.

    Again ##R## should be ##a##.
    One of the partial derivatives on the left side should be different.

    One of the patical derivatives on the left is incorrect.

    But these are just typos. Your formal method of solution looks correct.

    Of course a lot of people would say that you can easily "see" that ##\vec{E} \cdot \hat{n}## is zero on the top and bottom without the formal method that you used. Likewise for the curved side, one can see that ##\vec{E}## is parallel to ##\hat{n}## and so ##\vec{E} \cdot \hat{n} = E## at all points of the side. Since ##E## is constant over the curved side, you can pull ##E## out of the integral and just get ##EA## for the flux through the curved side, where ##A## is the area of the curved side.

    But it's nice to see how the formal approach works. It's a good exercise.
  10. Mar 27, 2017 #9
    TSny, I think you are the first person on this forum to have an appreciation of what is that I am doing and why I might go about the problem this seemingly overly-tedious way!

    I'll go ahead and make corrections. Some of this is from cutting and pasting LateX code, to similar sections. You are right about the radius. For the portions of the porblem where the distance from the line is allowed to vary, the variable should be R, be when referring to the outer boundary, the constant value a should be used instead of the variable R.

    I'm laughing at myself on this one though...
    ##\frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial \phi}= \begin{bmatrix} R*cos(\phi) & R*sin(\phi) & 0\end{bmatrix}##

    That would surely generate the ZERO VECTOR!!

    ##\frac {\partial \vec S} {\partial \phi}\times \frac {\partial \vec S} {\partial \phi}= \begin{bmatrix} 0 & 0 & 0\end{bmatrix}##

    I often have bad luck with attempting intuition with a new subject at first. I might do fine with the most trivial cases, but fail to reliably extend that intution to directly to more challenging problems. In the beginning, I usually have better results letting the formal structures take care of as much as my possibly faulty logic as possible. but, later come back and develop a feel for intuiting the results having developed the confidence ofgenerating multiple results,by a guaranteed reliable procedure.
    Last edited: Mar 27, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Connecting Vector Calculus to Maxwell's Equations
  1. Vector Calculus (Replies: 8)

  2. Maxwell's equations (Replies: 4)