Partner potential to symmetric well placed with endpoints at ((±a)/2), where a=π*(ℏ/mc), and s=x*(π/a), (Subscript[V, 0])=((-1)/2)

V[s_]:=(((Sec[s])^2)-(1/2));
ds=(π/n)-0.00002;
n=551;s=Table[((-π)/2.)+ds*i,{i,n}];
one[n_,d_]:=DiagonalMatrix[1+0Range[n-Abs[d]],d];
B=(one[n,-1]+10one[n,0]+one[n,1])/12.;
A=(one[n,-1]-2one[n,0]+one[n,1])/(ds^2);
KE=-Inverse[B].A/2;
H=KE+DiagonalMatrix[V[s]];
{eval,evec}=Eigensystem[H];

f[n_]:=s[[n]];
data[m_]:=Table[{f[j],evec[[-m]][[j]]},{j,1,n}];
ListPlot[data[3],PlotJoined->True,PlotRange->All]

eval=eval//Sort;

eval[[;;20]]

Original well’s eigenvalues are: for the above (Subscript[V, 0]), (Subscript[E, n])= (1/2)((n^2)-1), n≥2

Hence, the partner’s eigenvalues are: (Subscript[E, n])=(1/2)((((n+1))^2)-1)n≥1

theory=Table[0.5*((((n+1))^2)-1),{n,1,50}];

pererrors=Table[(((theory[[n]]-eval[[n]])*100)/(theory[[n]])),{n,1,50}];

pererrors[[;;25]]