Suppose I have a water heater, an insulated tank of water that when turned on heats water to a predefined higher than ambient temperature and keeps it at that temperature.
Suppose I don't need the water to be hot for an amount of time. How can I determine if it is more economic (i.e. consuming less energy) to turn off the heater or keep it on based on the amount of time?
My instinct says that it is always a good idea to turn the heater off no matter the amount of time it will be needed again. Let me explain.
The initial and terminal state of the whole system is identical in both scenarios: the water is hot. Therefore the amount of energy input must be equal to the amount of the energy lost (dissipated from the heater). The heat flow can be calculated via Newton's cooling law: $$\frac{\text{d}Q}{\text{d}t}=-uA\Delta T$$ Which is to say the heat loss is proportional to the temperature difference. If the heater is kept on, the heat flow will stay constant but if the heater is turned off the water temperature will drop and consequently the rate of energy loss will drop as well. This leads me to believe that over any amount of time the heater will lose (and therefore consume) less energy if turned off even if it temporarily consumes more power during the re-heating phase.
Am I making a mistake somewhere in my reasoning or am I correct? Are there other factors that I haven't taken into consideration that make it impractical to turn off a heater when not in use?