This question is motivated by the following naive one: suppose we have a nice subset $X$ of some Euclidean space, say a polyhedron, and a nice $\mathbb{R}$-valued function $f$ on this subset, say a polynomial. Is it possible to deduce the value of the integral of $f$ along $X$ with respect to the Lebesgue measure from the integrals of $f$ along sets of arbitrarily small Hausdorff dimension? One way to make this precise is as follows.

Let $A_t,0< t\leq 1$ be the subset of $[0,1]$ obtained from $[0,1]$ by first removing the middle $1-t$ part, then removing the middle $1-t$ parts of the resulting two segments, then removing the middle $1-t$ parts of the resulting four segments and so on. (The middle $1-t$ part of a segment $[a,b]$ is the open interval of length $(1-t)(b-a)$ with center $\frac{b-a}{2}$.) Here are some remarks:

If $t=\frac{2}{3}$, then $A_t$ is the Cantor middle third set.

The Hausdorff dimension of $A_t$ is $\frac{\ln 2}{\ln 2-\ln t}$.

Now let $f:[0,1]\to\mathbb{R}$ be some ``nice'' function. Set $g(t)$ to be the average of $f$ over $A_t$. Recall that if $A$ is a compact metric space and $f:A\to\mathbb{R}$ is continuous, then the average of $f$ over $A$ is the limit as $i\to \infty$ of the averages of $f$ over $B_i$ where $(B_i)$ is a sequence of finite sets that converges to $A$ in the Hausdorff metric; recall also that the Hausdorff distance between two closed nonempty $A',A''\subset A$ is $$max(min_{a\in A'}dist (a,A''),min_{a\in A''}dist (a,A')).$$

Is it possible to explicitly compute $g(t)$, say when $f(x)=x^n$ with $n$ a non-negative integer? If not, what can one say about this function? Is it analytic in $t$? If so, does it extend analytically to $\mathbb{C}\setminus (-\infty,0]$?

[upd: I would also be happy with answers to the same questions for $f(x)=e^{nx}$ or $e^{inx}, n\in\mathbb{Z}$.]

5more comments