# Gauss's Law applied to Gravational Flux

## Homework Statement

Gauss's Law states that the gravatational flux crossing a closed surface is -4piGM, where M is the mass inside the surface.

A Long straight cylinder has a radius R and is made of material of a constant density of p
Show that the gravatational field at a distance r from the axis of the cylinder is proportional to r, for r<R.

## Homework Equations

f.da = (closed integral) -4piGM

## The Attempt at a Solution

I enclosed the cylinder in a Gaussian surface

Mass Enclosed is pi(r)^2lp
f is constant therefore, f.da = f.2(pi)rl

So by gauss's law:

f.2(pi)rl = -4piG[pi(r)^2lp]

So f = -2G(pi)pr.

The problem is when i compare with people they get f = -G(pi)pr.

Is this correct? Either shows that f proportional to r. But the constant 2 is confusing me, should it be there or not?

Any help would be greatly appreciated