I’m trying to solve a system of equations using the following code:
Solve[(x11/theta11) == lambda1 + (lambda3*pi1) && (x12/theta12) ==
lambda1 + (lambda3*pi2) && (x13/p1) == lambda3 && (x21/theta21) ==
lambda2 + (lambda4*pi1) && (x22/theta22) ==
lambda2 + (lambda4*pi2) && (x23/p2) ==
lambda4 && (x11/pi1) + (x21/pi1) == (lambda3*theta11) + (lambda4*
theta21) && (x12/pi2) + (x22/pi2) == (lambda3*
theta12) + (lambda4*theta22) && theta11 + theta12 == 1 &&
theta21 + theta22 == 1 && (theta11*pi1) + (theta12*pi2) + p1 ==
1 && (theta21*pi1) + (theta22*pi2) + p2 == 1, {theta11, theta12,
theta21, theta22, pi1, pi2, p1, p2, lambda1, lambda2, lambda3,
lambda4}]
The code has been running for over 24 hrs, so I’m assuming there’s something wrong. The system of equations arises by taking the partial derivatives of each theta, pi, p, and lambda variable using the following code:
D[x11*Log[theta11*pi1] + x12*Log[theta12*pi2] + x13*Log[p1] +
x21*Log[theta21*pi1] + x22*Log[theta22*pi2] + x23*Log[p2] -
lambda1*(theta11 + theta12 - 1) -
lambda2*(theta11*pi1 + theta12*pi2 + p1 - 1) -
lambda3*(theta21 + theta22 - 1) -
lambda4*(theta21*pi1 + theta22*pi2 + p2 - 1), theta11]
for each theta, pi, p, and lambda variable. Essentially, I’m trying to find parameter values that yield the maximum of the function under certain conditions, so I’m taking the partial derivatives with Lagrange multipliers, then solving the system of equations.
Does anyone see any reason why the above Solve[] code would not run properly? Any suggestions on what else I can do to solve this problem? Any help is appreciated. Thanks!