lpn Subroutine

public subroutine lpn(n, x, pn, pd)

************80

! LPN computes Legendre polynomials Pn(x) and derivatives Pn'(x).

Licensing:

This routine is copyrighted by Shanjie Zhang and Jianming Jin.  However, 
they give permission to incorporate this routine into a user program 
provided that the copyright is acknowledged.

Modified:

07 July 2012

Author:

Shanjie Zhang, Jianming Jin

Reference:

Shanjie Zhang, Jianming Jin,
Computation of Special Functions,
Wiley, 1996,
ISBN: 0-471-11963-6,
LC: QA351.C45.

Parameters:

Input, integer ( kind = 4 ) N, the maximum degree.

Input, real ( kind = 8 ) X, the argument.

Output, real ( kind = 8 ) PN(0:N), PD(0:N), the values and derivatives
of the polyomials of degrees 0 to N at X.

Arguments

Type IntentOptional Attributes Name
integer(kind=4) :: n
real(kind=8) :: x
real(kind=8) :: pn(0:n)
real(kind=8) :: pd(0:n)