Question
Question: An infinitely long insulating cylinder of radius R has a volume charge density that varies with the ...
An infinitely long insulating cylinder of radius R has a volume charge density that varies with the radius as ρ=ρ0(a−br) where ρ0, a and b are positive constants and r is the distance from the axis of the cylinder. Use Gauss's Law to determine the magnitude of the electric field at radial distances (a) r<R (b) r>R

For r<R: E=6ϵ0bρ0r(3ab−2r). For r>R: E=6ϵ0brρ0R2(3ab−2R).
Solution
Due to cylindrical symmetry, we choose a coaxial Gaussian cylinder of radius r and length L. Gauss's Law is ∮E⋅dA=ϵ0Qenc. The electric flux is Φ=E⋅(2πrL). The volume charge density is ρ(r′)=ρ0(a−r′/b).
For r<R (inside): The enclosed charge is Qenc=∫0rρ(r′)(2πr′L)dr′=2πρ0L∫0r(ar′−br′2)dr′=2πρ0L(2ar2−3br3). Applying Gauss's Law: E⋅(2πrL)=ϵ02πρ0L(2ar2−3br3). Solving for E: E=ϵ0ρ0(2ar−3br2)=6ϵ0bρ0r(3ab−2r).
For r>R (outside): The enclosed charge is the total charge within the cylinder of radius R: Qenc=∫0Rρ(r′)(2πr′L)dr′=2πρ0L∫0R(ar′−br′2)dr′=2πρ0L(2aR2−3bR3). Applying Gauss's Law: E⋅(2πrL)=ϵ02πρ0L(2aR2−3bR3). Solving for E: E=ϵ0rρ0(2aR2−3bR3)=6ϵ0brρ0R2(3ab−2R).