$f(t,x,y)$ is a solution from NDSolve, in a domain $\mathcal{D}$.

If $f(t,x,y)$ was an analytical func I would

$$\overline{f(t)}=\frac{ \int _{\mathcal{D}} f(t,x,y) dx dy}{\mathcal{D}}$$

Since $f(t,x,y)$ is number for each x point, how can one compute its average value in the domain for a certain $t=t'$? It is basically taking the mean of $f(t',x,y)$ in the domain but I couldn't figure out how to do it.

The question might be too simple or trivial to answer, but googled it and look around here and couldn't find any clue on how. Maybe I don't know the correct keywords etc.

  • 3
    $\begingroup$ You can use NIntegrate to perform the integral and RegionMeasure to compute the surface area of your integration region. $\endgroup$ Dec 29, 2020 at 11:45

1 Answer 1


You need first to define your region; call it reg. Then, f[t', x, y] for a fixed t' is simply a function of x and y. To get the mean, you may either use Integrate or NIntegrate:

Integrate[f[x, y] , {x, y} ∈ reg]  / Integrate[1 , {x, y} ∈ reg]

Not the answer you're looking for? Browse other questions tagged or ask your own question.