HAL Id: hal-01816347
https://hal-univ-paris13.archives-ouvertes.fr/hal-01816347
Preprint submitted on 15 Jun 2018
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires
Exact integration for products of power of barycentric coordinates over d-simplexes in R
nFrancois Cuvelier
To cite this version:
Francois Cuvelier. Exact integration for products of power of barycentric coordinates overd-simplexes inRn. 2018. �hal-01816347�
Exact integration for products of power of barycentric coordinates over d -simplexes in R
nFrançois Cuvelier∗ 2018/06/15
Abstract
Exact integral computation over a d-simplex in Rn for products of powers of its barycentric coordinates is done in [9] by using mathematical induction and coordinate mappings. In this note we give a new proof using Laplace transformations without mathematical induction.
Contents
1 Notations and denitions 2
2 Some results on the unit d-simplex 3
2.1 unitd-simplex volume . . . . 3
2.2 Magic formula . . . . 5
3 Some results on a d-simplex in Rn 6 3.1 Gradients of Barycentric coordinates on ad-simplex . . . . 6
3.2 Integration over ad-simplex . . . . 8
3.3 Volume of ad-simplex . . . 11
3.4 Magic formula . . . 11
∗Université Paris 13, Sorbonne Paris Cité, LAGA, CNRS UMR 7539, 99 Avenue J-B Clé- ment, F-93430 Villetaneuse, France, [email protected]
This work was supported in part by the ANR project DEDALES under grant ANR-14- CE23-0005.
Local shape functions of a large variety of nite element on a d-simplex KĂRncan be expressed in function of the barycentric coordinatestλ0, . . . , λdu ofK and their derivatives (see [1] for examples).
In [9], the authors give a proof of the magic formula: letννν “ pν0, . . . , νdq P Nd`1,then
ż
K d
ź
i“0
λνiipqqqqdqqq“d!|K|
d
ś
i“0
νi! pd`
d
ř
l“0
νiq!
(1)
where |K| is the volume ofK. In their proof, mathematical induction and co- ordinate mappings are mainly used. In this note we give a new proof of this formula using Laplace transformations without mathematical induction.
Firstly we recall denitions of ad-simplex in Rn and of its barycentric co- ordinates. Therafter we introduce Laplace transforms to compute the volume of the unit d-simplex Kˆ ĂRd and the magic formula (1) over K.ˆ In the last section, we propose to compute the gradients of the barycentric coordinates by solving linear systems. We also present the mapping of an integral over a d-simplex inRn to the reference unit d-simplex, allowing to proove (1).
1 Notations and denitions
LetnPN˚ be the space dimension anddP v0, nw.We recall the denition of a d-simplex inRn as well as its barycentric coordinates.
Denition 1 (d-simplex) A d-simplexK ĂRn is the convex hull of pd`1q pointsqqqqqqqqq0, . . . ,qqqqqqqqqdof Rn which form the vertices of K.
K“
# q
qqPRn |qqq“
d
ÿ
i“0
θiqqqqqqqqqi, with@iP v0,dw, θiě0, and
d
ÿ
i“0
θi“1 +
. (2) For example, a 2-simplex is a triangle and a3-simplex is a tetrahedron. It will be always assumed that ad-simplex is not degenerated, i.e., the set of vectors tqqqqqqqqqi´qqqqqqqqq0udi“1is linearly independent.
Denition 2 (Barycentric coordinates) Let K Ă Rn be a non-degenerate d-simplex and tqqqqqqqqqiudi“0 its vertices. The parametrization of K with a convex combination of the vertices reads as follows
K“
# q
qqPRn |qqq“
d
ÿ
i“0
λipqqqqqqqqqqqqqi, with @iP v0,dw, λipqqqq ě0, and
d
ÿ
i“0
λipqqqq “1 +
.
The coecients λ0pqqqq, . . . , λdpqqqqare called the barycentric coordinates onK(3)of q
q q.
As immediat property, the barycentric coordinates on Ksatisfy
λipqqqqqqqqqjq “δi,j, @pi, jq P v0,dw. (4)
2 Some results on the unit d-simplex
The unit d-simplexKˆdĂRd is dened by thed`1vertices ˆq
qqˆ q qqˆ
qqq0,qqqqqqˆˆqˆqq1,¨ ¨ ¨ ,qqqˆqˆqqqqqˆd(
“ 000,ˆeeeˆˆ1,¨ ¨ ¨,eeˆˆˆed( where ˆeeeˆˆ1, . . . ,eˆˆeeˆd(
is the standard basis ofRd.We have Kˆd“
# ˆ q q
qPRd|qqˆq“
d
ÿ
i“0
λˆipˆqqqqˆqqqqˆqqqqqˆi, withλˆipˆqqqq ě0, and
d
ÿ
i“0
ˆλipˆqqqq “1 +
. (5) As immediat property, the barycentric coordinatespˆλiqdi“0onKˆdsatisfy
ˆλipˆqqqqqqˆqˆqqjq “δi,j, @pi, jq P v0,dw. (6) and are explicitly given withqˆqq“ px1,¨ ¨ ¨ , xdqtPKˆdby
λˆ0pˆqqqq “1´
d
ÿ
i“1
xi and@iP v1,dw, ˆλipˆqqqq “xi. (7) Indeed, asqqqˆqˆqqˆqqq0“000,we have
ˆ q q q“
d
ÿ
i“0
ˆλipˆqqqqˆqqqqqqˆqˆqqi“
d
ÿ
i“1
ˆ qqqqqqqqˆˆqiˆλipˆqqqq Fromqqqˆqˆqqqqqˆi“ˆeˆeeˆi, @iP v1,dw, we obtain
d
ÿ
i“1
ˆ q q qˆ qqqˆ
qqqiλˆipˆqqqq “
¨
˝ qˆqqˆqqqqqˆq1 ¨ ¨ ¨ qˆqqqqqqqˆˆqd
˛
‚
¨
˚
˝ λˆ1pqqˆqq
... λˆdpˆqqqq
˛
‹
‚“Id
¨
˚
˝ ˆλ1pqˆqqq
... λˆdpˆqqqq
˛
‹
‚“
¨
˚
˝ λˆ1pqqˆqq
... λˆdpˆqqqq
˛
‹
‚
and thus
ˆ qqq“
¨
˚
˝ x1
... xd
˛
‹
‚“
¨
˚
˝ λˆ1pˆqqqq
... ˆλdpqqˆqq
˛
‹
‚.
From (5), we have
d
ÿ
i“0
ˆλipˆqqqq “1 and thus
ˆλ0pˆqqqq “1´
d
ÿ
i“1
λˆipˆqqqq “1´
d
ÿ
i“1
xi.
2.1 unit d-simplex volume
There are several ways to compute the volume |K|ˆ of the d-simplex Kˆ Ă Rd which is given by the following integral:
|K| “ˆ ż
Kˆ
1dˆqqq“ ż1
0
ż1´x1 0
ż1´x1´x2 0
. . .
ż1´px1`...`xd´1q 0
1dxd. . . dx3dx2dx1.
An elegant way to perform this integration is explained in [6], section 18.10, and uses a Laplace transform. To use this method, we note that
Kˆ “Rd`X t1´ px1`. . .`xdq ě0u. (8) So we also have
|K| “ˆ ż
Rd`Xt1´px1`...`xdqě0u
1dxd. . . dx1.
By using a dirac function and extending the integration domain to Rd`1` , we also have
|K| “ˆ ż
Rd`1`
δpx1`. . .`xd`xd`1´1qdxd`1dxd. . . dx1
To use the Laplace transform theory, we dene the function f by fptq “
ż
Rd`1`
δpx1`. . .`xd`xd`1´tqdxd`1dxd. . . dx1
so that|K| “ˆ fp1q.The Laplace transform off is given by Lpfqpsq “
ż8 0
fptqe´stdt
“ ż
Rd`1`
ˆż8
0
δpx1`. . .`xd`xd`1´tqe´stdt
˙
dxd`1dxd. . . dx1
“ ż
Rd`1`
expp´s
d`1
ÿ
i“1
xiqdxd`1dxd. . . dx1
“
d`1
ź
i“1
ż8 0
expp´sxiqdxi
“ 1 sd`1.
By using the inverse Laplace transform table (see [8] for example), we have L-1psÞÑ d!
sd`1qptq “td.
Asf “L-1˝Lpfqand by linearity of the inverse Laplace transform we obtain fptq “td
d!. So the volume of the unitd-simplex is
|K| “ˆ 1
d! (9)
2.2 Magic formula
Letννν“ pν0, . . . , νdq PNd`1.The magic formula is given by ż
Kˆ d
ź
i“0
λˆνiipˆqqqqdˆqqq“ śd
i“0νi! pd`řd
i“0νiq! (10)
This formula is often used in P1-Lagrange nite element methods because P1- Lagrange basis functions on a d-simplex are the associated barycentic coordi- nates. For example, one can refer to [7] (section 8.2.1, page 179, formulap8.3q), [9], [4] section 7.3.3 page 126, [3] for d P v1,3w, [2] as exercise for d “ 2 and d“3. In this section, we propose a proof of this formula using Laplace trans- form theory. LetIpνqˆ denote the integral of (10). The barycentic coordinates λˆi are given in (7) and so withqqˆq“ px1, . . . , xdqand using (8) we obtain
Ipνq “ˆ ż
Kˆ
p1´
d
ÿ
i“1
xiqν0
d
ź
i“1
xνiidxd. . . dx1
“ ż
Rd`Xt1´px1`...`xdqě0u
p1´
d
ÿ
i“1
xiqν0
d
ź
i“1
xνiidxd. . . dx1
From section 2.1, by using a dirac function and by extending the integration domain to Rd`1` we obtain withνd`1“ν0
Ipνˆ q “ ż
Rd`1`
δpx1`. . .`xd`xd`1´1qxνd`10
d
ź
i“1
xνiidxd`1dxd. . . dx1
“ ż
Rd`1`
δpx1`. . .`xd`xd`1´1q
d`1
ź
i“1
xνiidxd`1dxd. . . dx1
To use the Laplace transform theory, we dene the function fννν by fνννptq “
ż
Rd`1`
δpx1`. . .`xd`xd`1´tq
d`1
ź
i“1
xνiidxd`1dxd. . . dx1
so thatIpνˆ q “fνννp1q. The Laplace transform offννν is given by Lpfνννqpsq “
ż8 0
fνννptqe´stdt
“ ż
Rd`1`
ˆż8 0
δpx1`. . .`xd`xd`1´tqe´stdt
˙d`1
ź
i“1
xνii dxd`1dxd. . . dx1
“ ż
Rd`1`
expp´s
d`1
ÿ
i“1
xiq
d`1
ź
i“1
xνii dxd`1dxd. . . dx1
“
d`1
ź
i“1
ż8 0
xνiiexpp´sxiqdxi
“
d`1
ź
i“1
LptÞÑtνiqpsq
In a classical Laplace transform table (see [8] for example), we have LptÞÑ tk
k!qpsq “ 1 sk`1 and by linearity of the Laplace transform
LptÞÑtkqpsq “ k!
sk`1. So we obtain
Lpfνννqpsq “
d`1
ź
i“1
νi! sνi`1 “
śd`1 i“1 νi! sd`1`řd`1i“1νi
By using the inverse Laplace transform table, we have L-1psÞÑ 1
skqptq “ tk´1 k´1.
With the linearity of the inverse Laplace transform we obtain fνννptq “L-1pLpfνννqpsqqptq
“
śd`1 i“1 νi! pd`řd`1
i“1νiq!td`řd`1i“1νi. AsIpνq “ˆ fνννp1qandνd`1“ν0,the equation (10) is proved.
3 Some results on a d-simplex in Rn
3.1 Gradients of Barycentric coordinates on a d-simplex
Lemma 3 Let K Ă Rn be a non-degenerate d-simplex and and tqqqqqqqqqiudi“0 its vertices. The barycentric coordinatespλipqqqqqdi“0are solution of the linear system
¨
˚
˚
˚
˝
1 1 ¨ ¨ ¨ 1 0
... AtKAK
0
˛
‹
‹
‹
‚
¨
˚
˚
˚
˚
˝ λ0pqqqq λ1pqqqq
... λdpqqqq
˛
‹
‹
‹
‹
‚
“
¨
˚
˚
˝ 1 AKpqqq´qqqqqqqqq0q
˛
‹
‹
‚ (11) whereAKPMn,dpRqis dened by
AK“
¨
˝ qqqqqqqqq1´qqqqqqqqq0 ¨ ¨ ¨ qqqqqqqqqd´qqqqqqqqq0
˛
‚ (12)
The barycentric coordinates are multivariate polynomials of rst degree and their gradients are given by
` ∇∇∇λ1pqqqq ¨ ¨ ¨ ∇∇∇λdpqqqq ˘
“AKpAtKAKq-1 (13) and
∇∇∇λ0pqqqq “ ´
d
ÿ
i“1
∇
∇∇λipqqqq. (14)
Proof: Asřd
i“0λipqqqq “1,we have qqq“
d
ÿ
i“0
λipqqqqqqqqqqqqqiùñqqq´qqqqqqqqq0“
d
ÿ
i“1
pqqqqqqqqqi´qqqqqqqqq0qλipqqqq “AK
¨
˚
˝ λ1pqqqq
... λdpqqqq
˛
‹
‚
Due to linear independence oftqqqqqqqqqi´qqqqqqqqq0udi“1,
HKdef“AtKAK PMd,dpRq (15) is a regular matrix and the barycentric coordinates are solution of the linear system
AtKAK
¨
˚
˝ λ1pqqqq
... λdpqqqq
˛
‹
‚“AtKpqqq´qqqqqqqqq0q and
d
ÿ
i“0
λipqqqq “1.
In matrix form these equations can be written as (11) and we deduce that the barycentric coordinatesλiare multivariate polynomials of rst degree. So their gradients are constants onK.
The ane map/transformation FK from the unit d-simplex Kˆ Ă Rd to KĂRn is given by
q q
q“AKqˆqq`qqqqqqqqq0“FKpˆqqqq. (16) So we have
AtKpqqq´qqqqqqqqq0q “AtKAKqˆqq“HKˆqqq and thusFK-1:KĂRnÝÑKˆ ĂRd is dened by
ˆ q q
q“H-1KAtKpqqq´qqqqqqqqq0q “FK-1pqqqq. (17) So we have
λipqqqq “ pˆλi˝FK-1qpqqqq and λˆipˆqqqq “ pλi˝FKqpˆqqqq (18) One can remark that ifd“nthenAK is a regular square matrix andH-1KAtK “ A-1K.
Now, we may compute partial derivative ofλi and @i P v0,dw, @j P v1, nw, we obtain withqqˆq“ pˆx1, . . . ,xˆdqandqqq“ px1, . . . , xnq
Bλi
Bxjpqqqq “
d
ÿ
l“1
Bλˆi
BˆxjpFK-1pqqqqqBFK,l-1 Bxj pqqqq
From (17), denoting BK “H-1KAtK P Md,mpRq gives BFBxK,l-1j pqqqq “ pBKql,j. The barycentric coordinates are polynomials of rst degree, so their gradients are constants and we obtain
∇∇∇λi“BtK∇∇∇ˆλˆi
(in fact BK is the Jacobian matrix of FK-1). The matrix HK is regular and symmetric, soBtK “AKH-1K and we obtain
∇∇∇λi“AKH-1K∇∇∇ˆλˆi. (19)
From (7), we deduced that
´ ∇∇∇ˆˆλ1 ¨ ¨ ¨ ∇∇∇ˆλˆd
¯
“Id (20)
and thus
` ∇∇∇λ1pqqqq ¨ ¨ ¨ ∇∇∇λdpqqqq ˘
“AKH-1K
´ ∇∇∇ˆλˆ1 ¨ ¨ ¨ ∇∇∇ˆˆλd
¯
“AKH-1K. Asřd
i“0λipqqqq “1,we immediately have
∇∇∇λ0pqqqq “ ´
d
ÿ
i“1
∇
∇∇λipqqqq.
˝ From (13) and (14), we immediatly have:
Remark 4 The gradients of the barycentric coordinates are linear combinations of tqqqqqqqqq1´qqqqqqqqq0, . . . ,qqqqqqqqqd´qqqqqqqqq0u.
3.2 Integration over a d-simplex
If K is a non-degenerated d-simplex inRd, from (16) we have JFKpˆqqqq “AK. ThenAK is a regular square matrix and we have the classical formula:
ż
K
fpqqqqdqqq“ |detpAKq|
ż
Kˆ
f˝FKpˆqqqqdˆqqq (21) The following theorem extend this result tod-simplex inRn,with1ďdďn.
Theorem 5 Let KĂRn be a non-degeneratedd-simplex andf :KÝÑR. ż
K
fpqqqqdqqq“ˇ
ˇdetpAtKAKqˇ ˇ
1{2ż
Kˆ
f˝FKpˆqqqqdˆqqq (22) whereK is the unit d-simplex inRn, AKPMd,npRqis dened by
AK “
´
qqqqqqqqq1´qqqqqqqqq0 qqqqqqqqq2´qqqqqqqqq0 ¨ ¨ ¨ qqqqqqqqqd´qqqqqqqqq0
¯ (23)
andFK : ˆKÝÑK is given by
FKpˆqqqq “AKqqˆq`qqqqqqqqq0 (24) Proof: The set vvv1, . . . , vvvd(
is linearly independent so we can extend it to a basis vvv1, . . . , vvvn(
. We denote by AP Mn,npRqthe matrix such that the i-th column is the vectorvvvi for alliP v1, nw.So we have
A“
´
AK vvvd`1 ¨ ¨ ¨ vvvn
¯ (25)
By the QR-factorization theorem apply to the matrix A P MnpRq, there is an orthogonal matrix Q PMnpRq and a regular upper triangular matrixR P MnpRqsuch that
A“QR
So we have
QtA“R
and we dene the matrixA¯PMn,dpRqto be the rstdcolumns ofR: A¯“QtAK.
We can also note that A¯“
´
¯ q qq¯
qqqqqq¯1´qqq¯q¯qq¯qqq0 qqq¯q¯qqqqq¯2´qqq¯q¯qq¯qqq0 ¨ ¨ ¨ qqq¯q¯qq¯qqqd´q¯qqqqqqq¯¯q0
¯
“
´
¯ q q q¯ qqq¯
qqq1 qqq¯q¯qq¯qqq2 ¨ ¨ ¨ qqq¯q¯qqqqq¯d
¯ . LetF¯:Rn ÝÑRn be the bijective function dened by
Fpx¯ xxq “Qtpxxx´qqqqqqqqq0q “xxx¯ (26) and
q¯qqqqqqq¯¯qi“Fp¯qqqqqqqqqiq “Qtpqqqqqqqqqi´qqqqqqqqq0q, @iP v0,dw.
By constructionq¯qqqqqqq¯¯q0 “ 000 and, @i P v1, dw, qqqqqq¯¯q¯qqi is the i-th column of the upper triangular matrix R.So we have
@iP v0,dw, qqq¯q¯qq¯qqqiPVectpeee1, . . . , eeedq where eee1, . . . , eeen(
is the standard basis of Rn. The set q¯qqqqqqq¯¯q0, . . . ,q¯qq¯qqqqq¯qd(
are the vertices of thed-simplex K¯ “F¯pKqand we deduce
K¯ ĂVectpeee1, . . . , eeedq. (27) By change of variables, we obtain
ż
K
fpqqqqdqqq“ ż
K¯
f ˝F¯-1p¯qqqq|detpJF¯-1p¯qqqqq|d¯qqq
whereJF¯-1 is the Jacobian matrix ofF¯-1.From (26), we haveJF¯-1p¯qqqq “Qand as Qis an orthogonal matrix, detpJF¯-1pqqqqq “¯ 1.So we obtain
ż
K
fpqqqqdqqq“ ż
K¯
f ˝F¯-1p¯qqqqd¯qqq. (28) LetPPMd,npRqdened by
P“`
Id Od,n´d
˘ and
@iP v0,dw, qqq¯¯q¯¯qq¯¯qqqi“P¯qqq¯qqqqq¯qi PRd. From (27), we deduce
@iP v0,dw, ¯qqqqqq¯q¯qqi“Ptq¯¯qq¯¯qqqqq¯¯qi “ ˆ q¯¯qqqqqqq¯¯¯¯qi
000
˙ .
Letg¯“f˝F¯-1 andK¯¯ be thed-simplex in Rd with verticesqqq¯¯q¯¯qq¯¯qqqi, iP v0,dw. We denote byP : ¯K¯ ĂRdÝÑK¯ ĂRn the application dened byPpqq¯¯qq “Ptq¯¯qq.We denote byg¯¯: ¯K¯ ÝÑRthe application dened by
¯¯
gp¯¯qqqq “¯g˝Ppq¯¯qqq “¯g ˆ qq¯¯q
000
˙ .