# Vandermonde matrix DG Hestaven

I am trying to understand the nodal and modal basis formulation from the book of Hesthaven (Nodal Discontinuous Galerkin Methods, Hesthaven, Jan S., Warburton, Tim). For $N=2$, I get the Vandermonde Matrix, which is computed by the Jacobi polynomial for $\alpha, \beta =0$ which is the Legendre polynomial:

V = Vandermonde1D(2, x)

V =

0.7071   -1.2247    1.5811
0.7071         0   -0.7906
0.7071    1.2247    1.5811


and x = (-1,0,1) the LGL points.

In the book on page 48, it says that for $N=6$ the d) option on the table is for orthonormal basis with Legendre-Gauss-Lobatto points.

Now, if I run a code from here

[x,w,P]=lglnodes(2)


I get

x =
-1
0
1


which are the LGL points and

w =
0.3333
1.3333
0.3333


the weights. But then I get

P =
1.0000   -1.0000    1.0000
1.0000   -0.0000   -0.5000
1.0000    1.0000    1.0000


In the comments for the program, it says

Computes the Legendre-Gauss-Lobatto nodes, weights, and the LGL Vandermonde matrix. The LGL nodes are the zeros of $(1-x^2)P'_N(x)$

But this is different than the Vandermonde I get from the original program of Hesthaven.

Now, I kinda understand what this $P$ Matrix is. If you have the Legendre Polynomials

$p_{0}(x) = 1, p_{1}(x) = x, p_{2}(x) = \frac{1}{2}(3x^{2} -1)$.

and replace the LGL points (-1,0,1) I get this $P$ matrix. But how to get the Vandermonde matrix?

• What is the "book of Hesthaven"? Do you have a full bibliographic reference? Jun 13 '17 at 20:21
• Nodal Discontinuous Galerkin Methods, Hesthaven, Jan S., Warburton, Tim springer.com/gp/book/9780387720654
– Geo
Jun 13 '17 at 22:48
• You can add it as a part of your question Jun 13 '17 at 22:53
• Isn't the difference just the constant gamma that Westhaven and Warburton include that the Matlab code doesn't? Jun 14 '17 at 14:28
• you mean on the JacobiP file for the Jacobi Polynomial? can you be more specific?
– Geo
Jun 14 '17 at 18:33

You're using the orthonormalized version of the Legendre polynomials, while Hesthaven is not. The polynomials in your matrix are normalized by a factor of $\sqrt{\frac{2n+1}{2}}$, i.e. $\sqrt{\frac{2(1)+1}{2}}=1.2247$ and $\sqrt{\frac{2(2)+1}{2}}=1.5811$.
You need to use the "normalized" Legendre Polynomials instead of Legendre Polynomials. Where you divide the Legendre polynomial by $\sqrt{\frac{2}{2n+1}}$.