An electric field is uniform, and in the positive x . . .

Question : An electric field is uniform, and in the positive x direction for positive x and uniform with the same magnitude but in the negative x direction for negative x. It is given that 
E=-200 i N/C for x>0 and 
E=-200 i N/C for x<0. 

A right circular cylinder of length 20 cm and radius 5 cm has its centre at the origin and its axis along the x-axis so that one face is at x=+10 cm and the other is at x=-10 cm.
a) What is the net outward flux through each flat face?
b) What is the flux through the side of the cylinder?
c) What is the net outward flux through the cylinder?
d) What is the net charge inside the cylinder?



Doubt by Saif 

Solution : 
r = 5 cm = 0.05 m
E=-200 i N/C for x>0
E=-200 i N/C for x<0. 

a)  We know, 
ɸE=EAcosθ

Flux through Left Surface
ɸL=|E1||A|cosθ
ɸL=|-200|π(0.05)²cos0°
ɸL=200×3.14×0.0025
ɸL=200×0.0025
ɸL=1.57 Nm²/C
Similarly 
ɸR=1.57 Nm²/C 

Total Flux coming out through each flat surfaces is same  and it is equal to 1.57 Nm²/C.

b) The flux through the side of the cylinder is zero because Electric fields lines are perpendicular to area vector and hence θ=90°. Hence the electric flux will be zero.

c) Net outward flux through the cylinder = 1.57+1.57+0 = 3.14 Nm²/C

d) Using Gauss's theorem 

ɸnet = q/ε
q = ɸnet×ε
q = 3.14×8.85×10-12 
   = 2.78×10-11 C

Hence, charge inside the cylinder is equal to 2.78×10-11 C