Charge enclosed in cylinder question

1. Sep 12, 2011

PassThePi

1. The problem statement, all variables and given/known data
The electric field inside a circular cylinder of radius r = a and height z = h is given by: E = Az[(-c/h)+(b/6(epislon zero)*(3z^2 - h^2)
where c and b are constants. Assuming the medium within the cylinder is free-space, find the total charge enclosed within the cylinder.

2. Relevant equations
Qtot = int(int(D*ds)) = int(int(int(rho*dv)))
D = epsilon*E

3. The attempt at a solution
Surface integral of each side (1-top, 2-side, 3- bottom)
1 & 3 = 0
2 = h*pi*r^3

not sure what to do from here?

***Nevermind, I figured it out I think. I'll post the solution if anybody wants it.

Last edited: Sep 12, 2011
2. Sep 15, 2011

rude man

The direction of the E fierld is not given, making it impossible to answer the problem.