In the 10th grade, meaning few months back, I've studied the potential and Kinetic energy (I was ignorant about the importance of calculus), but When I learned calculus, and the Constant of integration which is the initial conditions in physics. I remembered that also in the expression of potential energy we have :
$$E_p=mgz+c$$
Where $c=0$ at $z_0$, this is the antiderivative of $mg$, obviously
$$\int mg dz=mgz+C$$
and that's the expression of the energy also in the Kinetic one :
$$E_{K}=\frac{1}2 mv^2$$
And when we differentiate it we get :
$$\frac{dE_K}{dv} =mv=p$$Where $p$ is the momentum.
My question is: How this operation 'Integration' can produce the 'Energy' expression?