function y=ces(x)

%%%%%%%%%%%%% CES Function  %%%%%%%%%%%%%%%%%%%%%
%
% Constant Elasticity of Substitution (CES):
%   Y = [a*K^(-gamma)+(1-a)*L^(-gamma)]^(-µ)
% with 0<a<1, gamma>-1 and different from zero.
%
%     [  Remark (Marginal Rate of Substitution):
%           MRS_KL=((1-a)/a)*(K/L)^(1+gamma)
%           rho_KL=1/(1+gamma)                 ]
%
% The per capita formulation of the CES function
% with constant returns to scale:
%   y = [a*k^(-gamma)+(1-a)]^(-1/gamma)
% this is the function used below:


global A alpha gamma s;

y=A.*(alpha.*x.^(-gamma)+(1-alpha)).^(-1/gamma);


%"Complex and Chaotic Nonlinear Dynamics. 
% Advances in Economics and Finance, 
% Mathematics and Statistics" 
% T.Vialar, Springer 2009.
% Copyright(c).