#install.packages( "orthopolynom", dependencies=TRUE ) # install the package if needed library(orthopolynom) lp = legendre.polynomials(5) plot( lp[[3]] ) # look at a polot of $P_2(x)$ # Lets get the roots of the Legendre polynomials: # r = legendre.recurrences( 5 ) m.r = monic.polynomial.recurrences( r ) polynomial.roots( m.r )