None of the constant terms will result in a nonzero contribution to the flux, so we focus on the x-dependent term only. In Si units, we have
The face of the cube located at x = 0 (in the y-z plane) has area (and it 鈥渇aces鈥 the +i direction) and has a 鈥渃ontribution鈥 to the flux that is given using equation (1) such that,
The face of the cube located at x = -2m has the same area A (and this one 鈥渇aces鈥 the 鈥搃 direction) and a contribution to the flux that is given using equation (i) as:
Thus, the net flux is given by:
According to Gauss鈥 law, the net enclosed charge by the cube is given using equation (1) as:
Hence, the value of the charge is .