# Net work performed on projectile

If a ball is thrown into the air, we may assume it has an initial positive kinetic energy $E_k$, and its gravitational potential energy $U_g$ is 0. Once it reaches its apex, $E_k=0$ and $U_g=E_k(initial)$. Thus, the net work $W_{net}= 0$, according to the work-energy principle,

$$W_{net}= \Delta U_g +\Delta E_k$$ However, the force of gravity performs work on the ball according to $$W = \int_{r_0}^{r} m\mathbf{g}\cdot d\mathbf{r}$$ Where is the work to balance out the work due to gravity?

Your energy equation is missing a subscript. It should be $$W_\mathrm{net, external} = \Delta K + \Delta U$$
If the system is the earth and the ball, then there is no external work. The work done by gravity is between two members of the system and is internal work. (In fact, the definition of potential energy is $\Delta U = -W_\mathrm{internal}$) In this case $$0 = \Delta K + \Delta U = \Delta K + mg\Delta y$$ On the other hand, if the system is only the ball, then gravity does external work on the system, but it comes in with a negative sign because the displacement is in the opposite direction from the force. Also, potential energy is not defined for a single particle. Potential energy is the energy associated with the configuration of two particle. It's just not defined for a single particle. So$$-mg\Delta y = \Delta K$$ Of course we get the same answer: nature doesn't care about how we set the boundary between a system and its environment.