Chapter 2

[1]

Plot[(x^(1/3)), {x, 0, 2}]

[2]

Plot[(x^(1/3)), {x, 0, 2}, AxesLabel -> {x, u}, 
      GridLines -> Automatic, AspectRatio -> 0.7, 
      PlotStyle -> {Thickness[0.006]}]

[3]

(∂_x) (x^(1/3))

[4]

u[x_] := (x^(1/3)); u'[x]

[5]

sessenn[a_]:=Module[{u},u[x_] := (x^(1/3));Plot[{u[x],u'[a] (x - a)+u[a]},{x, 0, 4}]]

[6]

sessenn[1.3]

[7]

gr[t_]:=Plot[u'[t] (x - t) u[t],{x,t-(1/(Sqrt[((u'[t])^2)+1])),t+(Sqrt[((u'[t])^2)+1])},PlotStyle -> {Thickness[0.001]},DisplayFunction -> Identity]

[8]

sessenn3[a1_, a2_, a3_]:=Module[{u, gr1, gr2},u[x_] := (x^(1/3));gr1 = Plot[u[x], {x, 0, 4}, 
                PlotStyle -> {Thickness[0.001]}, 
                DisplayFunction -> Identity];gr2[t_]:=Plot[u'[t] (x - t)+u[t],{x,t-(1/(Sqrt[((u'[t])^2)+1])),t+(1/(Sqrt[((u'[t])^2)+1]))},PlotStyle -> Thickness[0.001],DisplayFunction -> Identity];Show[{gr1, gr2[a1], gr2[a2], gr2[a3]}, 
              DisplayFunction -> $DisplayFunction, Axes -> True, 
              AspectRatio -> 0.8, 
              PlotRange -> {{-0.5, 4}, {0, 1.6}}]]

[9]

sessenn3[0.2, 1.2, 2.4]u[x_] := (x^(1/3)); Plot[{u[x],u'[x]},{x, 0.001, 2},PlotRange -> {0, 3},PlotStyle -> {{}, {Dashing[{0.01}]}}]

[10]

u[x_] := (x^(1/3)); u''[x]

[11]

(∂_(x, x))(x^(1/3))

[12]

u[x_] := (x^(1/3)); Plot[{u[x],u'[x],u''[x]},{x, 0.001, 2},PlotRange -> {-3, 3},PlotStyle -> {{}, {Dashing[{0.01}]}, {Dashing[{0.03}]}}]

[13]

Plot[Evaluate[Table[(x^t), {t, 0.1, 0.9, 0.1}]], {x, 0, 1.5}, 
      PlotStyle -> {Thickness[0.001]}, AspectRatio -> 0.8]

[14]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); TableForm[Table[{{x1, x2}, N[u[x1, x2], 3]}, {x1, 0, 5. }, {x2, 0, 5}]]

[15]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); sen = 
      Table[Line[{{x1, x2, 0}, {x1, x2, u[x1, x2]}}], {x1, 0, 5}, {x2, 0, 
          5}]; Show[Graphics3D[{Thickness[0.01], sen}], Axes -> True, 
      AxesLabel -> {x1, x2, u}, BoxRatios -> {1, 1, 0.8}]

[16]

Show[
      Graphics3D[
        Table[Point[{x1, x2, u[x1, x2]}], {x1, 0, 5, 0.2}, {x2, 0, 5, 0.2}]], 
      BoxRatios -> {1, 1, 0.7}]

[17]

Plot3D[(x1^(1/3)) (x2^(2/3)), {x1, 0, 4}, {x2, 0, 4}]

[18]

Plot3D[(x1^(1/3)) (x2^(2/3)), {x1, 0, 4}, {x2, 0, 4}, 
      BoxRatios -> {1, 1, 0.7}, AxesLabel -> {x1, x2, u}, 
      ViewPoint -> {-4, -2, 0.7}]

[19]

jiku1 = {Line[{{0, 0, 0}, {5, 0, 0}}], 
        Polygon[{{5, 0, 0}, {4.3, 0.3, 0}, {4.6, 0, 0}, {4.3, -0.3, 0}, {
              5, 0, 0}}]}; jiku2 = {Line[{{0, 0, 0}, {0, 5, 0}}], 
        Polygon[{{0, 5, 0}, {0.3, 4.3, 0}, {0, 4.6, 0}, {-0.3, 4.3, 0}, {
              0, 5, 0}}]}; jiku3 = {Line[{{0, 0, 0}, {0, 0, 5}}], 
        Polygon[{{0, 0, 5}, {0.3, 0, 4.3}, {0, 0, 4.6}, {-0.3, 0, 4.6}, {
              0, 0, 5}}]}; namae = {Text["x1", {6, 0, 0}], Text["x2", {0, 6, 0}], 
        Text["u", {0, 0, 6}]}; gr3 = 
      Plot3D[(x1^(1/3)) (x2^(2/3)), {x1, 0, 4}, {x2, 0, 4}, 
        Boxed -> False, DisplayFunction -> Identity]; Show[{gr3, Graphics3D[{jiku1, jiku2, jiku3, namae}]}, 
      DisplayFunction -> $DisplayFunction, Boxed -> False, 
      BoxRatios -> {1, 1, 0.7}, AxesLabel -> {x1, x2, u}, 
      ViewPoint -> {-4, -2, 0.7}, Axes -> False]

[20]

Plot3D[(x1^(1/3)) (x2^(2/3)), {x1, 0, 4}, {x2, 2, 4}, 
      PlotRange -> {{0, 4}, {0, 4}, {0, 4}}, PlotPoints -> 25, 
      AxesLabel -> {x1, x2, u}, BoxRatios -> {1, 1, 0.7}, 
      ViewPoint -> {-1, -2, 0.7}]

[21]

Module[{u, gr1, gr2}, u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); 
      gr1 = ParametricPlot3D[{x1, 2, u[x1, 2]}, {x1, 0, 4}, 
          DisplayFunction -> Identity]; 
      gr2 = Table[Line[{{x1, 2, 0}, {x1, 2, u[x1, 2]}}], {x1, 0, 4, 0.1}]; 
      Show[{gr1, Graphics3D[gr2]}, 
        PlotRange -> {{0, 4}, {0, 4}, {0, 4}}, 
        DisplayFunction -> $DisplayFunction, 
        BoxRatios -> {1, 1, 0.7}, 
        ViewPoint -> {-1, -2, 0.7}]]

[22]

(∂_x1)((x1^(1/3)) (x2^(2/3)))

[23]

(∂_x2)((x1^(1/3)) (x2^(2/3)))

[24]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); Derivative[1, 0][u][x1, x2]

[25]

Derivative[0, 1][u][x1, x2]

[26]

Derivative[1, 0][u][1.2, 2. ]

[27]

Derivative[0, 1][u][1.2, 2. ]

[28]

MU1[x1_, x2_]:=Derivative[1, 0][u][x1, x2];MU2[x1_, x2_]:=Derivative[0, 1][u][x1, x2];

[29]

{MU1[1.2, 2. ], MU2[1.2, 2. ]}

[30]

u[x1_, x2_] := (x1^a) (x2^b); MU1[x1_, x2_]:=Derivative[1, 0][u][x1, x2];MU2[x1_, x2_]:=Derivative[0, 1][u][x1, x2];{MU1[x1, x2], MU2[x1, x2]}

[31]

{MU1[3. , 2. ], MU2[3. , 2. ]} /. {a -> (1/4), b -> (3/4)}

[32]

Module[{u, gr1, gr2},u[x1_, x2_] := (x1^(1/3)) (x2^(2/3));m=Derivative[1, 0][u][1.2, 2];gr1 = ParametricPlot3D[{{x1, 2, u[x1, 2]}, {x1, 2, 
                  m (x1 - 1.2) + u[1.2, 2]}}, {x1, 0, 4}, 
              DisplayFunction -> Identity];gr2 = Table[
              Line[{{x1, 2, 0}, {x1, 2, u[x1, 2]}}], {x1, 0, 4, 0.1}];Show[{gr1, Graphics3D[gr2]}, 
            PlotRange -> {{0, 4}, {0, 4}, {0, 4}}, 
            DisplayFunction -> $DisplayFunction, 
            AxesLabel -> {x1, x2, utility}, 
            BoxRatios -> {1, 1, 0.7}, 
            ViewPoint -> {-1, -2, 0.7}]]

[33]

(∂_(x1, x1))((x1^(1/3)) (x2^(2/3)))

[34]

(∂_(x1, x2))((x1^(1/3)) (x2^(2/3)))

[35]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); Derivative[0, 2][u][x1, x2]

[36]

u[x1_, x_ 2] := (x1^(1/3)) (x2^(2/3)); Derivative[1, 1][u][x1, x2]

[37]

<< "Graphics`ImplicitPlot`"

[38]

ImplicitPlot[(x1^(1/3)) (x2^(2/3)) == 1.2, {x1, 0, 4}, 
      PlotRange -> {{0, 4}, {0, 4}}]

[39]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); ImplicitPlot[{u[x1, x2] == 0.8, u[x1, x2] == 1.5, u[x1, x2] == 2.4}, {
        x1, 0, 4}, AxesLabel -> {x1, x2}, 
      PlotRange -> {{0, 4}, {0, 4}}]

[40]

ContourPlot[(x1^(1/3)) (x2^(2/3)), {x1, 0, 4}, {x2, 0, 4}]

[41]

tangentplane[a_, b_]:=Module[{u},u[x1_, x2_] := (x1^(1/3)) (x2^(2/3));mu1=Derivative[1, 0][u][a, b];mu2=Derivative[0, 1][u][a, b];gr1 = Plot3D[u[x1, x2], {x1, 0, 4}, {x2, 0, 4}, 
                DisplayFunction -> Identity];gr2 = Plot3D[
                mu1 (x1 - a) + mu2 (x2 - b) + u[a, b], {x1, 
                  a - 0.8, a + 0.8}, {x2, b - 0.8, b + 0.8}, 
                DisplayFunction -> Identity];Show[{gr1, gr2}, DisplayFunction -> $DisplayFunction, 
              BoxRatios -> {1, 1, 0.7}, 
              ViewPoint -> {-2, -1, 0.7}, 
              AxesLabel -> {x1, x2, utility}]]

[42]

tangentplane[0.8, 1.3]

[43]

{mu1, mu2}

[44]

Module[{u}, u[x1_, x2_] := (x1^(1/5)) (x2^(1/4)); 
      x[t_] := 2.3 + 3 t; y[t_] := 2.6 + 2 t; f[t_] := u[x[t], y[t]]; 
      gr1 = Graphics3D[
          Table[Line[{{x[t], y[t], 0}, {x[t], y[t], f[t]}}], {t, -0.7, 1, 
              0.04}]]; 
      gr2 = ParametricPlot3D[{x[t], y[t], f[t]}, {t, -0.7, 1}, 
          DisplayFunction -> Identity]; 
      Show[{gr1, gr2}, DisplayFunction -> $DisplayFunction, 
        BoxRatios -> {1, 1, 0.7}, Axes -> True, 
        PlotRange -> {{0, 4}, {0, 4}, {0, 2}}, 
        ViewPoint -> {-1, -2, 0.7}, 
        AxesLabel -> {"x1", "x2", "utility"}]]

[45]

Plot[f''[t],{t, -0.7, 1},Axes -> False,Frame -> True]

[46]

Clear[h, k, u, f]; u[x1_, x2_] := (x1^(1/5)) (x2^(1/4)); f[t_] := u[2.3 + h t, 2.6 + k t]; f''[0]

[47]

Clear[u]; Clear[f];

[48]

f[t_] := u[a + h t, b + k t]; Simplify[f''[0]]

[49]

testofconcave2[utilityfunction_, a_, b_]:=Module[{u11, u12, u22},u[x1_, x2_] := utilityfunction[x1, x2];u11=Derivative[2, 0][u][a, b];u12=Derivative[1, 1][u][a, b];u22=Derivative[0, 2][u][a, b];{u11, u11 u22 - (u12^2)}]

[50]

testofconcave2[#(1^(1/5)) #(2^(1/4))&, 2.3, 2.6]

[51]

testofconcave2[#(1^(1/5)) #(2^(1/4))&, a, b]

[52]

testofconcave2[#(1^(2/3)) #(2^(2/3))&, a, b]

[53]

testofconcave3[utilityfunction_, a_, b_, c_]:=Module[{u, w},u[x1_, x2_, x3_] := utilityfunction[x1, x2, x3];w[k_, m_, n_]:=Derivative[k, m, n][u][a, b, c];d1 = w[2, 0, 0];d2 = Det[{{w[2, 0, 0], w[1, 1, 0]}, {w[1, 1, 0], w[0, 2, 0]}}]
                ;d3 = Det[{{w[2, 0, 0], w[1, 1, 0], w[1, 0, 1]}, {w[1, 1, 0], 
                    w[0, 2, 0], w[0, 1, 1]}, {w[1, 0, 1], w[0, 1, 1], 
                    w[0, 0, 2]}}];{d1, d2, d3}]

[54]

testofconcave3[-5 #(1^2) - #1 #2 - #(2^2) - 4 #(3^2)&, a, b, c]

[55]

testofconcave3[-5 #(1^3) - #1 #2 - #(2^2) - 4 #(3^2)&, a, b, c]

[56]

testofquasiconcave2[utilityfunction_, a_, b_]:=Module[{u, w},u[x1_, x2_] := utilityfunction[x1, x2];w[m_, n_]:=Derivative[m, n][u][a, b];d1 = Det[{{w[1, 0], w[1, 0]}, {w[1, 0], 0}}];d2 = Det[{{w[2, 0], w[1, 1], w[1, 0]}, {w[1, 1], w[0, 2], 
                    w[0, 1]}, {w[1, 0], w[0, 1], 0}}];{d1, d2}]

[57]

testofquasiconcave2[5 #1 + 3 #2 + 2 #1 #2&, 2.3, 2.6]

[58]

testofquasiconcave2[5 #1 + 3 #2 + 2 #1 #2&, a, b]

[59]

Factor[%]

[60]

Module[{gr1, gr2}, u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); 
      x2 = ((7.5 - 3 x1)/2.5); 
      gr1 = Graphics3D[
          Table[Line[{{x1, x2, 0}, {x1, x2, u[x1, x2]}}], {x1, 0, 2.5, 
              0.1}]]; gr2 = 
        Graphics3D[{PointSize[0.005], 
            Table[Table[
                Point[{i, j, u[i, j]}], {j, Max[0, ((7.5 - 3 i)/2.5)], 4, 
                  0.1}], {i, 0, 4, 0.1}]}]; 
      Show[{gr1, gr2}, PlotRange -> {{0, 4}, {0, 4}, {0, 4}}, 
        Axes -> True, BoxRatios -> {1, 1, 0.7}, 
        AxesLabel -> {"x1", "x2", "u"}, 
        ViewPoint -> {-2, -1, 0.7}]]

[61]

Show[{%}, ViewPoint -> {0, -10000, 0}]

[62]

Module[{u}, u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); 
      x2 = ((7.5 - 3 x1)/2.5); Plot[u[x1, x2], {x1, 0, 2.5}]]

[63]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); x2 = ((7.5 - 3 x1)/2.5); Solve[(∂_x1) u[x1, x2] == 0, x1]

[64]

Simplify[(∂_x1) u[x1, x2]]

[65]

Clear[x1]; Clear[x2]; Clear[lambda]; u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); g[x1_, x2_] := 3 x1 + 2.5 x2 - 7.5; L[x1_, x2_, lambda_] := u[x1, x2] - lambda g[x1, x2]; Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
        (∂_x2) L[x1, x2, lambda] == 0, 
        (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, lambda}]

[66]

Module[{u, g, L, sol, x10, x20, lambda0, H2, Dl, Dg},u[x1_, x2_] := (x1^(1/3)) (x2^(2/3));g[x1_, x2_] := 3 x1 + 2.5 x2 - 7.5;L[x1_, x2_, lambda_] := u[x1, x2] - lambda g[x1, x2];sol = Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
                (∂_x2) L[x1, x2, lambda] == 0, 
                (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, lambda}]
              ;x10 = x1 /. sol[[1]];x20 = x2 /. sol[[1]];lambda0 = 
            lambda /. sol[[1]];DL[i_, j_]:=Derivative[i, j, 0][L][x10, x20, lambda0];Dg[i_, j_]:=Derivative[i, j][g][x10, x20];H2 = Det[{{DL[2, 0], DL[1, 1], Dg[1, 0]}, {DL[1, 1], DL[0, 2], 
                  Dg[0, 1]}, {Dg[1, 0], Dg[0, 1], 0}}];{x10, x20, lambda0, H2}]

[67]

maxwithcondition[function_, condition_]:=Module[{u, g, L, sol, x10, x20, lambda0, H2, Dl, Dg},u[x1_, x2_] := function[x1, x2];g[x1_, x2_] := condition[x1, x2];L[x1_, x2_, lambda_] := u[x1, x2] - lambda g[x1, x2];sol = Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
                  (∂_x2) L[x1, x2, lambda] == 0, 
                  (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, 
                  lambda}];x10 = x1 /. sol[[1]];x20 = 
              x2 /. sol[[1]];lambda0 = 
              lambda /. sol[[1]];DL[i_, j_]:=Derivative[i, j, 0][L][x10, x20, lambda0];Dg[i_, j_]:=Derivative[i, j][g][x10, x20];H2 = Det[{{DL[2, 0], DL[1, 1], Dg[1, 0]}, {DL[1, 1], DL[0, 2], 
                    Dg[0, 1]}, {Dg[1, 0], Dg[0, 1], 0}}];{x10, x20, lambda0, H2}]

[68]

maxwithcondition[#(1^(1/3)) #(2^(2/3))&, p1 #1 + p2 #2 - w&]

[69]

maxwithcondition[#1 #2&, p1 #1 + p2 #2 - w&]

[70]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); g[x1_, x2_] := p1 x1 + p2 x2 - w; L[x1_, x2_, lambda_] := u[x1, x2] - lambda g[x1, x2]; sol = 
      Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
          (∂_x2) L[x1, x2, lambda] == 0, 
          (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, lambda}]; 
    {x1 /. sol[[1]], 
      x2 /. sol[[1]]}

[71]

demandx1[p1_, p2_, w_] := (w/(3 p1)); demandx2[p1_, p2_, w_] := ((2 w)/(3 p2)); V[p1_, p2_, w_] := 
      PowerExpand[u[demandx1[p1, p2, w], demandx2[p1, p2, w]]];

[72]

V[p1, p2, w]

[73]

V[3, 2.5, 7.5]

[74]

Module[{u, x1, x2, sen, ten}, u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); 
      x2 = (Sqrt[((1.3^3)/x1)]); 
      musabetu = Line[Table[{x1, x2, u[x1, x2]}, {x1, 0.001, 4, 0.1}]]; 
      sen = Table[
          Line[{{x1, x2, 0}, {x1, x2, u[x1, x2]}}], {x1, 0.001, 4, 0.1}]; 
      ten = {PointSize[0.0002], 
          Table[Point[{x, y, u[x, y]}], {x, 0, 4, 0.1}, {y, 0, 4, 0.1}]}; 
      Show[Graphics3D[{musabetu, sen, ten}], BoxRatios -> {1, 1, 0.7}, 
        ViewPoint -> {-1, -2, 0.7}, 
        PlotRange -> {{0, 4}, {0, 4}, {0, 4}}, Axes -> True, 
        AxesLabel -> {"x1", "x2", "u"}]]

[75]

Show[%, ViewPoint -> {0, 0, 10000}]

[76]

Module[{u, x1, x2, sen, ten, kyokusen}, x2 = (Sqrt[((1.3^3)/x1)]); 
      kyokusen = Line[Table[{x1, x2, 3 x1 + 2.5 x2}, {x1, 0.001, 4, 0.1}]]; 
      sen = Table[
          Line[{{x1, x2, 0}, {x1, x2, 3 x1 + 2.5 x2}}], {x1, 0.001, 4, 
            0.1}]; ten = {PointSize[0.0002], 
          Table[Point[{x, y, 3 x + 2.5 y}], {x, 0, 4, 0.1}, {y, 0, 4, 
              0.1}]}; Show[Graphics3D[{kyokusen, sen, ten}], 
        BoxRatios -> {1, 1, 0.7}, 
        ViewPoint -> {-1, -2, 0.7}, 
        PlotRange -> {{0, 4}, {0, 4}, {0, 22}}, Axes -> True, 
        AxesLabel -> {"x1", "x2", "u"}]]

[77]

Show[%, ViewPoint -> {0, -10000, 0}]

[78]

Plot[3 x1 + 2.5 (Sqrt[((1.3^3)/x1)]), {x1, 0.001, 4}, 
      PlotRange -> {0, 22}]

[79]

Solve[(∂_x1)(3 x1 + 2.5 (Sqrt[((1.3^3)/x1)])) == 0, x1]

[80]

minwithcondition[function_, condition_]:=Module[{u, g, L, sol, x10, x20, lambda0, H2, DL, Dg},u[x1_, x2_] := condition[x1, x2];g[x1_, x2_] := function[x1, x2];L[x1_, x2_, lambda_] := g[x1, x2] - lambda u[x1, x2];sol = Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
                  (∂_x2) L[x1, x2, lambda] == 0, 
                  (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, 
                  lambda}];x10 = x1 /. sol[[1]];x20 = 
              x2 /. sol[[1]];lambda0 = 
              lambda /. sol[[1]];DL[i_, j_]:=Derivative[i, j, 0][L][x10, x20, lambda0];Dg[i_, j_]:=Derivative[i, j][g][x10, x20];H2 = Det[{{DL[2, 0], DL[1, 1], Dg[1, 0]}, {DL[1, 1], DL[0, 2], 
                    Dg[0, 1]}, {Dg[1, 0], Dg[0, 1], 0}}];PowerExpand[{x10, x20, lambda0, H2}]]

[81]

minwithcondition[3 #1 + 2.5 #2&, #(1^(1/3)) #(2^(2/3)) - 1.3&]

[82]

minwithcondition[p1 #1 + p2 #2&, #(1^(1/3)) #(2^(2/3)) - u0&]

[83]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); L[x1_, x2_, lambda_] := 
      p1 x1 + p2 x2 - lambda (u[x1, x2] - u0); sol = 
      Solve[{(∂_x1) L[x1, x2, lambda] == 0, 
          (∂_x2) L[x1, x2, lambda] == 0, 
          (∂_lambda) L[x1, x2, lambda] == 0}, {x1, x2, lambda}]; 
    x1 = x1 /. sol[[1]]; 
    x2 = x2 /. sol[[1]]; lambda = lambda /. sol[[1]]; 
    {x1, x2, lambda}

[84]

compdemandx1[p1_, p2_, u_] := 
      (((p2^(2/3)) u)/((2^(2/3)) (p1^(2/3)))); compdemandx2[p1_, p2_, u_] := 
      (((2^(1/3)) (p1^(1/3)) u)/(p2^(1/3))); M[p1_, p2_, u_] := 
      p1 compdemandx1[p1, p2, u] + p2 compdemandx2[p1, p2, u];

[85]

u[x1_, x2_] := (x1^(1/3)) (x2^(2/3)); demandx1[p1_, p2_, w_] := (w/(3 p1)); demandx2[p1_, p2_, w_] := ((2 w)/(3 p2)); compdemandx1[p1_, p2_, u_] := 
      (((p2^(2/3)) u)/((2^(2/3)) (p1^(2/3)))); compdemandx2[p1_, p2_, u_] := 
      (((2^(1/3)) (p1^(1/3)) u)/(p2^(1/3))); V[p1_, p2_, w_] := 
      PowerExpand[u[demandx1[p1, p2, w], demandx2[p1, p2, w]]]; M[p1_, p2_, u_] := 
      Simplify[p1 compdemandx1[p1, p2, u] + p2 compdemandx2[p1, p2, u]];

[86]

V[p1, p2, w]

[87]

Solve[V[p1, p2, w] == u, w]

[88]

Solve[M[p1, p2, u] == M, u]

[89]

demandx1[p1, p2, M[p1, p2, u]] == compdemandx1[p1, p2, u]

[90]

compdemandx1[p1, p2, V[p1, p2, w]] == demandx1[p1, p2, w]

[91]

M[p1, p2, V[p1, p2, w]] == w

[92]

V[p1, p2, M[p1, p2, u]] == u