# How do you calculate potential energy given a force that is dependent on time?

The restoring force of a spring is F(x) = -k(x-x0)exp(-t/T) where k and T are constants, x is the position of a mass on the spring, and x0 is the position of equilibrium of the spring.

How do you find the potential energy of the mass-spring system?

How do you determine the amount of energy lost per time?

-

The potential energy should be defined at each time separately, because the physics of the situation is that the potential energy is changing with time explicitly, as energy is taken away by whatever is dissipating the spring. I am imagining a spring sublimating into vacuum. The potential energy at any time is:

$$exp(-t/T) {kx^2\over 2}$$

And you can use this in a Lagrangian to get the equation of motion. The Lagrangian is time dependent, so the energy is not conserved. To find the energy loss over a cycle, there are three regimes:

• If T is very big compared to the natural oscillation frequency, you are in the adiabatic regime. Here, the energy divided by the frequency, the action variable J, is constant. The frequency goes as the square root of k, so it's time dependence is $\omega(t) = \omega_0 exp(-t/2T)$. The energy is therefore $E=E_0 exp(-t/2T)$. You can perturb away from this for smaller T, to find the small change in the action variable J with time.
• If T is very small compared to the natural oscillation frequency, the potential energy vanishes away quickly, and you are left with only the kinetic energy. You can correct this for T less small by integrating the spring force over the distance to vanishing.
• In the intermediate regime, you will have very complicated dependence. If the force vanishes in about one period, you will sometimes have vanishing force after a turn, leaving a negative velocity, and for quicker vanishing, a positive velocity. So for certain intermediate T you will have vanishing velocity, and zero energy. There might be one or two such oscillations of the final energy before you reach the asymptotic adiabatic regime, it's complicated, and your best bet is to integrate it numerically.
-
If your force is explicitly time dependent, then the power (work per second) is given with a time-dependent expression:$W=F(t)v(t)dt$. Integrating this expression over all time gives you the total work $E=\int F(t)v(t)dt$. It does not mean you can introduce the corresponding potential difference $\Delta V$.