function [f,d] = func(x,par)

f = (x-1)^2;
d = 2*(x-1);
