Let ϕ ( x ) {\displaystyle {\mathbf {\phi } }({\mathbf {x} })} be a smooth (differentiable) scalar field on the three dimensional space and the vector field ∇ ϕ = [ ∂ ϕ ∂ x , ∂ ϕ ∂ y , ∂ ϕ ∂ z ] {\displaystyle \nabla {\mathbf {\phi } }=\left[{\frac {\partial \mathbf {\phi } }{\partial x}},{\frac {\partial \mathbf {\phi } }{\partial y}},{\frac {\partial \mathbf {\phi } }{\partial z}}\right]} is its gradient then the integral of the field gradient projection onto the unite length vector field m ( x ) {\displaystyle \mathbf {m} (\mathbf {x} )} always tangent to the curve and pointing continuously along the curve over the arbitrary 3-dimensional curve C {\displaystyle {\mathcal {C}}} with the start point A {\displaystyle \mathbf {A} } and the end point B {\displaystyle \mathbf {B} } equals only to the difference of the values of the field itself at those points or otherwise the along-line values of the field make virtually no contributions to the integral over the curve providing that the field is sufficiently smooth that its gradient exists along the curve i.e. ∫ C ∇ ϕ ⋅ d l = ϕ ( B ) − ϕ ( A ) {\displaystyle \int \limits _{\mathcal {C}}\nabla {\mathbf {\phi } }\cdot d\mathbf {l} =\phi (\mathbf {B} )-\phi (\mathbf {A} )} where d l = m d l {\displaystyle d\mathbf {l} =\mathbf {m} dl} and the A {\displaystyle \mathbf {A} } and B {\displaystyle \mathbf {B} } are the consecutive endpoints of C {\displaystyle {\mathcal {C}}} . #### Proof[edit | edit source] We can approximate the integral of the gradient over the curve by the finite sum by dividing densely the space around the curve C {\displaystyle {\mathcal {C}}} into small cubes with the edges d x = d y = d z {\displaystyle dx=dy=dz} and the corners [ x i , y j , z k ] {\displaystyle [x_{i},y_{j},z_{k}]} and approximating the curve C {\displaystyle {\mathcal {C}}} by the edges of those cubes which are the closet to the curve as well as the coordinate derivatives of the field ϕ {\displaystyle \phi } in the gradient by their difference quotients. We will keep the edges coordinate names for the convenience even if they are equal and keep the cube corners coordinate indices i , j , k {\displaystyle i,j,k} even if they are constrained by the closeness to the curve. We get ∫ C ∇ ϕ ⋅ d l = ∑ i , j , k sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x + sgn y ⁡ ( i , j , k ) [ ϕ ( x i , y j + 1 , z k ) − ϕ ( x i , y j , z k ) d y ] d y + sgn z ⁡ ( i , j , k ) [ ϕ ( x i , y j , z k + 1 ) − ϕ ( x i , y j , z k ) d z ] d z + {\displaystyle \int \limits _{\mathcal {C}}\nabla {\mathbf {\phi } }\cdot d\mathbf {l} =\sum _{i,j,k}\operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx+\operatorname {sgn} _{y}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j+1},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dy}}\right]dy+\operatorname {sgn} _{z}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j},z_{k+1})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dz}}\right]dz+} Θ ( d x ) + Θ ( d y ) + Θ ( d z ) , {\displaystyle \Theta (dx)+\Theta (dy)+\Theta (dz),} where sgn l ⁡ ( i , j , k ) {\displaystyle \operatorname {sgn} _{l}(i,j,k)} is the sign of the contribution depending if the integration over the edge of the cube is in the positive or the negative direction of the perpendicular coordinate. Note that while d x {\displaystyle dx} (and so analogically for d y {\displaystyle dy} and d y {\displaystyle dy} ) is an infinitesimal (small) element of the line parallel to the x {\displaystyle x} axis and for the unite vector n x = [ 1 , 0 , 0 ] {\displaystyle \mathbf {n} _{x}=[1,0,0]} parallel to it ± ∇ ϕ ⋅ n x = ± [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] {\displaystyle \pm \nabla {\mathbf {\phi } }\cdot \mathbf {n} _{x}=\pm \left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]} and each term if the sum is an approximate to the growth ∇ ϕ ⋅ d l {\displaystyle \nabla {\mathbf {\phi } }\cdot d{\mathbf {l} }} of the line integral ∫ C ∇ ϕ ⋅ d l {\displaystyle \int \limits _{\mathcal {C}}\nabla {\mathbf {\phi } }\cdot d{\mathbf {l} }} i.e. sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x = ∇ ϕ ⋅ d l + Θ ( d x ) {\displaystyle \operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx=\nabla {\mathbf {\phi } }\cdot d{\mathbf {l} }+\Theta (dx)} . Now the essential in proving the theorem is to focus on the various types of contributions to the finite sum approximating the gradient line integral from the ∇ ϕ {\displaystyle \nabla {\mathbf {\phi } }} field and notice that because of the cancelation of the sign alternating terms the sums reduce to only the end points difference. We simply have ∑ i , j , k sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x + sgn y ⁡ ( i , j , k ) [ ϕ ( x i , y j + 1 , z k ) − ϕ ( x i , y j , z k ) d y ] d y + sgn z ⁡ ( i , j , k ) [ ϕ ( x i , y j , z k + 1 ) − ϕ ( x i , y j , z k ) d z ] d z = {\displaystyle \sum _{i,j,k}\operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx+\operatorname {sgn} _{y}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j+1},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dy}}\right]dy+\operatorname {sgn} _{z}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j},z_{k+1})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dz}}\right]dz=} ϕ ( x n , y n , z n ) − ϕ ( x 1 , y 1 , z 1 ) {\displaystyle {\mathbf {\phi } }(x_{n},y_{n},z_{n})-{\mathbf {\phi } }(x_{1},y_{1},z_{1})} , where x n , y n , z n {\displaystyle x_{n},y_{n},z_{n}} and x 1 , y 1 , z 1 {\displaystyle x_{1},y_{1},z_{1}} , are the coordinates of the cubic lattice edges near the endpoints A {\displaystyle \mathbf {A} } and B {\displaystyle \mathbf {B} } of the approximate curve. To notice that one may consider three cases of the pieces of the approximate curve: 1) When the piece is the long line consisting of many segments with the length d x {\displaystyle dx} , (or d y {\displaystyle dy} , d z {\displaystyle dz} ). The sign-alternating terms cancel directly in the sum of difference quotients of the type ∑ i , j , k sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x {\displaystyle \sum _{i,j,k}\operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx} to the difference of the endpoint values which later cancel with joining contributions. 2) The piece is the 1-dimensional "stairs" embedded in one 2-dimensional plane of the width d x {\displaystyle dx} climbing up or down by d y {\displaystyle dy} (or similarly in two other planes of pairs of directions). In that case the terms differences in one direction cross-cancel to the end points to further cancel with joining contributions between the sum ∑ i , j , k sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x {\displaystyle \sum _{i,j,k}\operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx} and ∑ i , j , k sgn y ⁡ ( i , j , k ) [ ϕ ( x i , y j + 1 , z k ) − ϕ ( x i , y j , z k ) d y ] d y {\displaystyle \sum _{i,j,k}\operatorname {sgn} _{y}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j+1},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dy}}\right]dy} . 3) The 1-dimensional "stairs" are fully 3-dimensional and not in any plane i.e. d x {\displaystyle dx} , d y {\displaystyle dy} , d z {\displaystyle dz} coordinates increments are periodically sequential. In that case the full sum ∑ i , j , k sgn x ⁡ ( i , j , k ) [ ϕ ( x i + 1 , y j , z k ) − ϕ ( x i , y j , z k ) d x ] d x + sgn y ⁡ ( i , j , k ) [ ϕ ( x i , y j + 1 , z k ) − ϕ ( x i , y j , z k ) d y ] d y + sgn z ⁡ ( i , j , k ) [ ϕ ( x i , y j , z k + 1 ) − ϕ ( x i , y j , z k ) d z ] d z {\displaystyle \sum _{i,j,k}\operatorname {sgn} _{x}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i+1},y_{j},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dx}}\right]dx+\operatorname {sgn} _{y}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j+1},z_{k})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dy}}\right]dy+\operatorname {sgn} _{z}(i,j,k)\left[{\frac {{\mathbf {\phi } }(x_{i},y_{j},z_{k+1})-{\mathbf {\phi } }(x_{i},y_{j},z_{k})}{dz}}\right]dz} cancels to the endpoints because the shared values of the ϕ {\displaystyle \phi } at the "stairs" joining points enter the chain sum with the opposite signs. So summing up all the all the contributions over all of the possible approximate types of the curve pieces approximating fully the curve we get ∫ C ∇ ϕ ⋅ d l = ϕ ( x n , y n , z n ) − ϕ ( x 1 , y 1 , z 1 ) {\displaystyle \int \limits _{\mathcal {C}}\nabla {\mathbf {\phi } }\cdot d{\mathbf {l} }={\mathbf {\phi } }(x_{n},y_{n},z_{n})-{\mathbf {\phi } }(x_{1},y_{1},z_{1})} and so finally prove ∫ C ∇ ϕ ⋅ d l = ϕ ( B ) − ϕ ( A ) {\displaystyle \int \limits _{\mathcal {C}}\nabla {\mathbf {\phi } }\cdot d{\mathbf {l} }=\phi (\mathbf {B} )-\phi (\mathbf {A} )} .