I was experimenting with Newton's Law of Cooling lately, and I was wondering, how would one go about calculating heat loss to environment, while an object is being actively heated? Let's say I had a boiler, whose constant of cooling k I know. I measure the temperature at t=0 - it's equal to the ambient temperature (A). I then measure the temperature some time later (at time t), it's equal to T(t).
I know the mass of water, its specific heat, ambient temperature, final temperature, time passed, as well as the constant k. I'm trying to work out a concept so I'm completely disregarding radiated heat, air heating up etc.
I set up this differential equation, trying to find energy lost to environment:
dT/dt = m*c*dT/dt - k(T-A)
Where m*c*dT
could be rewritten as dQ.
But then I realized I messed up the units and I have no idea how to fix it (and I only know basic calculus).
Would appreciate some help.