Change in temperature of overflowing container

This is an integation question, form a Physics context.

Mixing of identical fluids at different temperatures is simple, as per here:

https://physics.stackexchange.com/a/24433/290018

We have a slightly different situation in that the container is overflowing:

A container, with limited capacity, is filled with liquid, say water, at temperature $$\Theta$$. An additional amount of water, $$V_\text{in}$$ at temperature $$\Theta_\text{in}$$ is poured into the container. It mixes instantly and perfectly, and an identical volume overflows.

This situation can be modelled as (note specific heat capacity is assumed constant etc):

$$\Theta+d\Theta=\frac{\Theta\times\text{capacity}+\Theta_\text{in}\times dV_\text{in}}{\text{capacity}+dV_\text{in}}$$

This is very similar to the answer above but for an incremental (and infinitely small) volume dVin producing an incremental temperature change $$d Theta$$.

It is easy to numerically loop over the volume to be added in small increments and thus obtain the curve of $$\Theta$$ (the current temperature in container) as a function of $$V_\text{in}$$. This curve behaves sensibly and lends confidence to the model.

The question is: How to do this analytically?

i.e. How can we obtain a $$\Theta_\text{final}(V_\text{in})$$, ie the final temperature after $$V_\text{in}$$ amount of water is added/mixed/overflowed. It seems a definite integral from $$0$$ to $$V_\text{in}$$ is required, but the multiple $$dV_\text{in}$$'s are confusing the issue.

NB: Also posted on Physics Stackexchange, but really this an integration question:

https://physics.stackexchange.com/questions/616683/change-in-temperature-of-overflowing-container

New contributor
Oliver Schönrock is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.