First, let's define the Huckel matrix:
> with(linalg): Warning, new definition for norm Warning, new definition for trace > cpmat := matrix(5,5);
> entermatrix(cpmat);(Long, tedious process of entering the matrix deleted. Only the result is shown below.)
Now that we have the Huckel matrix, we can calculate its eigenvalues. These eigenvalues are the orbital energies:
> orbital_en:=evalf(Eigenvals(cpmat));
Here is a Lewis diagram of one of the resonance structures of the cyclopentadienyl anion:
The lone pair is fully delocalized (we can tell this by pushing these electrons around the ring). There are therefore six electrons so the delocalization energy is
> 2*orbital_en[1]+2*orbital_en[2]+2*orbital_en[3]-6*(-1);