function [f,f1,fk] = prodfn(l,k,theta,A);

if length(A) == 1;
  A = A*ones(length(k),1);
end;
f     = l.^(1-theta).*k.^theta.*A;
f1    = (1-theta)*f./l;
fk    = theta*f./k;
