function [w,P_] = eValP(rk,a1,a2)
a3 = a1+a2;
m = rk+1;
%
d = 2*(1-m^(-1/2))/(m-1) * [1:m-2]-1;
d = [0 d];
P_ = 0.5*a3^2*toeplitz(-d,d);
%
% R = zeros(m);
% for i = 1:m-1
%     for j = 1:m-1
%         R(i,j) = a3^2*sign(i-j);
%     end
% end
% R0 = R(1:m-1,1:m-1);
% epsilon = 1/(m-1)*(1-sqrt(1/m));
% R0_ = R0-epsilon*ones(m-1,1)*ones(m-1,1)'*R0-epsilon*R0*ones(m-1,1)*ones(m-1,1)';
%
[~,d_] = eig(P_);
d = zeros(m-1,1);
for i = 1:m-1
    d(i) = imag(d_(i,i));
end 
[d,idx] = sort(d,'descend');
w = d(1:ceil((m-1)/2));
end 