TITLE: When to use integral?
QUESTION [5 upvotes]: I have a question concerning when to use integral and what is the difference between two formulations, one with integral and another one without. I have formulated a simple example:
Let's assume we have m = 1 kg of water that is heated. And because of this, there is some vapor forming. Now let's say that the fraction of vapor ($\theta$) takes values from 0 to 1 and has the profile shown below:

Now it comes. For calculating the mass of the vapor ($m_{vapor}$), there are two formulations in my mind:

$m_{vapor} = m \cdot \theta(t)$
$m_{vapor} = m \cdot \int_t \theta (t) dt$

But the problem is that I don't know why would I use one over another and here is where I need help. Can anyone please help me to understand why would one use the integral formulation and why not? What makes them different? 
I have serious problems understanding the function of the integral, other than the fact that it represents the area under a curve. But when to use it? I would highly appreciate if anyone can explain it to me in detail.
Thank you in advance!

REPLY [11 votes]: You can't tell whether to use an integral just by looking at
the graph of $\theta(t)$.
Whether or not to use an integeral depends on two things:

What does the formula mean?
What is the answer you need?

In this case, you were told $\theta(t)$ is the fraction of vapor as a mass
$m$ of water is heated.
I take this to be the following definition of $\theta(t)$:
$$
\theta(t) = \frac{m_\mathrm{vapor}(t)}{m}.
$$
From this, simple algebra tells us immediately that
$m_\mathrm{vapor}(t) = m \cdot \theta(t).$
Therefore no integral is necessary.
If instead of the fraction of vapor, you had some measurement of the rate at which the water was being turned into vapor, then you could use an integral
to determine how much water was turned to vapor between two times.
The two times could be "before any water was vaporized"
and "now", if that's appropriate to what is being asked.