# Solving a KKT constrained optimization problem

I am quite new to Mathematica and I tried to solve constrained optimization problem but the script just keeps running without finishing so I wanted to check if the problem is simply untractable or if I made a mistake somewhere.

I have three (strictly concave) functions that I want to maximize:

f1[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_]
f2[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_]
f3[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_]


Now each function should be maximized with respect to the arguments with the corresponding numerals, i.e. f1 wrt to a1, b1, and c1. Thus the solutions should be conditional on the other solutions. So I took the FOC

focs1 =D[f1[a1,b1,c1,a2,b2,c2,a3,b3,c3], {{a1,b1,c1}}]
focs2 =D[f2[a1,b1,c1,a2,b2,c2,a3,b3,c3], {{a2,b2,c2}}]
focs3 =D[f3[a1,b1,c1,a2,b2,c2,a3,b3,c3], {{a3,b3,c3}}]


This works as expected. I then try to solve these first order conditions simultaneously:

    Solve[focs1[] <= 0 && focs1[] <= 0 && focs1[] <= 0 &&
focs2[] <= 0 && focs2[] <= 0 && focs2[] <= 0  && focs3[] <= 0 &&
focs3[] <= 0 && focs3[] <= 0 && focs1[]*a1 == 0 &&
focs1[]*b1 == 0 && focs1[]*c1 == 0 && focs2[]*a2 == 0 &&
focs2[]*b2 == 0 && focs2[]*c2== 0 && focs3[]*a3 == 0 &&
focs3[]*b3 == 0 && focs3[]*c3 == 0 , {a1,b1,c1,a2,b2,c2,a3,b3,c3}, NonNegativeReals]


And this Solve command does not finish running. Have I made a mistake somewhere or is there a better way to approach this problem?

Thank you!

Edit: The functional form of the functions is

f1[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_] := (alpha1 + beta1 (a1 + t*(a2 + a3)))* a1 + (alpha2 + beta2 (t*b1 + b2 + t*(b3)))*b1*t + (alpha3 + beta3 (t*c1 + c3 + t*(c2)))*c1*t - (a1 + b1 + c1)^2

f2[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_] := (alpha1 + beta1 (a1 + t*(a2 + a3)))*a2*t + (alpha2 + beta2 (t*b1 + b2 + t*(b3)))*b2 + (alpha3 + beta3 (t*c1 + c3 + t*(c2)))*c2*t - (a2 + b2 + c2)^2

f3[a1_,b1_,c1_,a2_,b2_,c2_,a3_,b3_,c3_] := (alpha1 + beta1 (a1 + t*(a2 + a3)))* a3*t + (alpha2 + beta2 (t*b1 + b2 + t*(b3)))*b3*t + (alpha3 + beta3 (t*c1 + c3 + t*(c2)))*c3 - (a3 + b3 + c3)^2


where the alphas and betas and t are parameters.

• What is the functional form of your functions?
– demm
Aug 4 at 10:07