Implication of Lagrangean

Consumer Behavior

u[x1_, x2_] := a Log[x1] +  b Log[x2]

G[x1_, x2_] := m  -  p1 x1  -  p2 x2

D[u[x1, x2], x1]

(a/x1)

D[u[x1, x2], x2]

(b/x2)

D[u[x1, x2], x1]/D[u[x1, x2], x2]

((a x2)/(b x1))

Solve[{D[u[x1, x2], x1]/D[u[x1, x2], x2] == p1/p2, 
          m  -  p1 x1  -  p2 x2 == 0}, {x1, x2}]

{{x1 -> ((a m)/((a + b) p1)), 
          x2 -> ((b m)/((a + b) p2))}}

u

m  -  p1 x1  -  p2 x2

p1 x1  +  p2 x2 /.{{x1 -> ((a m)/((a + b) p1)), 
            x2 -> ((b m)/((a + b) p2))}}//Simplify

{m}

f[p1_, p2_, m_]:=u[x1, x2]/.{x1 -> ((a m)/((a + b) p1)), 
              x2 -> ((b m)/((a + b) p2))}

a Log[((a m)/((a + b) p1))] + 
        b Log[((b m)/((a + b) p2))]

D[f[p1, p2, m], m]

(a/m) + (b/m)

L[x1_, x2_, l_] := 
        u[x1, x2]  +  l (m  -  p1 x1  -  p2 x2)

Solve[{D[L[x1, x2, l], x1] == 0, 
          D[L[x1, x2, l], x2] == 0, 
          D[L[x1, x2, l], l] == 0 }, {x1, x2, l}]

{{l -> ((a + b)/m), 
          x1 -> ((a m)/((a + b) p1)), 
          x2 -> ((b m)/((a + b) p2))}}

v[x1_, x2_] := a Log[x1]  +  b x2

LL[x1_, x2_, l_] := 
        v[x1, x2]  +  l (m  -  p1 x1  -  p2 x2)

Solve[{D[LL[x1, x2, l], x1] == 0, 
          D[LL[x1, x2, l], x2] == 0, 
          D[LL[x1, x2, l], l] == 0 }, {x1, x2, l}]

{{x2 -> ((b m - a p2)/(b p2)), l -> (b/p2), 
          x1 -> ((a p2)/(b p1))}}

Producer Behavior

F[x1_, x2_] :=  x1^a x2^(1 - a)