1 | initial version |

Thanks to Juanjo's answer to my question here I've managed to get a script which gives us an analytical solution for our hicksian demand equations. This is:

```
x1, x2, l, p1, p2, a, b, R= var('x1, x2, l, p1, p2, a, b, R')
U = x1^a*x2^b
m = p1*x1+p2*x2;
L = m+ l * (R-U);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
step1=solve([dLdx == 0, dLdy == 0, dLdl == 0], p1, p2, R)
step2=solve((p1/p2).subs(step1)==p1/p2, x1)
good2step3 = solve((U/R).subs(step2).log().log_expand()==0, x2)
good1step4=solve(step2[0].subs(good2step3).canonicalize_radical(),x1)
```

where `good1step4`

is our hicksiand demand for $x_1$ and `good2step3`

is our hicksian demand for $x_2$.

Its interesting how you need a different procedure when your constraint is non-linear.

2 | No.2 Revision |

Thanks to Juanjo's answer to my question here I've managed to get a script which gives us an analytical solution for our hicksian demand equations. This is:

```
x1, x2, l, p1, p2, a, b, R= var('x1, x2, l, p1, p2, a, b, R')
U = x1^a*x2^b
m = p1*x1+p2*x2;
L = m+ l * (R-U);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
step1=solve([dLdx == 0, dLdy == 0, dLdl == 0], p1, p2, R)
step2=solve((p1/p2).subs(step1)==p1/p2, x1)
good2step3 =
```~~solve((U/R).subs(step2).log().log_expand()==0, ~~solve((U/R).subs(step2).log()==0, x2)
good1step4=solve(step2[0].subs(good2step3).canonicalize_radical(),x1)

where `good1step4`

is our hicksiand demand for $x_1$ and `good2step3`

is our hicksian demand for $x_2$.

Its interesting how you need a different procedure when your constraint is non-linear.

3 | No.3 Revision |

Thanks to Juanjo's answer to my question here I've managed to get a script which gives us an analytical solution for our hicksian demand equations. This is:

```
x1, x2, l, p1, p2, a, b, R= var('x1, x2, l, p1, p2, a, b, R')
U = x1^a*x2^b
m = p1*x1+p2*x2;
L = m+ l * (R-U);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
step1=solve([dLdx == 0, dLdy == 0, dLdl == 0], p1, p2, R)
step2=solve((p1/p2).subs(step1)==p1/p2, x1)
good2step3 =
```~~solve((U/R).subs(step2).log()==0, ~~solve((U/R).subs(step2).log().log_expand()==0, x2)
good1step4=solve(step2[0].subs(good2step3).canonicalize_radical(),x1)

where `good1step4`

is our hicksiand demand for $x_1$ and `good2step3`

is our hicksian demand for $x_2$.

Its interesting how you need a different procedure when your constraint is non-linear.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.