function xf = picard(x,n)
% picard iter with subfunction
%x = 0;
%n=10;
for it=1:n
    x=g(x);
end 
   xf = x;
end   

function y = g(x)
  y = cos(x);
end  