 function alfa = RateOfChange(A,E,b,k)
  % A and E are n-by-n with A nonsingular. 
  % b is n-by-1 and k is an integer that satisfies 1<=k<=n
  % Let x(t) be the solution to (A+tE)x  = b. 
  % alfa is the rate of change at t = 0 of the k-th component of x(t)
  
  % Differentiate both sides of  (A+tE)x(t) = b wrt t and set t=0:
  %
  %            E*x(0) + A*xdot(0) = 0    xdot = d/dt of x
  %
  % since x(0) = inv(A)*b we get
  %
  %              xdot(0) = -inv(A)*E*inv(A*b
  
  [L,U,P] = lu(A);
  x = U\(L\(P*b));
  c = E*x;
  xdot_at_0 = -(U\(L\(P*c)));
  alfa = xdot_at_0(k);