<< legendre_eval Legendre legendre_pdf >>

Orthogonal Polynomials >> Orthogonal Polynomials > Legendre > legendre_norm

legendre_norm

Compute Legendre L2 norm

Calling Sequence

y=legendre_norm(n)

Parameters

n :

a 1-by-1 matrix of doubles, integer value, n>=0.

y :

a matrix of doubles, the norm

Description

Returns the integral:

where Pn is Legendre polynomial.

Examples

// Check that int Pn(x)^2 w(x) dx=2/(2n+1).
function y=sqPw(x, n)
y=legendre_eval(x,n)^2
endfunction
for n = 1:5
[v,err]=intg(-1,1,list(sqPw,n));
I=legendre_norm(n);
disp([n,I,v])
end

Authors


Report an issue
<< legendre_eval Legendre legendre_pdf >>