Application Center - Maplesoft

App Preview:

Advanced Microeconomics: Slutsky Equation, Roy’s Identity and Shephard's Lemma

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Image 

 

 

 

Advanced Microeconomics:  

Slutsky Equation, Roy?s Identity and Shephard's Lemma 

 

 

The following was implemented in Maple by Marcus Davidsson (2008) davidsson_marcus@hotmail.com 

 

 

 

 

 

1) Marshallian Demand 

 

 

 

restart 

 

 

We assume that we have two goods: good one and good two.  

 

We now note that our utility function U is a function of  how much we consume of good one q[1] and how much we consume of good two q[2] .  

 

Where alpha and beta are utility elasticities for good one and good two. Our utility function is therefore given by 

 

`:=`(U(q[1], q[2]), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))) 

`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))) (1)
 

 

 

We now note that the price of good one is denoted by p[1] and the price of good two is denoted by p[2]  

 

Our budget constraint is therefore given by the equation below which says that our income Iota must be equal to the cost  

 

of spending from good one (p1*q1) plus the cost of spending from good two (p2*q2) 

 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (2)
 

 

 

 

In order to set up the Lagrange we have to write our budget constraint in an equal to zero form.  

 

The above equation can be written as 

 

`+`(Iota, `-`(`*`(p[1], `*`(q[1])))) = `*`(p[2], `*`(q[2])) 

`+`(Iota, `-`(`*`(p[1], `*`(q[1])))) = `*`(p[2], `*`(q[2])) (3)
 

or as 

 

`:=`(con, `+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2]))))) 

`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2])))) (4)
 

 

Our Lagrangian where our Lagrange multiplier is given by Psi is therefore given by 

 

`:=`(L, `+`(U(q[1], q[2]), `*`(Psi, `*`(con)))) 

`+`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))), `*`(Psi, `*`(`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2]))))))) (5)
 

 

 

We now maximize our utility function subject to the budget constraint by setting the first order conditions of the  

 

Lagrangian with respect to the q[1] and  q[2]equal to zero in order to solve for the Marshallian demands 

 

 

The first order conditions (foc's) are given by  

 

 

Foc 1 

 

diff(L, q[1]) = 0 

`+`(`/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(q[1])), `-`(`*`(Psi, `*`(p[1])))) = 0 (6)
 

We add `*`(Psi, `*`(p[1])) on both sides to get the equality 

 

`+`(lhs(%), `*`(Psi, `*`(p[1]))) = `+`(rhs(%), `*`(Psi, `*`(p[1]))) 

`/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(q[1])) = `*`(Psi, `*`(p[1])) (7)
 

`:=`(A, isolate(%, p[1])) 

p[1] = `/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(q[1], `*`(Psi))) (8)
 

 

 

Foc 2 

 

diff(L, q[2]) = 0 

`+`(`/`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta))), `*`(q[2])), `-`(`*`(Psi, `*`(p[2])))) = 0 (9)
 

We add `*`(Psi, `*`(p[2])) on both sides to get the equality 

 

`+`(lhs(%), `*`(Psi, `*`(p[2]))) = `+`(rhs(%), `*`(Psi, `*`(p[2]))) 

`/`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta))), `*`(q[2])) = `*`(Psi, `*`(p[2])) (10)
 

`:=`(B, isolate(%, p[2])) 

p[2] = `/`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta))), `*`(q[2], `*`(Psi))) (11)
 

 

Foc 3 

 

diff(L, Psi) 

`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2])))) (12)
 

`:=`(C, isolate(%, Iota)) 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (13)
 

 

Which is our initial budget constraint 

 

 

 

 

Manipulation of Equations 

 

 

We now note that we can divide A by B and still leave the mathematical logic intact. So we get  

 

`/`(`*`(p[1]), `*`(p[2])) = `/`(`*`(rhs(A)), `*`(rhs(B))) 

`/`(`*`(p[1]), `*`(p[2])) = `/`(`*`(alpha, `*`(q[2])), `*`(q[1], `*`(beta))) (14)
 

cross multiply 

 

`*`(numer(lhs(%)), `*`(denom(rhs(%)))) = `*`(denom(lhs(%)), `*`(numer(rhs(%)))) 

`*`(p[1], `*`(q[1], `*`(beta))) = `*`(p[2], `*`(alpha, `*`(q[2]))) (15)
 

 

Which means that we can write the previous equation as 

 

`:=`(AA, `/`(`*`(lhs(%)), `*`(beta)) = `/`(`*`(rhs(%)), `*`(beta))) 

`*`(p[1], `*`(q[1])) = `/`(`*`(p[2], `*`(alpha, `*`(q[2]))), `*`(beta)) (16)
 

or as 

 

`:=`(BB, `/`(`*`(rhs(`%%`)), `*`(alpha)) = `/`(`*`(lhs(`%%`)), `*`(alpha))) 

`*`(p[2], `*`(q[2])) = `/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha)) (17)
 

 

 

We know since previously that C is given by 

 

C 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (18)
 

 

If we plug in AA in C we get 

 

subs(`*`(p[1], `*`(q[1])) = `/`(`*`(p[2], `*`(alpha, `*`(q[2]))), `*`(beta)), C) 

Iota = `+`(`/`(`*`(p[2], `*`(alpha, `*`(q[2]))), `*`(beta)), `*`(p[2], `*`(q[2]))) (19)
 

simplify(%) 

Iota = `/`(`*`(p[2], `*`(q[2], `*`(`+`(alpha, beta)))), `*`(beta)) (20)
 

q[2] = solve(%, q[2]) 

q[2] = `/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))) (21)
 

 

This is the expression for the Marshallian demand for good two. 

 

 

 

 

 

If we plug in BB in C we get 

 

subs(`*`(p[2], `*`(q[2])) = `/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha)), C) 

Iota = `+`(`*`(p[1], `*`(q[1])), `/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha))) (22)
 

simplify(%) 

Iota = `/`(`*`(p[1], `*`(q[1], `*`(`+`(alpha, beta)))), `*`(alpha)) (23)
 

q[1] = solve(%, q[1]) 

q[1] = `/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))) (24)
 

 

This is the expression for the Marshallian demand for good one. 

 

 

 

We can now derive our indirect utility function for this Marshallian demand example.    

 

 

We plugin in the expressions for the Marshallian demand for good one and good two into our expenditure function Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

 

 

 

`:=`(U(q[1], q[2]), subs({q[1] = `/`(`*`(Iota, `*`(alpha)), `*`(`+`(p[1], t[1]), `*`(`+`(alpha, beta)))), q[2] = `/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta))))}, `*`(`^`(q[1], alpha), `*`... 

`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(`+`(p[1], t[1]), `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta))) (25)
 

 

 

This is the expression for the indirect utility function for the Marshallian Demand. 

 

 

 

 

We can now plot these two Marshallian demand functions q[1] and q[2]as follows. 

 

 

 

We assume that income is given by Iota = 100 and alpha = .3 which means that `and`(beta = `+`(1, `-`(alpha)), `and`(`+`(1, `-`(alpha)) = `+`(1, -.3), `+`(1, -.3) = .7)) since we have constant return to scale 

 

 

The Marshallian demand for good one is given by 

 

restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), p[1] = 1 .. 10, labels = [p[1], `*`(M, `*`(q[1]))], color =...
restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), p[1] = 1 .. 10, labels = [p[1], `*`(M, `*`(q[1]))], color =...
restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), p[1] = 1 .. 10, labels = [p[1], `*`(M, `*`(q[1]))], color =...
 

Plot_2d
 

 

 

We can see that when the price for good one p[1] increases the Marshallian demand for good one `*`(M, `*`(q[1])) decreases 

 

 

 

The Marshallian demand for good two is given by 

 

restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), p[2] = 1 .. 10, labels = [p[2], `*`(M, `*`(q[2]))], color = ...
restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), p[2] = 1 .. 10, labels = [p[2], `*`(M, `*`(q[2]))], color = ...
restart; 1; `:=`(Iota, 100); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), p[2] = 1 .. 10, labels = [p[2], `*`(M, `*`(q[2]))], color = ...
 

Plot_2d
 

 

 

We can see that when the price for good two p[2] increases the Marshallian demand for good two `*`(M, `*`(q[2])) decreases 

 

 

 

 

 

 

2) Hicksian Demand 

 

 

restart 

 

 

We assume that we have two goods: good one and good two.  

 

We now note that our utility function U is a function of  how much we consume of good one q[1] and how much we consume of good two q[2] .  

 

Where alpha and beta are utility elasticities for good one and good two. Our utility function is therefore given by 

 

`:=`(U(q[1], q[2]), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))) 

`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))) (26)
 

 

 

We now note that the price of good one is denoted by p[1] and the price of good two is denoted by p[2]  

 

Our budget constraint is therefore given by the equation below which says that our income Iota must be equal to the cost  

 

of spending from good one (p1*q1) plus the cost of spending from good two (p2*q2) 

 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (27)
 

 

 

We now note that instead of maximizing utility for a given income as in the previous example with Marshallian demands we will 

 

now minimize the amount of income spent for given a  target utility level let say v. This gives us the Hicksian demands for good one and good two . 

 

 

Our Lagrangian where our Lagrange multiplier is given by Psi is therefore given by 

 

 

`:=`(L, `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2])), `*`(Psi, `*`(`+`(v, `-`(U(q[1], q[2]))))))) 

`+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2])), `*`(Psi, `*`(`+`(v, `-`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))))))) (28)
 

 

The first order conditions (foc's) are given by  

 

 

Foc 1 

 

diff(L, q[1]) = 0 

`+`(p[1], `-`(`/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))), `*`(q[1])))) = 0 (29)
 

`+`(lhs(%), `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))), `*`(q[1]))) = `+`(rhs(%), `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))), `*`(q[1]))) 

p[1] = `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))), `*`(q[1])) (30)
 

`:=`(A, `/`(`*`(lhs(%), `*`(q[1])), `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))) = `/`(`*`(rhs(%), `*`(q[1])), `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))))) 

`/`(`*`(p[1], `*`(q[1])), `*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta))))) = Psi (31)
 

 

Foc 2 

 

diff(L, q[2]) = 0 

`+`(p[2], `-`(`/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))), `*`(q[2])))) = 0 (32)
 

`+`(lhs(%), `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))), `*`(q[2]))) = `+`(rhs(%), `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))), `*`(q[2]))) 

p[2] = `/`(`*`(Psi, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))), `*`(q[2])) (33)
 

`:=`(B, `/`(`*`(lhs(%), `*`(q[2])), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))) = `/`(`*`(rhs(%), `*`(q[2])), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta))))) 

`/`(`*`(p[2], `*`(q[2])), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta), `*`(beta)))) = Psi (34)
 

 

Foc 3 

 

diff(L, Psi) = 0 

`+`(v, `-`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))))) = 0 (35)
 

`:=`(C, `+`(lhs(%), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))) = `+`(rhs(%), `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))))) 

v = `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))) (36)
 

 

Which is our initial budget constraint 

 

 

 

Manipulation of Equations 

 

 

unprotect(D); -1 

 

`:=`(D, `*`(Psi, `/`(1, `*`(Psi))) = `/`(`*`(lhs(A)), `*`(lhs(B)))) 

1 = `/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha, `*`(p[2], `*`(q[2])))) (37)
 

isolate(D, q[2]) 

q[2] = `/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha, `*`(p[2]))) (38)
 

 

subs(q[2] = rhs(%), C) 

v = `*`(`^`(q[1], alpha), `*`(`^`(`/`(`*`(p[1], `*`(q[1], `*`(beta))), `*`(alpha, `*`(p[2]))), beta))) (39)
 

 

 

simplify(%, 'symbolic'); 1 

v = `*`(`^`(q[1], `+`(alpha, beta)), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))) (40)
 

 

 

isolate(%, q[1]) 

q[1] = `^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))) (41)
 

 

 

This is the expression for the Hicksian demand for good one 

 

 

 

isolate(D, q[1]) 

q[1] = `/`(`*`(alpha, `*`(p[2], `*`(q[2]))), `*`(p[1], `*`(beta))) (42)
 

subs(q[1] = rhs(%), C) 

v = `*`(`^`(`/`(`*`(alpha, `*`(p[2], `*`(q[2]))), `*`(p[1], `*`(beta))), alpha), `*`(`^`(q[2], beta))) (43)
 

simplify(%, 'symbolic'); 1 

v = `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(q[2], `+`(alpha, beta)), `*`(`^`(beta, `+`(`-`(alpha)))))))) (44)
 

isolate(%, q[2]) 

q[2] = `^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta, `+`(`-`(alpha)))))))), `/`(1, `*`(`+`(alpha, beta)))) (45)
 

 

This is the expression for the Hicksian demand for good two. 

 

 

We can now derive our indirect utility function for this Hicksian example.    

 

 

We plugin in the expressions for the Hicksian demand for good one and good two into our expenditure function Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

 

 

subs({q[1] = `^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))), q[2] = `^`(`/`(`*`(v), `*`(`^... 

Iota = `+`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))))), `*`(p[2], `*`(`... (46)
 

isolate(%, v) 

v = `*`(`^`(`/`(`*`(Iota), `*`(`+`(p[1], `*`(p[2], `*`(`^`(`*`(`^`(p[1], `+`(alpha, beta)), `*`(`^`(alpha, `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(alpha), `-`(beta))), `*`(`^`(beta, `+`(alp... (47)
 

simplify(%, 'symbolic') 

v = `*`(`^`(Iota, `+`(alpha, beta)), `*`(`^`(alpha, alpha), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(`+`(alpha, beta), `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta))))... (48)
 

 

 

This is the expression for the indirect utility function for the Hicksian Demand. 

 

 

 

We can now plot these two Hicksian demand functions q[1] and q[2].  

 

 

 

We assume that income is given by v = 100 and alpha = .3 which means that `and`(beta = `+`(1, `-`(alpha)), `and`(`+`(1, `-`(alpha)) = `+`(1, -.3), `+`(1, -.3) = .7)) since we have constant return to scale 

 

 

The Hicksian demand for good one is given by 

 

restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^...
restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^...
restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^...
 

Plot_2d
 

 

 

 

We can see that when the price for good one p[1] increases the Hicksian demand  for good one `*`(H, `*`(q[1])) decreases 

 

 

 

 

The Hicksian demand for good two is given by 

 

 

restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta,...
restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta,...
restart; 1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; plot(`^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta,...
 

Plot_2d
 

 

 

 

We can see that when the price for good two p[2] increases the Hicksian demand  for good two `*`(H, `*`(q[2])) decreases 

 

 

 

 

 

 

 

3)  The Relationship Between Marshallian and Hicksian Demand:  The Slutsky Equation  

 

 

 

 

We start by comparing the two demand curves for the Marshallian and Hicksiand demand for the two goods 

 

 

For good one we get: 

 

restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[2], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta))))...
 

Plot_2d
 

 

 

For good two we get: 

 

restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
restart; 1; with(plots); -1; `:=`(v, 20); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 5); -1; `:=`(Iota, 100); -1; `:=`(A, plot(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))),...
 

Plot_2d
 

 

 

 

 

 

We are now going to discuss the relationship between the Marshallian demand and the Hicksian demand. through the Slutsky equation  

 

The Slutsky equation relates the changes in Marshallian demand to changes in Hicksian demand.  

 

The general formula for Slutsky equation is given by 

 

 

diff(`*`(M, `*`(q[i])), p[i]) = `+`(diff(`*`(H, `*`(q[i])), p[i]), `-`(`*`(diff(`*`(M, `*`(q[i])), Iota), `*`(M, `*`(q[i]))))) 

 

 

which says that the partial derivative of the marshillian demand for good i with respect to the price of good i is equal to  

 

partial derivative of the Hicksian demand for good i with respect to the price of good i  minus the partial derivative of the marshillian demand for good i  

 

with respect to income multiplied by marshillian demand for good i.  

 

 

 

 

For good one we get: 

 

 

 

restart; -1 

 

 

Expression on left hand side of the Slutsky Equation 

 

diff(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), p[1]) 

`+`(`-`(`/`(`*`(Iota, `*`(alpha)), `*`(`^`(p[1], 2), `*`(`+`(alpha, beta)))))) (49)
 

 

 

The first expression on the right hand side on the Slutsky Equation 

 

 

The expression for q[1] is given by 

 

simplify(diff(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))), p[1]), 'symbolic') 

`+`(`-`(`/`(`*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `+`(`-`(`/`(`*`(`+`(`*`(2, `*`(beta)), alpha)), `*`(`+`(alpha, beta)))))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `... (50)
 

 

We now substitute in the expression for the indirect utility function for the Hicksian demand 

 

subs(v = `*`(`^`(Iota, `+`(alpha, beta)), `*`(`^`(alpha, alpha), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(`+`(alpha, beta), `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, bet... 

`+`(`-`(`/`(`*`(`^`(`*`(`^`(Iota, `+`(alpha, beta)), `*`(`^`(alpha, alpha), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(`+`(alpha, beta), `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^... (51)
 

`:=`(L1, simplify(%, 'symbolic')) 

`+`(`-`(`/`(`*`(Iota, `*`(alpha, `*`(beta))), `*`(`^`(p[1], 2), `*`(`^`(`+`(alpha, beta), 2)))))) (52)
 

 

 

The second expression on the right hand side on the Slutsky Equation 

 

 

`:=`(L2, simplify(`/`(`*`(diff(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), Iota), `*`(Iota, `*`(alpha))), `*`(p[1], `*`(`+`(alpha, beta)))))) 

`/`(`*`(`^`(alpha, 2), `*`(Iota)), `*`(`^`(p[1], 2), `*`(`^`(`+`(alpha, beta), 2)))) (53)
 

 

We can now finish up by subtracting L2 from L1 and verify that this is indeed the same expression as the  

 

partial derivative of the marshillian demand for good one with respect to the price of good one 

 

 

simplify(`+`(L1, `-`(L2))) 

`+`(`-`(`/`(`*`(Iota, `*`(alpha)), `*`(`+`(alpha, beta), `*`(`^`(p[1], 2)))))) (54)
 

 

Which indeed is the same expression we had before for the partial derivative of the marshillian demand for good one with respect to the price of good one which was given by: 

 

diff(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), p[1]) 

`+`(`-`(`/`(`*`(Iota, `*`(alpha)), `*`(`+`(alpha, beta), `*`(`^`(p[1], 2)))))) (55)
 

 

 

 

For good two we get: 

 

 

 

Expression on left hand side of the Slutsky Equation 

 

diff(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), p[2]) 

`+`(`-`(`/`(`*`(Iota, `*`(beta)), `*`(`^`(p[2], 2), `*`(`+`(alpha, beta)))))) (56)
 

 

 

The first expression on the right hand side on the Slutsky Equation 

 

 

The expression for q[1] is given by 

 

simplify(diff(`^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta, `+`(`-`(alpha)))))))), `/`(1, `*`(`+`(alpha, beta)))), p[2]), 'symbolic') 

`+`(`-`(`/`(`*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `/`(`*`(alpha), `*`(`+`(alpha, beta)))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `*`(`^`(p[2], `+`(`-`(`/`(`*`(`+`(`... (57)
 

 

We now substitute in the expression for the indirect utility function for the Hicksian demand 

 

subs(v = `*`(`^`(Iota, `+`(alpha, beta)), `*`(`^`(alpha, alpha), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(`+`(alpha, beta), `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, bet... 

`+`(`-`(`/`(`*`(`^`(`*`(`^`(Iota, `+`(alpha, beta)), `*`(`^`(alpha, alpha), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(`+`(alpha, beta), `+`(`-`(alpha), `-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^... (58)
 

 

 

`:=`(L1, simplify(%, 'symbolic')) 

`+`(`-`(`/`(`*`(Iota, `*`(alpha, `*`(beta))), `*`(`^`(`+`(alpha, beta), 2), `*`(`^`(p[2], 2)))))) (59)
 

 

 

The second expression on the right hand side on the Slutsky Equation 

 

 

`:=`(L2, simplify(`/`(`*`(diff(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), Iota), `*`(Iota, `*`(beta))), `*`(p[2], `*`(`+`(alpha, beta)))))) 

`/`(`*`(`^`(beta, 2), `*`(Iota)), `*`(`^`(p[2], 2), `*`(`^`(`+`(alpha, beta), 2)))) (60)
 

 

 

 

We can now finish up by subtracting L2 from L1 and verify that this is indeed the same expression as the  

 

partial derivative of the marshillian demand for good one with respect to the price of good one 

 

 

simplify(`+`(L1, `-`(L2))) 

`+`(`-`(`/`(`*`(Iota, `*`(beta)), `*`(`+`(alpha, beta), `*`(`^`(p[2], 2)))))) (61)
 

 

Which indeed is the same expression we had before for the partial derivative of the marshillian demand for good two with respect to the price of good two which was given by: 

 

diff(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), p[2]) 

`+`(`-`(`/`(`*`(Iota, `*`(beta)), `*`(`+`(alpha, beta), `*`(`^`(p[2], 2)))))) (62)
 

 

 

 

 

4) Roy?s Identity and Marshallian Demands 

 

 

 

restart; 1 

 

 

We can also estimate the Marshallian demands by using Roys Identity which starts from the indirect utility function Vfor the Marshallian demand and  

 

derives the corresponding Marshallian demand functions q[1] and q[2]. The general formula for Roys Identity is given by 

 

 

q[i] = `+`(`-`(`/`(`*`(diff(V, p[i])), `*`(diff(V, Iota))))) 

 

 

which says that the Marshillian demand for good i is equal to the partial derivative of the indirect utility function for the Marshallian demand with respect 

 

to the price of good i divided by the partial derivative of the indirect utility function for the Marshallian demand with respect to the income.  

 

 

 

We know since previously that our indirect utility function for the Marshallian demand  is given by 

 

`:=`(V, `*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta)))) 

`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta))) (63)
 

 

 

For good one we get: 

 

 

This means that according to Roys Identity the marsihilian demand for good one is given by 

 

 

q1 = `+`(`-`(`/`(`*`(diff(V, p[1])), `*`(diff(V, Iota))))) 

q1 = `/`(`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(alpha, `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta)))), `*`(p[1], `*`(`+`(`/`(`... (64)
 

simplify(%) 

q1 = `/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))) (65)
 

Which is the same expressions that we had before for the marsihilian demand for good one which was given by 

 

q[1] = `/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))) 

q[1] = `/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))) (66)
 

 

For good two we get: 

 

 

This means that according to Roys Identity the marsihilian demand for good two is given by 

 

 

q2 = `+`(`-`(`/`(`*`(diff(V, p[2])), `*`(diff(V, Iota))))) 

q2 = `/`(`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta), `*`(beta))), `*`(p[2], `*`(`+`(`/`(`*... (67)
 

simplify(%) 

q2 = `/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))) (68)
 

 

Which is the same expressions that we had before for the marsihilian demand for good two which was given by 

 

q[2] = `/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))) 

q[2] = `/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))) (69)
 

 

 

 

 

 

5) Roy?s Identity and the Lagrange Multiplier 

 

 

 

Note that the expression in the denominator for Roy's Identity diff(V, Iota) where again Roys Identity is given by 

 

 

q[i] = `+`(`-`(`/`(`*`(diff(V, p[i])), `*`(diff(V, Iota))))) 

 

 

is equal to the Lagrange multiplier in the consumer optimization example. The Lagrange multiplier and the expression  diff(V, Iota) is the  

 

consumers Marginal Utility of Income which measure how much extra utility the consumer get if we increase the constraint in form of income with one unit 

 

 

 

 

 

 

We can first prove that  the Lagrange multiplier measure how much extra utility we get if we increase income with one unit 

 

 

 

Step-1) The maximized utility and optimal quantities of good one and two when Ι=1000 are given by 

 

 

restart; -1 

 

`:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 3); -1; `:=`(p[2], 2); -1; `:=`(Iota, 1000); -1 

`:=`(ob, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))); -1 

`:=`(con, [`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2])))) = 0]); -1 

with(Optimization); -1 

Maximize(ob, con, iterationlimit = 1000); 1 

[240.351939534954738, [q[1] = 100.000000000438874, q[2] = 349.999999999341638]] (70)
 

The maximize utility when Ι=1000 is therefore given by 

u[1] = %[1] 

u[1] = 240.351939534954738 (71)
 

and the optimal quantities of good one and two are given by 

 

q[1] = 100.000000000438874 

q[1] = 100.000000000438874 (72)
 

q[2] = 349.999999999341638 

q[2] = 349.999999999341638 (73)
 

 

 

 

Step-2) For our consumer optimization example the Lagrange was given by 

 

 

restart; -1 

 

`:=`(L, `+`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))), `*`(Psi, `*`(`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2])))))))) 

`+`(`*`(`^`(q[1], alpha), `*`(`^`(q[2], beta))), `*`(Psi, `*`(`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2]))))))) (74)
 

diff(L, q[1]) = 0 

`+`(`/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(q[1])), `-`(`*`(Psi, `*`(p[1])))) = 0 (75)
 

`+`(hs(%), `*`(Psi, `*`(p[1]))) = `+`(rhs(%), `*`(Psi, `*`(p[1]))) 

`+`(hs(`+`(`/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(q[1])), `-`(`*`(Psi, `*`(p[1])))) = 0), `*`(Psi, `*`(p[1]))) = `*`(Psi, `*`(p[1])) (76)
 

`:=`(A, isolate(%, Psi)) 

Psi = `/`(`*`(`^`(q[1], alpha), `*`(alpha, `*`(`^`(q[2], beta)))), `*`(p[1], `*`(q[1]))) (77)
 

if we now plug in the optimal values of q[1] and q[2] and the parameter values we get  

 

`:=`(q[1], 100.000000000438874); -1; `:=`(q[2], 349.999999999341638); -1; `:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 3); -1; `:=`(p[2], 2); -1; `:=`(Iota, 1000); -1 

 

A 

Psi = .2403519396 (78)
 

 

Which means that according to our theory the difference in maximized utility when Ι=1000 and when Ι=1001 should be 0.2403 

 

 

 

 

Step-3) We now increase income with one unit from 1000 to 1001 so we get 

 

 

restart 

`:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 3); -1; `:=`(p[2], 2); -1; `:=`(Iota, 1001); -1 

`:=`(ob, `*`(`^`(q[1], alpha), `*`(`^`(q[2], beta)))); -1 

`:=`(con, [`+`(Iota, `-`(`*`(p[1], `*`(q[1]))), `-`(`*`(p[2], `*`(q[2])))) = 0]); -1 

with(Optimization); -1 

Maximize(ob, con, iterationlimit = 1000); 1 

[240.592291474489713, [q[1] = 100.100000000438158, q[2] = 350.349999999342742]] (79)
 

 

The maximize utility when Ι=1001 is therefore given by 

u[2] = %[1] 

u[2] = 240.592291474489713 (80)
 

 

 

 

Step-4) If we now subtract u[1]from u[2]. This gives us 

 

 

 

`+`(240.592291474489713, -240.351939534954738) 

.2403520 (81)
 

 

Which is the same value as the Lagrange multiplier had 

 

 

 

 

 

 

 

We can now prove that diff(V, Iota)is the same as the Lagrange multiplier in the consumer optimization example 

 

 

 

restart; 1 

 

 

# We now since previously that our indirect utility function for the Marshallian example is given by 

 

`:=`(V, `*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta)))) 

`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta))) (82)
 

`:=`(multiplier, diff(V, Iota)) 

`+`(`/`(`*`(`^`(`/`(`*`(Iota, `*`(alpha)), `*`(p[1], `*`(`+`(alpha, beta)))), alpha), `*`(alpha, `*`(`^`(`/`(`*`(Iota, `*`(beta)), `*`(p[2], `*`(`+`(alpha, beta)))), beta)))), `*`(Iota)), `/`(`*`(`^`(... (83)
 

 

We again assume that 

`:=`(alpha, .3); -1; `:=`(beta, .7); -1; `:=`(p[1], 3); -1; `:=`(p[2], 2); -1; `:=`(Iota, 1000); -1 

 

Which means that V is given by 

 

multiplier 

.2403519396 (84)
 

 

Which again is the same value as the Lagrange multiplier had previously 

 

 

 

 

 

 

 

 

 

6) Shephard's Lemma: Hicksian Demand and the Expenditure Function 

 

 

 

restart; 1 

 

 

We can also estimate the Hicksian demands by using Shephard's lemma which stats that the partial derivative of the expenditure function Ι  

 

with respect to the price i is equal to the Hicksian demand for good i.   

 

 

The general formula for Shephards lemma is given by 

 

 

q[i] = diff(Iota, p[i]) 

 

 

 

For good one we get: 

 

 

We know since previously that the Hicksian demand for good one is given by 

 

q[1] = `^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))) 

q[1] = `^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))) (85)
 

Which can be written as 

 

simplify(%, 'symbolic') 

q[1] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `+`(`-`(`/`(`*`(beta), `*`(`+`(alpha, beta)))))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `*`(`^`(p[2], `/`(`*`(beta), `*... (86)
 

 

This means in order for Shephards lemma to work the partial derivative of the expenditure function Ι  

 

with respect to the price of good one must be equal to this expression. Our expenditure function is given by 

 

 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (87)
 

 

If we substitute in the expressions for the Hicksian demand for good 1 and good 2 we get  

 

Iota = `+`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))))), `*`(p[2], `*`(`... 

Iota = `+`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))))), `*`(p[2], `*`(`... (88)
 

 

 

The partial derivative of the above function with respect to the price of good one is therefore given by 

 

 

diff(rhs(%), p[1]) 

`+`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))), `-`(`/`(`*`(`^`(`/`(`*`(v), `*`(`^`(p[... (89)
 

Which can be written as 

 

q[1] = simplify(%, 'symbolic') 

q[1] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `+`(`-`(`/`(`*`(beta), `*`(`+`(alpha, beta)))))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `*`(`^`(p[2], `/`(`*`(beta), `*... (90)
 

 

 

 

Which we can see is the same expression that we had previously for the Hicksian demand for good one given by 

 

q[1] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `+`(`-`(`/`(`*`(beta), `*`(`+`(alpha, beta)))))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `*`(`^`(p[2], `/`(`*`(beta), `*... 

q[1] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `+`(`-`(`/`(`*`(beta), `*`(`+`(alpha, beta)))))), `*`(`^`(alpha, `/`(`*`(beta), `*`(`+`(alpha, beta)))), `*`(`^`(p[2], `/`(`*`(beta), `*... (91)
 

 

. 

 

Which means that Shephards Lemma seams to work for good one. 

 

 

 

 

For good two we get: 

 

 

We know since previously that the Hicksian demand for good two is given by 

 

q[2] = `^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta, `+`(`-`(alpha)))))))), `/`(1, `*`(`+`(alpha, beta)))) 

q[2] = `^`(`/`(`*`(v), `*`(`^`(p[1], `+`(`-`(alpha))), `*`(`^`(alpha, alpha), `*`(`^`(p[2], alpha), `*`(`^`(beta, `+`(`-`(alpha)))))))), `/`(1, `*`(`+`(alpha, beta)))) (92)
 

Which can be written as 

 

simplify(%, 'symbolic') 

q[2] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `/`(`*`(alpha), `*`(`+`(alpha, beta)))), `*`(`^`(alpha, `+`(`-`(`/`(`*`(alpha), `*`(`+`(alpha, beta)))))), `*`(`^`(p[2], `+`(`-`(`/`(`*`... (93)
 

 

This means in order for Shephards lemma to work the partial derivative of the expenditure function Ι  

 

with respect to the price of good two must be equal to this expression. Our expenditure function is given by 

 

 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) 

Iota = `+`(`*`(p[1], `*`(q[1])), `*`(p[2], `*`(q[2]))) (94)
 

 

If we substitute in the expressions for the Hicksian demand for good 1 and good 2 we get  

 

Iota = `+`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))))), `*`(p[2], `*`(`... 

Iota = `+`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))))), `*`(p[2], `*`(`... (95)
 

 

 

The partial derivative of the above function with respect to the price of good two is therefore given by 

 

 

diff(rhs(%), p[2]) 

`+`(`/`(`*`(p[1], `*`(`^`(`/`(`*`(v), `*`(`^`(p[1], beta), `*`(`^`(alpha, `+`(`-`(beta))), `*`(`^`(p[2], `+`(`-`(beta))), `*`(`^`(beta, beta)))))), `/`(1, `*`(`+`(alpha, beta)))), `*`(beta))), `*`(`+`... (96)
 

Which can be written as 

 

q[2] = simplify(%, 'symbolic') 

q[2] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `/`(`*`(alpha), `*`(`+`(alpha, beta)))), `*`(`^`(alpha, `+`(`-`(`/`(`*`(alpha), `*`(`+`(alpha, beta)))))), `*`(`^`(p[2], `+`(`-`(`/`(`*`... (97)
 

 

 

Which we can see is the same expression that we had previously for the Hicksian demand for good two given by. 

 

q[2] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `/`(`*`(alpha), `*`(`+`(alpha, beta)))), `*`(`^`(alpha, `+`(`-`(`/`(`*`(alpha), `*`(`+`(alpha, beta)))))), `*`(`^`(p[2], `+`(`-`(`/`(`*`... 

q[2] = `*`(`^`(v, `/`(1, `*`(`+`(alpha, beta)))), `*`(`^`(p[1], `/`(`*`(alpha), `*`(`+`(alpha, beta)))), `*`(`^`(alpha, `+`(`-`(`/`(`*`(alpha), `*`(`+`(alpha, beta)))))), `*`(`^`(p[2], `+`(`-`(`/`(`*`... (98)
 

 

 

Which means that Shephards lemma seams to work for good two as well. 

 

 

 

 

 

 

 

 

Legal Notice: The copyright for this application is owned by the authors. Neither Maplesoft nor the authors are responsible for any errors contained within and are not liable for any damages resulting from the use of this material.  This application is intended for non-commercial, non-profit use only. Contact the authors for permission if you wish to use this application in for-profit activities.