function r = func1(theta,param);
alpha  = param(1);
beta   = param(2);
lambda = param(3);
n      = param(4);
k      = param(5:4+n);
c      = zeros(n,1);
cn     = c;
for i=1:n;
  c    = c+theta(i)*k.^i;
end;
kn     = lambda*k.^alpha-c;
for i=1:n;
  cn   = cn+theta(i)*kn.^i;
end;

r      = ones(n,1)./c-beta*alpha*lambda*kn.^(alpha-1)./cn;
