How would you solve this triple integral? I was given to find the total charge inside a cube, side equal $a$ with one corner at the origin, produced by this charge distribution:
$$\rho=\frac{\epsilon_0E_0xyz}{a^4}\exp\left(\frac{-(x+y+z)}{a}\right) \left(6-\frac{x+y+z}{a}\right).$$
Then the total charge inside the cube is:
$$Q=\frac{\epsilon_0E_0}{a^4}\int_0^a\int_0^a\int_0^a xyz\exp\left(  \frac{-(x+y+z)}{a}\right) \left(6-\frac{x+y+z}{a}\right)dxdydz.$$
Can you help please figure out this integral.Thanks.

Changing variable to $(x,y,z) = (au,av,aw)$, one has
$$\begin{align}\mathcal{I}
&\stackrel{def}{=}\iiint_{[0,a]^3} xyz \exp(-\frac{x+y+z}{a})(6-\frac{x+y+z}{a})dxdydz\\
&= a^6 \iiint_{[0,1]^3} uvw e^{-(u+v+w)}(6 - (u+v+w)) dudvdw
\end{align}
$$
Expand the integrand as linear combination of monomials in $u,v,w$ multiplied
by $e^{-(u+v+w)}$ and then split the integrals, one can rewrite above as
$$\frac{\mathcal{I}}{a^6} = 6P_1^3 - 3P_1^2P_2 = 3P_1^2(2P_1 - P_2)
\quad\text{ where }\quad
P_m = \int_0^1 t^m e^{-t} dt
$$
Using an CAS or just integrate by hand, one find
$$\left\{
\begin{align}
P_1 &= 1-2e^{-1}\\P_2 &= 2 - 5e^{-1}
\end{align}\right.
\quad\implies\quad
Q = (\epsilon_0 E_0 a^2)\frac{\mathcal{I}}{a^6} = (3\epsilon_0 E_0 a^2) e^{-1}(1-2e^{-1})^2
$$
