A charge q is placed at the centre of the open end of a cylindrical vessel as shown in figure. The flux of the electric field through the surface of the vessel is :
As the charge q is placed at the center of open end of vessel, so only charge q2 will remain inside the vessel.
Using Gauss's law, the electric flux through vessel surface is , ϕ=Qenclosedϵ0 where Qenclosed is the charge inside the vessel, i.e, Qenclosed=q2
thus, ϕ=q2ϵ0