Let V={ (x,y,z) x2+y2+z2≤a2,x≥0,y≥0, z≥0 }.

Then ∂V consists of
- the x=0 face { (x,y,z) y2+z2≤a2,x=0,y≥0, z≥0 }
with normal n^=−^,
- the y=0 face { (x,y,z) x2+z2≤a2,x≥0,y=0, z≥0 }
with normal n^=−^,
- the z=0 face { (x,y,z) x2+y2≤a2,x≥0,y≥0, z=0 }
with normal n^=−k^,
- and the first octant part of the sphere. Call it S.
Then
∭V∇⋅FdV=∭V[z+1+z−2z]dV=∭VdV=81 34πa3=61πa3∬facez=0F⋅(−k^)dxdy=∬facez=0(2x+02)dxdy=2∫0adrr∫0π/2dθ rcosθ=2∫0ar2dr=32a3∬facey=0F⋅(−^)dxdz=−∬facey=0(0+0z)dxdz=0∬facex=0F⋅(−^)dydz=∬facex=0−(y+0z)dydz=−∫0adrr∫0π/2dθ rsinθ=−∫0ar2dr=−3a3
By the divergence theorem
∬SF⋅n^dxdy=∭V∇⋅FdV−∬facex=0F⋅(−^)dydz−∬facey=0F⋅(−^)dxdz−∬facez=0F⋅(−k^)dxdy=[6π−31]a3