Joule's heating effect

Can we derive joule heating effect or heating of current using energy conservation for electrons when current is varying with time ?Like using concept of drift velocity,potential diffrence across resistor in which heat is produced,work done on charge,kinetic energy of charge and coming up with formula

H=∫i²rdt where terms has usual meaning

(note i want mathematical proof using basic theory)

• You must mean $$H=\int {R\cdot I^2\cdot \mathrm{d}t}$$ – Poutnik Jun 9 at 17:39
• Wasn’t Joule’s heating effect (original work) based on mechanical work? – Solar Mike Jun 9 at 17:45
• @Poutnik you are correct but please answer it – sarthak Jun 10 at 2:54
• It would be proving a definition, what is nonsense by principle. By definition, a charge q, passing potential difference U, releases energy q.U., If that release depend on the way, potential would not be exact potential with the round integrall of dU=0. One could then create a perpetuum mobile. – Poutnik Jun 10 at 7:26
• P.S. Unless there is kinetic energy change,of course. – Poutnik Jun 10 at 7:58