Integral of a volume form and stokes theorem I currently have an expression of the following form:
$$\int_{\partial A} f(x) dH_{n-1}(x)$$
Where $A$ is an orientable Riemannian Manifold of dimension $n$, $H_{n-1}$ is the $(n-1)$-dimensional Hausdorff measure and $f:A\rightarrow\mathbb{R}$ is a $C^\infty$ function. I wish to use Generalized Stoke's theorem to convert the above into something of the form:
$$\int_{A} g(x) dM(x)$$
where $g$ is some function and $M$ is some function. I am still new to differential forms but from what I understand I can do something like the following:

By this question, I can replace the Hausdorff measure with the $n-1$ dimensional volume form, $\omega_{n-1}$ like so:
$$\int_{\partial A} f(x) dH_{n-1}(x)=\int_{\partial A} f(x) \omega_{n-1}(x)$$
I can then write out the product $f(x) \omega_{N-1}(x)$ as follows:
$$f(x)\omega_{N-1}(x)=\sum_{j=1}^{n}(-1)^{j-1}f(x)x_{j}dx_{1}\wedge\cdots\wedge \hat{dx_{j}}\wedge\cdots \wedge dx_{n}$$
where $x_j$ is the $j^{th}$ component of $x$ and $\hat{dx_{j}}$ represents that $\hat{dx_{j}}$ is neglected from the wedge. (I got the above expression from here).
If I differentiate this form I think I get the below:
$$d(f(x) \omega_{N-1}(x))= \sum_{i=1}^{n}\sum_{j=1}^{n}(-1)^{j-1}\frac{\partial [f(x)x_{j}]}{\partial x_i}dx_{i}\wedge dx_{1}\wedge\cdots\wedge \hat{dx_{j}}\wedge\cdots \wedge dx_{n}$$
$$= \sum_{j=1}^{n}(-1)^{j-1}\frac{\partial [f(x)x_{j}]}{\partial x_j}dx_{j}\wedge dx_{1}\wedge\cdots\wedge \hat{dx_{j}}\wedge\cdots \wedge dx_{n}$$
$$= \sum_{j=1}^{n}(-1)^{j-1}(-1)^{j-1}\frac{\partial [f(x)x_{j}]}{\partial x_j}dx_{1}\wedge\cdots \wedge dx_{n}$$
$$= \sum_{j=1}^{n}\bigg(f(x)\frac{\partial x_{j}}{\partial x_j}+\frac{\partial f(x)}{\partial x_j}x_{j}\bigg) dx_{1}\wedge\cdots \wedge dx_{n}$$
$$= \bigg(nf(x)+\sum_{j=1}^{n}\frac{\partial f(x)}{\partial x_j}x_{j}\bigg) dx_{1}\wedge\cdots \wedge dx_{n}$$
(assuming an $x_1,\cdots x_n$ are orthonormal).
$$= \bigg(nf(x)+\sum_{j=1}^{n}\frac{\partial f(x)}{\partial x_j}x_{j}\bigg) dx$$
where $dx$ is shorthand for $dx_{1}\wedge\cdots \wedge dx_{n}$. By applying the generalized Stoke's theorem I then get;
$$\int_{\partial A} f(x) \omega_{N-1}(x)=\int_{A} d(f(x) \omega_{N-1}(x))$$
$$=\int_{A} \bigg(nf(x)+\sum_{j=1}^{n}\frac{\partial f(x)}{\partial x_j}x_{j}\bigg) dx$$
So I have that $g(x)=\bigg(nf(x)+\sum_{j=1}^{n}\frac{\partial f(x)}{\partial x_j}x_{j}\bigg)$ and $M(x)=x$.

My question is this; is this approach correct to get the integral over $A$ I originally set out to obtain? The placement of $n$ in the final integral seems odd to me...
There are a lot of concepts in the above text that are still very new to me, and I am not sure that I am applying them correctly. I am still struggling with the differentiation and am unsure if my final expression is correct.
Can anyone verify my working and help if I have done this wrong?
 A: It turns out there are many possible choices of $g$ and $M$. Here's a way to construct one with $g=1$ using a partition of unity. For convenience, I'll use $n$ for the dimension of $\partial A$.
It suffices to find an $n$-form $\mu$ on $A$ such that $\mu|_{\partial A}=f\omega_{\partial A}$, where $\omega_{\partial_A}$ is the Riemann volume form on $\partial A$. Then, by Stokes' theorem, we then have $\int_Ad\mu=\int_{\partial A}\mu|_{\partial A}=\int_{\partial A}f\omega_{\partial A}$.
Let $x_\alpha=(x_\alpha^0,\cdots,x_\alpha^n):U_\alpha\to\mathbb{H}^{n+1}$ be a collection of oriented boundary charts indexed by $\alpha\in\mathbb{N}$ which covers $\partial A$, where
$$
\mathbb{H}^{n+1}=\{(x^0,\cdots,x^n)\in\mathbb{R}^{n+1}:x^0\ge 0\}
$$
is the half space. Note that $(x^1_\alpha,\cdots,x^n_\alpha):U_\alpha\cap\partial A\to\mathbb{R}^n$ are oriented charts on $\partial A$, which cover it. In these charts, $f\omega_{\partial A}$ has the following form:
$$
f\omega_{\partial A}=f\sqrt{\det g_{\partial A}}\ dx_\alpha^1\wedge\cdots\wedge dx_\alpha^n
$$
Here $g_{\partial A}$ denotes the matrix representation of the induced metric on $\partial A$. We can locally extend this form on each chart in the obvious way, defining forms $\mu_\alpha\in\Omega^n(U_\alpha)$ by
$$
\mu_\alpha(x_\alpha^0,\cdots,x_\alpha^n)=f(x_\alpha^1,\cdots,x_\alpha^n)\sqrt{\det g_{\partial A}(x_\alpha^1\cdots,x_\alpha^n)}\ dx_\alpha^1\wedge\cdots\wedge dx_\alpha^n
$$
Each of these is smooth, since $f$ and $g_{\partial A} $ depend smoothly on the last $n$ variables. Let $\{\psi_0,\psi_1,\psi_2\cdots\}$ be a partition of unity subordinate to the covering $\{A\setminus\partial A,U_1,U_2,\cdots\}$. We can define a global form $\mu$ by
$$
\mu=\sum_{\alpha=1}^\infty\psi_\alpha\mu_\alpha
$$
Which is well-defined and smooth on all of $A$, and satisfies $\mu|_{\partial A}=f\omega_{\partial A}$.
