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!

Showing Divergence Theorem Equivalence

  1. Mar 26, 2014 #1
    1. The problem statement, all variables and given/known data
    The problem states that a cube encloses charge. This cube is given in three space by <0,0,0> and <a,a,a>. The electric field is given by:
    [itex]\hat{E}=\frac{4e}{a^{2}e_{0}}[\frac{xy}{a^{2}}\hat{i}+\frac{(y-x)}{a}\hat{j}+\frac{xyz}{a^{2}}\hat{k}][/itex]. I am to find the total charge enclosed using both methods or "sides" of the divergence theorem equivalence.

    2. Relevant equations
    [itex]\displaystyle \iiint \limits_U \left({\nabla \cdot \mathbf F} \right) d V = \iint \limits_{\partial U} \mathbf F \cdot \mathbf n \ d S[/itex]
    [itex]\nabla=\frac{\partial}{\partial x}\hat{i}+\frac{\partial}{\partial y}\hat{j}+\frac{\partial}{\partial z}\hat{k}[/itex]

    3. The attempt at a solution

    The first half worked out fine and makes sense, so I think this part is right. Do note; I do get a bit sloppy with notation; this is a rough draft:
    [itex]\int_{0}^{a}\int_{0}^{a}\int_{0}^{a}\nabla\bullet EdV[/itex]

    which makes sense, as there are 3 faces in which flux can go by?

    However, the surface integral is a mess:
    when z=a ; Sz(surface raised from xy by a)=a
    [itex]\int\int\hat{F}\bullet\hat{dS}=\int\int F\bullet-kdxdy
    =-\int_{0}^{a}\frac{xyz}{a^{2}}dxdy=-z\int_{0}^{a}\frac{xy}{a^{2}}dxdy=-\int\frac{x^{2}y}{2a^{2}}dy=\frac{-x^{2}z}{2a^{2}}\int ydy=\frac{-x^{2}zy^{2}}{4a^{2}}=-\frac{a^{3}}{4}
    [itex]\int\int\hat{F}\bullet\hat{dS}=\int\int F\bullet jdxdy
    =\frac{1}{a}\int_{0}^{a}(y-x)dxdz=\frac{1}{a}\int yx-\frac{x^{2}}{2}dz=yxz-\frac{x^{2}z}{2}=a^{2}-\frac{a^{2}}{2}
    [itex]\int\int\hat{F}\bullet\hat{dS}=\int\int F\bullet idydz
    \frac{xy}{a^{2}}dydz=\frac{x}{a^{2}}\int ydydz=\int\frac{xy^{2}}{2}dz=\frac{xy^{2}z}{a^{2}}=\frac{a^{2}}{2}
    And the total:

    which I know is wrong because the flux is zero at a=4.

    Where am I going wrong? I haven't done surface/volume integrals in about 4-5 years, so bear with me. I'm trying to relearn through Boas.
  2. jcsd
  3. Mar 27, 2014 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Your normal is pointing in the wrong direction. It should point outward from the volume, so on the z=a face, it should point in the ##+\hat{k}## direction.

    You need to calculate the flux through all six faces and sum them.

    Also, your expression for ##\vec{E}## looks wrong. Should the z-component be ##xyz/a^3## rather than ##xyz/a^2##? It doesn't work out dimensionally otherwise.

    Finally, I got a different result for the integral of the divergence, so you probably made an error integrating somewhere. Your setup looked fine.
  4. Mar 27, 2014 #3

    Thankx, it was a cubed!

    I actually made a mistake in the addition; it should be:
    I'm a bit lost with the surface integral.
    Last edited: Mar 27, 2014
  5. Mar 27, 2014 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I'm not sure what you mean by three flux possibilities, but the integral should evaluate to ##\frac{7 e}{\epsilon_0}##.

    There's no volume involved in doing the surface integrals. I'm not sure what you're getting at.
  6. Mar 27, 2014 #5
    Sorry, I edited it before seeing your response. I'm getting 7/4ths. I'll try it again. thank you.
  7. Mar 28, 2014 #6
    Right Answer

    Yes, same answer youu got, forgot the constant coeff. I should do this much more neatly in lyx; the whole issue was adding improperly there.

    Ok, so I finally got it done:

    And by the surface integral:
    [itex]First at x=0 (the yz axis)

    \int\int F\bullet-idydx=0

    \int\int F\bullet idydx=\frac{x}{a^{2}}\int\int ydydz=\frac{y^{2}zx}{2a^{2}}=\frac{a^{4}}{2a^{2}}=\frac{a^{2}}{2}
    [itex]at y=0

    \int\int F\bullet-jdxdz=\frac{1}{a}\int\int xdxdy=\frac{x^{2}z}{2a}=\frac{a^{2}}{2}
    This is where I went wrong; I automatically assumed this plane to be of zero when there was a y-x term not y-xy term or so.
    [itex]at y = a

    \int\int F\bullet jdxdz=\frac{1}{a}\int(y-x)dxdz=yxz-\frac{x^{2}z}{2}=\frac{a^{3}-\frac{a^{3}}{2}}{a}=a^{2}-\frac{a^{2}}{2}
    [itex]at z = 0

    \int\int F\bullet-kdxdz=0
    [itex]at z=a

    \int\int F\bullet kdxdz=\frac{z}{a^{3}}\int xydxdy=\frac{x^{2}y^{2}z}{4a^{3}}=\frac{a^{5}}{4a^{3}}=\frac{a^{2}}{4}


    Thank you!

    Aside: On a side note, I'm using lyx. I'm actually a MSCS student; I just want to work on scientific computation. Is there a real urgency in learning LaTex itself outside of WYSIG?
    Last edited: Mar 28, 2014
  8. Mar 28, 2014 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Good work!

    I don't know if there's an urgency to learn LaTeX for your field, but it's not very hard to get decent at it.
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: Showing Divergence Theorem Equivalence
  1. Divergence theorem (Replies: 3)