answered 8 years ago
You can create a Python function which does this as follows:
def U(x,L,a): if a==1: return(log(x)+log(1-L)) else: return(x^(1-a)/(1-a)+(1-L)^(1-a)/(1-a))