Skip to Content

Calculate the area ABOVE a curve

I have a recording of stomach temperature of seals over time. Every food intake show a quick drop in the stomach temperature followed by a slow recovery up to the prefeeding temperature. For each of these food intakes (hundreds), I determined the prefeding point A(timeA, temperatureA) and the point where the temperature was recovered C(timeC, temperatureC).

One of the caracteristics of these temperature drops is the area ABOVE the curve, so I want to find a way to write a code to calculate this for all the temperature drops for which I have found the point A and the point C.

Also, the temperature recovered is not always the same as the previous one, so it varies. For example, sometimes the prefeeding temperature can be 37.8, while the recovery temperature is 38.0.

Here is an example of the area above the curve I would like to calculate.

Thank you!