How dense would planet earth have to be to have the same gravity as Jupiter? I was reading this question about how small could a planet be while having earth-like gravitational pull. 

This got me thinking, how dense would planet Earth have to be to have the same gravitational pull as Jupiter while all the other factors staying the same (even if it is impossible in the real world)?

If there are any formulas could you please explain them so I understand them please?

Edit

Sorry about some of the confusion but I meant keeping everything but the mass the same.
There are at least two interpretations to this problem:

Per Wikipedia, Jupiter's surface gravity is $2.528$ times Earth's. Thus, 
if the Earth were $2.528$ times denser, it would have the same surface 
gravity as Jupiter. The Earth's current density is $5.514$ grams per 
cubic centimeter, so the new density would be $2.528 \times 5.514$, or about 
$13.9394$ grams per cubic centimeter. This assumes we change Earth's mass, but not its radius.

@Rob_Jeffries answer assumes the Earth's mass remains constant and the radius changes. If the radius shrinks by a factor of $2$, the volume decreases by a factor of $8$, and the planet becomes 8 times more dense. The surface gravity increases by $4$, since it depends on the radius squared. In general, shrinking the planet's radius by $x$ will increase the density by $x^3$ and the gravity by $x^2$. If we want the gravity $2.528$ times higher, we choose $x = \sqrt{2.528}$ or right around $1.590$. This makes $x^3$ equal to about $4.019$. Multiplying that by Earth's current density of $5.514$, we get $22.16$ grams per cubic centimeter, pretty close to what Rob got.

So, you can't really change the density without changing anything else: either the mass or the volume must change.