# Integrability of demand

In microeconomic theory, the problem of the integrability of demand functions deals with recovering a utility function (that is, consumer preferences) from a given walrasian demand function. The "integrability" in the name comes from the fact that demand functions can be shown to satisfy a system of partial differential equations in prices, and solving (integrating) this system is a crucial step in recovering the underlying utility function generating demand.
The problem was considered by Paul Samuelson in his book Foundations of Economic Analysis, and conditions for its solution were given by him in a 1950 article. More general conditions for a solution were later given by Leonid Hurwicz and Hirofumi Uzawa.

## Mathematical formulation

Given consumption space $X$ and a known walrasian demand function $x:\mathbb {R} _{++}^{L}\times \mathbb {R} _{+}\rightarrow X$, solving the problem of integrability of demand consists in finding a utility function $u:X\rightarrow \mathbb {R}$ such that
    $x(p,w)=\operatorname {argmax} _{x\in X}\{u(x):p\cdot x\leq w\}$
That is, it is essentially "reversing" the consumer's utility maximization problem.

## Sufficient conditions for solution

There are essentially two steps in solving the integrability problem for a demand function. First, one recovers an expenditure function $e(p,u)$ for the consumer. Then, with the properties of expenditure functions, one can construct an at-least-as-good set
    $V_{u}=\{x\in \mathbb {R} _{+}^{L}:u(x)\geq u\}$
which is equivalent to finding a utility function $u(x)$.
If the demand function $x(p,w)$ is homogenous of degree zero, satisfies Walras' Law, and has a negative semi-definite substitution matrix $S(p,w)$, then it is possible to follow those steps to find a utility function $u(x)$ that generates demand $x(p,w)$.
Proof: if the first two conditions (homogeneity of degree zero and Walras' Law) are met, then duality between the expenditure minimization problem and the utility maximization problem tells us that
    $x(p,w)=h(p,v(p,w))$
where $v(p,w)=u(x(p,w))$ is the consumers' indirect utility function and $h(p,u)$ is the consumers' hicksian demand function. Fix a utility level $u_{0}=v(p,w)$. From Shephard's lemma, and with the identity above we have
| ${\frac {\partial e(p)}{\partial p}}=x(p,e(p))$ | (1) |
where we omit the fixed utility level $u_{0}$ for conciseness. (1) is a system of PDEs in the prices vector $p$, and Frobenius' theorem can be used to show that if the matrix
    $D_{p}x(p,w)+D_{w}x(p,w)x(p,w)$
is symmetric, then it has a solution. Notice that the matrix above is simply the substitution matrix $S(p,w)$, which we assumed to be symmetric firsthand. So (1) has a solution, and it is (at least theoretically) possible to find an expenditure function $e(p)$ such that $p\cdot x(p,e(p))=e(p)$.
For the second step, by definition,
    $e(p)=e(p,u_{0})=\min\{p\cdot x:x\in V_{u_{0}}\}$
where $V_{u_{0}}=\{x\in \mathbb {R} _{+}^{L}:u(x)\geq u_{0}\}$. By the properties of $e(p,u)$, it is not too hard to show that $V_{u_{0}}=\{x\in \mathbb {R} _{+}^{L}:p\cdot x\geq e(p,u_{0})\}$. Doing some algebraic manipulation with the inequality $p\cdot x\geq e(p,u_{0})$, one can reconstruct $V_{u_{0}}$ in its original form with $u(x)\geq u_{0}$. If that is done, one has found a utility function $u:X\rightarrow \mathbb {R}$ that generates consumer demand $x(p,w)$.