Raffealla said:
I think that time derivative of the energy of the oscillator is F times the derivative of q, which means it's the power of the external force.
Yes.
Raffealla said:
So it's like it is suggesting that F·q is the work done by external force, which makes no sense at all. As far as I concerned, the input energy has no relation with current displacement. What's the interpretation of the third term Fq?
I don't see a "physical" interpretation of ##F(t) q##. I agree that ##F(t) q## does not represent the work done on the oscillator by the external force ##F(t)##. Of course, ##F(t) q## is necessary so that ##F(t)## will appear as the driving force in the equations of motion.
Raffealla said:
And if my calculation is correct ,time derivative of Hamiltonian is the derivative of F times q.
Ok. But I get a negative sign ##\dot H = -\dot F q##.
Raffealla said:
Why is the H different from E? What does the H represent here?
For general dynamical systems, ##H## does not necessarily equal the energy of the system. There are systems for which ##L = T - V## but the Hamiltonian does not have the form ##H = T+V##. For example, this can occur if you have a velocity-dependent potential; i.e., ##V## is a function of both ##q## and ##\dot q##.
For this problem, you could write ##L = T-\widetilde{V}(q, t)##, where ## \widetilde{V}(q, t) \equiv V_{\rm osc}(q) + F(t)q = \frac 1 2 \omega^2 q^2 + F(t) q##. Here, ##\widetilde V## does not depend on the velocity ##\dot q## and so it's not surprising that we find ##H(p, q) = T + \widetilde V##. Here, ##T## is the kinetic energy expressed in terms of the momentum. (For this problem, the momentum and the velocity are the same: ##p = \dot q##.)
So, the Hamiltonian looks like it expresses some total energy. But it's not the total energy of the oscillator. Instead, ##H = E_{\rm osc} -F(t)q ##. I don't see a nice physical interpretation of the Hamiltonian in terms of energy for this problem.