(**This file computes the modified Cholesky decomposition of a symmetric real matrix. We use this routine to show that the hessian of energy has lowest eigenvalue at least 1/10, relative to the potential function 1/r and 1/r^2.*) ModifiedCholesky[a_]:=( len=Length[a]; l=Table[Table[0,{len}],{len}]; d=Table[0,{len}]; d[[1]]=a[[1,1]]; For[i=1,i<=len,i=i+1,l[[i,i]]=1]; For[j=1,j<=len,j=j+1, { For[i=j+1,i<=len,i=i+1, { l[[i,j]]=(a[[i,j]]-Sum[l[[i,k]] l[[j,k]] d[[k]],{k,1,j-1}])/d[[j]]; d[[i]]=a[[i,i]]-Sum[l[[i,k]] l[[i,k]] d[[k]],{k,1,i-1}]; }]}]; dd=Table[Table[0,{len}],{len}]; For[j=1,j<=len,j=j+1,dd[[j,j]]=d[[j]]]; {l,dd}) (*This is a check that a real symmetric matrix is positive definite. 1 means "yes" and 0 means "no".*) CheckPositiveDefinite[A_]:=( d1=ModifiedCholesky[A]; d2=d1[[2]]; (*Get the diagonal elements*) d3=Table[d2[[j,j]],{j,1,Length[d2]}]; d4=Min[d3]; If[d4>0,1,0]) (*This checks if the lowest positive eigenvalue of a real symmetric matrix exceeds r*) CheckLowestEigenvalue[A_,r_]:=( AA=A-r IdentityMatrix[Length[A]]; CheckPositiveDefinite[AA])