Gauss-Kronrod and other Integration

Notes: 
A) To get full double precision I need to form the matrices in higher precision.  This would be true for any of the higher order integration schemes. 
B) Somehow I need to use a version other than the default load of 7.0.  My current 8.0.1 load from Feb 23 2011 is fine to high order. 
C) I need to investigate the Gauss-Seidel implementation as well as the current Jacobi iteration.  On a GPU it is probably a block intermediate that is actually running. 
D) Note: lack of smoothness affects the accuracy badly as does an integrable singularity.  This is not much of a surprise!
E) There must be equivalent integration formulas based on Fourier series integration.  I need to find out/remember the names. 
F) Note:  The full interpolation formula for large n does take a little while with an analytic integrattion but it is a onesy computation and could easily be acclerated.  the easy solution is to use NIntegrate with high precision.Completely excessive but n=32 is taking a while!  n=7 takes 6 seconds and n=8 takes 9 seconds.

$Version
$HistoryLength=0;

Making matrices for a bunch of dimensions and all the available integration formats is.

I have access to a few one dimensional integration rules.  See the list below.

Chop[0.0 (10^6)]

CreateWeightMatrix[absc_]:= Module[
{m=Length[absc],values,p,P,P0,t,i,j, ExtraPrecision=4},
Chop[
N[hmm=Table[
values=Table[ {absc[[i]],KroneckerDelta[i,j]},{i,m}];
p[t_]= Expand[InterpolatingPolynomial[ values, t]];
P[t_]=Integrate[p[t],t];
P0=P[0];
Table[P[absc[[i]]]-P0,{i,1,m}],
{j,1,m}
],
$MachinePrecision+ExtraPrecision
],
(10^(-$MachinePrecision))
]
]
WriteMatrix[A_,n_,type_]:= Module[{name},
name=ToString[StringForm["WeightMat_``_``.dat",n,type]];
Export[name,A]
]

SetDirectory["/home/faculty/struther/Desktop/Link to Courses/5628_11/Data"];
precision=256;  (* Note:  Some extra precision is neccessary but this is prob excessive a dimension 64 GC matrix retains 120 decimal bits of precision with this setting*)
{nMin, nMax}={33,64}; (* Note:  Actual array sizes are different e.g GK and GBE are 2n+1 square while CC and NC and LK and LP are 2n-1 square*)
TimingData=Table[
Timing[
Do[
absc=ToExpression[ToString[StringForm["NIntegrate`.```RuleData[``,``][[1]]",ToExpression[type],n,precision]]];
(* Print[StringForm["For n = ``: Length of `` is ``",n, type, Length[absc]]]; *)
A=CreateWeightMatrix[absc];
WriteMatrix[A,n,type],
{type, {"ClenshawCurtis","GaussBerntsenEspelid","GaussKronrod","LobattoKronrod","LobattoPeano","NewtonCotes"}}
]
][[1]],
{n,nMin, nMax}
];
ListLogPlot[TimingData]

Clear[n]
F[n_]=Exp[Fit[Transpose[{Range[nMin,nMax],Log[TimingData]}],{1,n},n]]
{F[nMax], TimingData[[-1]]}

F[64]/60.0^2

FileNames["*32*"]

A=Transpose[Import["WeightMat_8_GaussKronrod.dat"]];
Dimensions[A]
L=LowerTriangularize[A];
U=A-L;
GS=Inverse[L].U;
Norm[L.GS - U]
MatrixPlot[U]
MatrixPlot[GS]

{evals,evecs}=Eigensystem[GS];
evals
ListLogPlot[Abs[evals],
PlotRange->All]

ListLogPlot[{evecs[[1]],-evecs[[1]]}]
ListLogPlot[{
Re[evecs[[2]]],Im[evecs[[2]]],
-Re[evecs[[2]]],-Im[evecs[[2]]]
}]
evecs[[3]]

ei

Nor

ListLogPlot[Abs[Eigenvalues[A]]]

ListPlot[Diagonal[L]]