# Looking for an universal utility function

I'm trying to build a computer simulation of an economy which separate simulation for each household and I'm trying to figure out what utility function should I use to model the households behavior. I want to model goods as falling into categories (e.g. food category consisting of vegetables and fruits)

My criterias for ideal utility function (in order of importance):

1. Cause total consumption of goods in certain "basic" groups to be non-zero (here Cobb-Douglas is enough: $$U=ln(food)+ln(cloths)$$)
2. Encourage diversity within group (e.g. $$U=ln(\sqrt{fruits}+\sqrt{vegetables})+ln(clothes)$$)
3. Allows consumption in certain groups to be zero (e.g. $$U=ln(\sqrt{fruits}+\sqrt{vegetables})+ln(clothes)+\sqrt{tourism}$$)
4. Has a (readable and convenient) closed form optimization solution for budget constraint $$\sum{price_i*good_i=budget}$$
5. Allows certain goods or categories of goods to be complementary (honestly have no idea how to incorporate this)

I understand that no objective answer is possible here, but I'd like to learn if there are some utilities functions that satisfy some of criterias above and/or learn what multi-goods universal utility functions are used in practice (I was taught only two-good task specific utility functions in university).

• 4. Since you are running a computer simulation, why do you need a closed form solution? These are convex functions, seems like you could get a pretty good approximate solution with the gradient method. – Giskard Mar 14 at 12:24
• 5. The utility representation for perfect complements $x_1,x_2$ is $U(x_1,x_2) = \min(x_1,x_2)$. – Giskard Mar 14 at 12:28
• I'd recommend looking into the empirical industrial organization literature a bit and see some of the work they've done regarding functional forms for demand estimation. For now, have you looked into nested functional forms? (For example, you might be able to use a couple of different nested CES utility functions: U=aCES(1)+bCES(2)... where CES(1) CES(2) etc are different CES functions where each parameterize different types of goods.) Overall though, I think the main key is going to be having different households' parameter values be drawn from a distribution to generate heterogeneity. – AndrewC Mar 16 at 14:15
• @1muflon1 I agree, this comment actually helps a lot, and given that there are no answers, I'd be happy to award @ AndrewC with the points – kandi Mar 19 at 21:27
• @1muflon1 and kandi--glad it helped! I'll expand it tonight or early tomorrow morning, since I want to actually add more useful leads (especially for a bountied question, it's only fair that you get more than a vague ''try looking at these types of functions, perhaps'' answer!) – AndrewC Mar 20 at 0:44