# Stuck at the derivation of divergence in Cartesian coordinates.

I'll get to the point immediately. The definition of divergence in a point (from my textbook): $$div \bar{E} = \lim_{V \to 0} \frac{1}{V}\oint_S \bar{E}.d\bar{S}$$ (it's a surface integral)

Context (contains a figure): to show what divergence looks like in Cartesian coordinates for the vector field E, we will work with an infinitesimal volume with dimensions ∆$x$ x ∆$y$ x ∆$z$. (A cuboid or w/e) We will shrink this volume to a point ($x,y,z$). The surface integral is spread over the 6 surfaces Ⅰ,..., Ⅵ. 'Ⅰ' means the integral over the Ⅰ-side. The next part is where the problems begin.

Lets focus on sides Ⅰ and Ⅱ. (Left and right on the drawing). For a limit where ∆x, ∆y and ∆z approach 0, the integral over 'Ⅰ' approaches E$x$($x$+∆$x$,$y$,$z$)∆$y$∆$z$ and the integral over 'Ⅱ' approaches - E$x$($x$,$y$,$z$)∆$y$∆$z$.

That's what I don't understand. How do you get there? I assume it is by applying the definition. If anyone can help me understand that part, that would be awesome. The goals is that, when you apply the same logic to all sides, you get the expression: $$div \bar{E} = \frac{\partial E_{x}}{\partial x}+\frac{\partial E_{y}}{\partial y}+\frac{\partial E_{z}}{\partial z}$$

I'm confident that once I understand that, I'll be able to figure out the rest. The 'div EⅠ+Ⅱ = ...' part is just applying the formal definition of a derivative.

• When $\Delta y, \Delta z$ are sufficiently small, $E_x$ varies little over the face and can be approximated by a constant. So the integral is approximately that constant value times the area. Commented Aug 21, 2015 at 23:56
• @PaulSinclair That constant would then be the $E_{x}(x+\Delta x,y,z)$? Commented Aug 22, 2015 at 0:00
• The constant would be the value of $E_x$ at a useful point on the surface in question. For side I, $(x+\Delta x,y,z)$ lies on it. For II, $(x,y,z)$ lies on it. Commented Aug 22, 2015 at 0:07
• I think I understand it now. Thanks! Commented Aug 22, 2015 at 0:11

A rigorous way would be to Taylor expand $E$ on each of the faces. Example for faces I and II:

$$\int_I E(x', y', z') \cdot dS' = E_x (x, y, z) \, \Delta y \, \Delta z + \partial_x E_x |_{x,y,z} \Delta x \, \Delta y \, \Delta z + \text{higher order terms}$$

and

$$\int_{II} E(x', y', z') \cdot dS' = -E_x (x, y, z) \, \Delta y \, \Delta z + \text{higher order terms}$$

When you add these contributions together, the terms proportional to $\Delta y \Delta z$ exactly cancel, the terms proportional to $\Delta x \, \Delta y \, \Delta z$ contribute terms of $O(1)$ to the limit you need to take, and everything of higher order goes to zero in the limit. (Exercise: compute some of these higher order terms to convince yourself this is the case.)

Repeat this process for the other faces, and you're done.

• I have no idea how you got to your Taylor expansion. Here's my attempt. Taylor expansion: $$f(x',y',z') = f(x,y,z) + (x'-x)f_{x'}(x,y,z) + (y'-y)f_{y'}(x,y,z) + (z'-z)f_{z'}(x,y,z) + ...$$ For the first term, I assume that we put (x,y,z) in E(x',y',z') which gives us E(x,y,z), a constant c. The first term would then be: $$\int cdS = cS = c\Delta y \Delta z = E(x,y,z)\Delta y \Delta z$$ The second term. I assume the $\partial_x E = E_x$ from OP? $\Delta y, \Delta z$ come from S. $\Delta x$ should come from (x'-x), right? It feels like I got it after writing it out like this. Commented Aug 22, 2015 at 12:45
• Yes, though I will have to correct it all to use $E_x$, as the surface integrals should result in scalars. Commented Aug 22, 2015 at 12:52
• I'm still stuck. The first term works fine, but the second one is still problematic. How am I supposed to take $\frac{\partial \int E(x',y',z')}{\partial x}$? I don't see how I can get $\Delta y$ and $\Delta z$ out of it. Sorry for the trouble. Commented Aug 22, 2015 at 14:14
• You should Taylor expand first and then integrate. Commented Aug 22, 2015 at 14:17
• So like this? $$E(x',y',z') = E(x,y,z) + (x'-x)\partial_x E |_{x,y,z} + ...$$ $$\int E(x',y',z') dS = \int E(x,y,z) dS + \int E_x(x,y,z) \Delta x dS +....$$ And both $E(x,y,z)$ and $E_x (x,y,z) \Delta x$ are constants, which makes integrating easier, and gives us $\Delta y$ and $\Delta z$. Commented Aug 22, 2015 at 14:31