function g = himmelblau_gradient(x1,x2)
  %
  % The gradient of the Himmelblau function. See himmelblau.m for
  % more information.
  %
  f_x1 = 4*(x1^2 + x2 - 11)*x1 + 2*x2^2 + 2*x1 - 14;
  f_x2 = 4*(x2^2 + x1 - 7)*x2 + 2*x1^2 + 2*x2 - 22;
  g = [f_x1; f_x2];
end
