function y = weighted_rdcs(x,a)

theta = linspace(0.0001,pi,2000);
dtheta = theta(2)-theta(1);
rutherford_dcs = sin(theta/2).^(-4);

N = length(x);
y = zeros(1,N)';
for i = 1:N
    arf  = g2(theta,x(i)); % angular response function
    y(i) = a(1)*dtheta*sum(arf.*rutherford_dcs); % Computer integration
end