How to calculate total heat energy with fluctuating temperatures?

I had a question relating to a math problem that I'm doing. Let's say I have a heater that produces heat until it reaches a specific temperature, after which it turns off until it reaches a minimum value, and then it turns on again. I can model this by creating a simple sin curve equation, y= sin(x)+2. The x-axis of this graph is time (in minutes), and the y axis is temperature (in celsius). How can I calculate the total heat energy produced by the heater from time = 0 to time= 20? How can I calculate the energy efficiency of the heater? Thank you!

• What is your definition of the energy efficiency of the heater? – Chet Miller Apr 1 at 21:52
• @ChetMiller, I want a way to see if the amount of electrical energy put into the system is producing the maximum amount of energy that is possible. I'm not sure if that is possible, but that's what I want to find out. – Aarthi Muthukumar Apr 2 at 3:15
• To know the heat energy produced by the heater you need to know the voltage and current passing through the heater. Phase difference need also be accounted for but for resistive elements it is close to zero. – Deep Apr 2 at 4:39
• @Deep if I know the voltage to be 12V and the current to be 2 Amps, how would I go about calculating the total heat energy produced? – Aarthi Muthukumar Apr 2 at 18:41
• Try this. – Deep Apr 3 at 5:05