When do volumes depend real-analytically on the parameters defining the regions? Suppose $f_1, \dots, f_n$ are real-valued real analytic functions defined on an open set $B=(0,1)^d$ of $\mathbb{R}^d$.
For $r \in \mathbb{R}$, let $S_r$ be the sub-level set in $B$ defined by the system of inequalities $$f_1(x) <r, \dots, f_n(x)<r,$$ and denote by $V(r)$ the volume of the set $S_r$. One generally cannot expect $V(r)$ to be a real analytic function of $r$; take, for instance, $B=(0,1)$ and $f_1(x)=x$.
It seems to me that if one somehow avoids "incoming" or "outgoing" conditions as $r$ varies, then $V(r)$ should depend real-analytically on $r$. Can such a statement be precisely formulated and proved, and is there a reference for it?
 A: In your setting, it seems that your function $V(r)$ depends too much on the shape of the domain $B$. Take for instance $B= \{0\leq y \leq h(x)\} \subset \mathbb R^2$ for a continuous but very wild positive function $h$ and $f_1(x,y) = x$. Then
$$V(r) = \int_0^r h(x) \mathrm d x$$
which is far from analytic.
So let me change the setting a little bit: assume $B$ is $[0,1]^n$ and the $f_i$ are analytic in a neighbourhood of $B$. Then it seems to me that $o$-minimality (an more precisely, the fact that $\mathbb R_{an}$ is an $o$-minimal structure) might give some answer to your question. I am not really familiar with this, but the argument would go along the following lines:
Fact 1:
The function
$$(x,r) \mapsto 1_{x\in B \textrm{ and }\forall i, f_i(x)<r}$$
is definable in $\mathbb R_{an}$.
I think this is ok, or I completely misunderstood the notion of definable function.
Guess 2:
If $g(x,r): \mathbb R^n \times \mathbb R \to \mathbb R$ is definable in $\mathbb R^{an}$, then
$$r\mapsto \int_{\mathbb R^{n}} g(x,r) \mathrm d x$$
is definable in $\mathbb R_{an}$. In particular, $r\mapsto V(r)$ is definable in $\mathbb R^{an}$.
I have no idea if this is true, but this probably has been considered before.
Guess 3:
$V:\mathbb R \to \mathbb R$ definable in $\mathbb R_{an}$ implies that $V$ is piecewise analytic.
Again, I'm not sure if this is true, but this is the kind of statement that $o$-minimality implies.
Perhaps someone with more knowledge on $o$-minimality can tell us if this is plausible?
