I've read from the shell theorem that an inverse-square potential has zero field inside a spherical shell. What about the field inside a cylinder? Are objects inside a long cylinder attracted to the center, or to the sides? Is there a simple analytic form for the field in a (possibly infinite) cylinder?
(Edit: To be more precise I think I should have said that electric charge is evenly distributed over the surface of the cylinder - I think this allows us to use the same result for a gravitational field as well as an electric field. I guess that's not a very realistic assumption for electrical applications, since charge tends to redistribute itself to create a constant potential (at least if the surface is conducting). Also, my original intention was to ask about an open-ended cylinder, but I think it doesn't matter so much if the cylinder is long.)