# How to find the force of the compression at the core of a planet?

For example the core of the planet Jupiter, how to find out the magnitude of the force that compresses its core? and can that be thought of as the total force that holds the planet together?

Model the planet as an incompressible material with constant density $\rho$ and radial pressure $p(r)$ for $0\leq r\leq R$, where $R$ is the radius of the planet. The force per unit volume due to pressure is given by $$F_p=-\nabla p(r).$$
Meanwhile, the force per unit volume due to gravity at a depth $r$ is given by Newton's law: $$F_g=\frac{G\rho\left(\frac{4}{3}\pi r^3\rho\right)}{r^2}=\frac{4}{3} \pi G \rho ^2 r.$$ Setting $F_p=F_g$ and integrating to find $p(r)$ along with the condition $p(R)=0$ yields $$p(r)=\frac{2}{3} \pi G \rho ^2 \left(R^2-r^2\right).$$ Note that the pressure is actually highest at the core, and that as you travel towards the surface, it decreases quadratically to zero. The core pressure is $p(0)=\frac{2}{3}\pi G \rho ^2 R^2$.
For nonconstant $\rho$ the answer will be slightly different, but the concept is the same.