Demand Systems Adding Up

TheoryGuru applications

Load Economicreasoning package only if it is not already loaded

If[Length@Names["PLTools`*"]<10,
Get["http://economicreasoning.com"]]

Notes

∇u[x], x, p, (Subscript[h, i]), s, (Subscript[ϵH, i]) are each automatically recognized as vectors with length equal to the number of commodities.  That number must not be less than one but is otherwise arbitrary.

In the Wolfram Language, x.y refers to the tensor DOT PRODUCT, NOT scalar multiplication.  For TheoryGuru purposes, tensor means vector, so that the result of x.y is a scalar.

Setup

Consumer first-order conditions, as a vector equation

∇u[x]=λ p;

nonsatiation={λ>0,income>0};

Differentiate it with respect to (Subscript[p, i])

dutility=∇u[x].(Subscript[h, i])==0;(* (Subscript[h, i]) is a vector of impacts of (Subscript[p, i]) on each Hicksian quantity choice *)

Definition of price elasticities

defineelas=p.(Subscript[h, i])==income s.(Subscript[ϵH, i]);
(* (Subscript[ϵH, i]) is a vector of the (Hicksian) elasticity of each quantity demanded with respect to (Subscript[p, i]) *)

Result: “Adding up”

TheoryGuru[{dutility,defineelas,nonsatiation},s.(Subscript[ϵH, i])==0]

TheorySpace[]

Variable interpretations

Element-by-element notation with 4 goods

WLOG, impact of (Subscript[p, 1])

commodityvector4=(Subscript[x, #])&/@Range@4
pricevector4=(Subscript[p, #])&/@Range@4
sharevector4=(Subscript[s, #])&/@Range@4
p1impactvector4=D[(Subscript[h, #])@@pricevector4&/@Range@4,(Subscript[p, 1])]
elasvector4=(Subscript[ϵH, #,1])&/@Range@4

Confirm vector representation of consumer first-order conditions

Column@Thread[(Subscript[∇, commodityvector4])u@@commodityvector4==λ pricevector4]

Column@Thread[(Subscript[∇, commodityvector4])u@@commodityvector4->λ pricevector4]/.(Subscript[x, i_])->(Subscript[h, i])@@pricevector4

u@@commodityvector4/.(Subscript[x, i_])->(Subscript[h, i])@@pricevector4

D[u@@commodityvector4/.(Subscript[x, i_])->(Subscript[h, i])@@pricevector4,(Subscript[p, 1])]==0/.
(Thread[(Subscript[∇, commodityvector4])u@@commodityvector4->λ pricevector4]/.(Subscript[x, i_])->(Subscript[h, i])@@pricevector4)

dutility/.{p->pricevector4,(Subscript[h, i])-> p1impactvector4}

Confirm vector representation of elasticity definition

p.(Subscript[h, 1])==income s.(Subscript[ϵH, 1])/.
{p->pricevector4,(Subscript[h, 1])-> p1impactvector4,s->sharevector4,(Subscript[ϵH, 1])->elasvector4}/.

(* definition of elasticy *){(Subscript[p, i_])D[(Subscript[h, i_])[(Subscript[p, 1]),(Subscript[p, 2]),(Subscript[p, 3]),(Subscript[p, 4])],(Subscript[p, 1])]->income (Subscript[s, i])(Subscript[ϵH, i,1])}//

FullSimplify