# If $f:M\times M\to\Bbb R$ is $C^\infty$ and $M$ a compact smooth manifold, is $\bar f(p)=\int_M f(p,q)dq$ smooth?

Let $$M$$ be a compact smooth manifold subset of some $$\Bbb R^n$$ and $$f:M\times M\to\Bbb R$$ a $$C^\infty$$ function.

I need to check wether $$\bar f(p)=\int_M f(p,q)dq$$ is smooth, but I have no clue where to start, or to come up with a contradiction. Thanks.

Let $$\phi: p_0 \in U \subset M \rightarrow \mathbb{R}^k$$ a chart.
Then $$g: (x,q) \in \mathbb{R}^k \times M \longmapsto f(\phi^{-1}(x),q)$$ is smooth.
Thus (with standard theorems) $$x \longmapsto \overline{g}(x)=\int_M{g(x,q)\,dq}$$ is smooth.
So $$\overline{f}(p)=\overline{g}(\phi(p))$$, which ends the proof.