function [f,grad] = simplefg1(x) % function used in the Automatic Differenziation Chapter f = log(x(1)) + x(1)*x(2) - sin(x(2)); grad = dlgradient(f,x); end