Question
Use your expression for the F to define a potential energy for this combined F In practice, all springs have mass. We will use a for a spring with mass to calculate the kinetic energy of the spring itself. We know that the mass has a kinetic energy of MV^2/2. What about the spring? We will make two basic assumptions to form model that will allow us to find the kinetic energy of the spring. First assumption: The mass per unit length of the spring is uniform. If we assume the spring has a mass, M and a length, L then any section of the spring of length I would have its mass given by:
Explanation / Answer
Here as question mentioned the potential energy will be 1/2 kx^2 and net force will be -kx+mg.
Actually here I'm not getting what exactly you want to ask please let me know if you need any other information.