function y=dopt(k)

global U_pred A F;

U = 1/k*inv(A)*F;

y = 2*(U-U_pred)'*(-1/k^2*inv(A)*F);
