Let \(\hat{K}\) and \(K\) be two open set of \(\mathbb{R}^d\). Let \(\varphi\) be a \({\cal C}^1\)-diffeomorphism from \(\hat{K}\) to \(K\), i.e. a bijection of class \({\cal C}^1\) whose reciprocal is also of class \({\cal C}^1\). Denote \((e_1,\ldots,e_d)\) the canonical basis of \(\mathbb{R}^d\).
\[\varphi : \hat{x}=\sum_{i=1}^d \hat{x}_i \, e_i \; \longrightarrow \; \varphi(\hat{x}) = \sum_{i=1}^d \varphi_i(\hat{x}_1,\ldots,\hat{x}_d) \, e_i\]
The jacobian matrix of \(\varphi\) at a point \(\hat{x}\), denote \(J_\varphi(\hat{x})\) is the matrix of size \(d\times d\) such that its entries read:
\[\left( J_\varphi(\hat{x}) \right)_{ij} = \frac{\partial \varphi_i}{\partial \hat{x}_j}(\hat{x}_1,\ldots,\hat{x}_d) \qquad 1\le i,j \le d\]
We have the following formula for the change of variable to compute an integral over \(K\) as an integral over \(\hat{K}\)
\[\int_K u(x)\; dx = \int_{\hat{K}} u(\varphi(\hat{x}))\; \left| \mathrm{det} J_\varphi(\hat{x}) \right| \; d\hat{x}\]
|
In the finite element method we have often to compute integrals using change of variables of the type
\(\int_K Hu(x)\; dx\), where \(H\) is an operator (gradient, laplacian, …). You then have to use to be careful when applying the change of variables.
|
\[\begin{eqnarray*}
\int_K (\nabla u(x))^2\; dx & = & \int_K \left[ \left(\frac{\partial u(x,y)}{\partial x} \right)^2 + \left(\frac{\partial u(x,y)}{\partial y} \right)^2 \right]\; dx\; dy \\
& = & \int_{\hat{K}} \left[ \left(\frac{\partial u(F(\hat{x},\hat{y}))}{\partial x} \right)^2 +
\left(\frac{\partial u(F(\hat{x},\hat{y}))}{\partial y} \right)^2 \right] \left| \hbox{det} J_F(\hat{x}) \right| \; \; d\hat{x}\, d\hat{y}\\
& = & \int_{\hat{K}} \left[ \left(\frac{\partial u(F(\hat{x},\hat{y}))}{\partial
\hat{x}} \; \frac{\partial \hat{x}}{\partial x} + \frac{\partial u(F(\hat{x},\hat{y}))}{\partial \hat{y}} \; \frac{\partial \hat{y}}{\partial x} \right)^2 \right.\\
& & \qquad \left. +
\left(\frac{\partial u(F(\hat{x},\hat{y}))}{\partial \hat{x}} \; \frac{\partial \hat{x}}{\partial y} + \frac{\partial u(F(\hat{x},\hat{y}))}{\partial \hat{y}} \; \frac{\partial \hat{y}}{\partial y} \right)^2 \right] \left| \hbox{det} J_F(\hat{x}) \right| \; \; d\hat{x}\, d\hat{y}
\end{eqnarray*}\]
\[ \int_{\hat{K}} \left[ \left(\frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial
\hat{x}} \; \frac{\partial \hat{x}}{\partial x} + \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \; \frac{\partial \hat{y}}{\partial x} \right)^2 +
\left(\frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{x}} \; \frac{\partial \hat{x}}{\partial y} + \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \; \frac{\partial \hat{y}}{\partial y} \right)^2 \right] \left| \hbox{det} J_F(\hat{x}) \right| \; \; d\hat{x}\, d\hat{y}\]
In the case the transformation \(F\) is affine, for example
\[\left\{
\begin{array}{lll}
x & = & a\hat{x} + b\hat{y} + e\\
y & = & c\hat{x} + d\hat{y} + f
\end{array}
\right.\]
\[\begin{aligned}
\hat{x} &= \frac{d(x-e)-b(y-f)}{D},\\
\hat{y} &= \frac{-c(x-e)+a(y-f)}{D},\\
\left| \hbox{det} J_F(\hat{x}) \right| &= D = ad-bc
\end{aligned}\]
The previous calculus becomes
\[\begin{aligned}
\int_K (\nabla u(x))^2\; dx &=
\int_{\hat{K}} \left[ \left(\frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{x}} \; \frac{d}{D} + \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \; \frac{-c}{D} \right)^2 +
\left(\frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{x}} \; \frac{-b}{D} + \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \; \frac{a}{D} \right)^2 \right] |D| \; \; d\hat{x}\, d\hat{y}\\
& = \frac{1}{|D|}\; \int_{\hat{K}} \left[ \left( d\, \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{x}} - c\, \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \right)^2 +
\left(-b\, \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{x}} \; + a\, \frac{\partial \hat{u}(\hat{x},\hat{y})}{\partial \hat{y}} \right)^2 \right] \; \; d\hat{x}\, d\hat{y}
\end{aligned}\]