Static Fields: Fall-2026
HW 02 Practice (SOLUTION): Due W1 D5: Math Bits

  1. Cube Charge
    1. Charge is distributed throughout the volume of a dielectric cube with charge density \(\rho=\beta z^2\), where \(z\) is the height from the bottom of the cube, and where each side of the cube has length \(L\). What is the total charge inside the cube? Do this problem in two ways as both a single integral and as a triple integral.

      The charge density inside the cube is \(\rho=\beta z^2\).

      The total charge is given by chopping the cube into infinitesimal cubical volumes \(d\tau=dx\, dy\, dz\). The charge on each piece is given by \(dq=\rho\, d\tau\) and the total charge is obtained by adding (integrating) the infinitesimal charges over the whole volume of the box.

      \begin{align} Q_{\hbox{total}}&=\int_0^L\int_0^L\int_0^L \beta z^2\, dx\, dy\, dz\\ &=\beta\left(\int_0^L dx\right)\left(\int_0^L dy\right) \left(\int_0^L z^2\, dz\right)\\ &=\beta\, (L)^2(\frac{z^3}{3})\Big\vert_0^L\\ &=\beta\, \frac{L^5}{3} \end{align}

      Rather than chopping the cube into infinitesimal cubical volumes, we could chop the cube into infinitesimally thin square slabs (parallel to the \(x-y\) plane) \(d\tau=L^2dz\). The charge on each slab is given by \(dq=\rho d\tau=\beta z^2L^2dz\). The total charge is obtained by adding (integrating) the infinitesimal charges over the whole volume of the box.

      \begin{align} Q_{\hbox{total}}&=\int_0^L L^2 \beta z^2\, dz\\ &=\beta L^2 \left(\int_0^L z^2\, dz\right)\\ &=\beta\, (L)^2(\frac{z^3}{3})\Big\vert_0^L\\ &=\beta\, \frac{L^5}{3} \end{align}

      Sense-making: The dimensions work out, as long as you remember that \(\beta\) has dimensions of C/m\(^5\). It's also valuable to note that the three integrals can be done independently of one another, which is not always true, but is often true (whenever the region of integration doesn't depend on one of the coordinates).

    2. On a different cube: Charge is distributed on the surface of a cube with charge density \(\sigma=\alpha z\) where \(z\) is the height from the bottom of the cube, and where each side of the cube has length \(L\). What is the total charge on the cube? Don't forget about the top and bottom of the cube.

      The charge density on the bottom of the cube is \(\sigma=\alpha z\) where \(z=0\). Therefore, there is no charge on the bottom of the cube.

      The charge density on the top of the cube is \(\sigma=\alpha z\) where \(z=L\). Since the charge density is constant on the top of the cube, we can simply multiply the charge density times the area. The contribution of the top of the cube to the total charge is therefore \begin{equation} Q_{\hbox{top}}=\alpha\, L \times L^2=\alpha\, L^3 \end{equation}

      The charge density on the sides of the cube is not constant, therefore we must integrate. The contribution from each of the four sides is the same, so we will calculate the contribution from one side and multiply by four. \begin{align} Q_{\hbox{sides}}&=4\int_0^L\int_0^L \alpha z\, dx\, dz\\ &=4\alpha\left(\int_0^L dx\right)\left(\int_0^L z\, dz\right)\\ &=4\alpha\, (L)(\frac{L^2}{2})\\ &=2\alpha\, L^3 \end{align}

      The total charge is therefore: \begin{equation} Q_{\hbox{total}}=\alpha\, L^3+2\alpha\, L^3=3\alpha\, L^3 \end{equation}

      Sense-making: Well, our dimensions work out again (note that \(\alpha\) does not have the same dimensions as \(\beta\) above).

      Notice again that in the second line, because the integrand depends on only one variable, the double integral breaks up into separate integrals over \(x\) and \(z\).

      Another way to make sense of a problem like this one would be to think about how things would change if we started with different initial conditions. For example, how would the solution of this problem have been different if the charge density had been \(\sigma = \beta xyz\)?

  2. Use What You Know on the Helix
    1. Evaluate \(\vec{dr}\) along the helical path \(z=7\phi\).
      Assume \(s=s_0=\) constant \(\Rightarrow ds=0\), so we are on the surface of a cylinder. \begin{align} z=7\phi&\Rightarrow dz=7\, d\phi\\ d\vec{r}&=ds\,\hat{s}+s\, d\phi\,\hat{\phi}+dz\,\hat{z}\\ &=s_0\, d\phi\,\hat{\phi}+dz\,\hat{z}\\ &=s_0\, d\phi\,\hat{\phi}+7\, d\phi\,\hat{z}\\ &=\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi \end{align}
    2. Evaluate \(\vert d\vec{r}\vert\) along the helical path \(z=7\phi\).
      \begin{align} \vert d\vec{r}\vert&=\sqrt{\vert d\vec{r}\vert\cdot\vert d\vec{r}\vert}\\ &=\sqrt{\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi \cdot\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi}\\ &=\sqrt{(s_0^2+49)(d\phi)^2}\\ &=\sqrt{(s_0^2+49)}\vert d\phi\vert \end{align}
  3. Memorize Power Series

    Look up and memorize the power series to fourth order for \(e^z\), \(\sin z\), \(\cos z\), \((1+z)^p\) and \(\ln(1+z)\). For what values of \(z\) do these series converge?

    To fourth order means keep terms through the fourth power: \begin{align*} e^z&\approx 1+z+\frac{z^2}{2!}+\frac{z^3}{3!}+\frac{z^4}{4!} &\forall z\\ \sin{z}&\approx z-\frac{z^3}{3!} &\forall z\\ \cos{z} &\approx 1-\frac{z^2}{2!}+\frac{z^4}{4!} &\forall z\\ (1+z)^p &\approx 1 + pz + \frac{p(p-1)}{2!}\, z^2 + \frac{p(p-1)(p-2)}{3!}\, z^3 + \frac{p(p-1)(p-2)(p-3)}{4!}\, z^4 &\vert z\vert <1\\ \ln(1+z) &\approx z -\frac{z^2}{2} + \frac{z^3}{3}-\frac{z^4}{4} &\vert z\vert <1 \end{align*}