When would it be necessary to integrate to find the charge enclosed? Here is the problem with my teacher's solution. Like I see that we are having to integrate, but I am not understanding why.
Gauss Law Test Solution.pdf
Can someone explain when, and why, you would need to integrate to find the charge enclosed? Is it only for non-conducting spheres or can it be for other shapes as well?