I need to minimize the below-mentioned expression.
$ L = min (a_0-b_0*(p_1+p_2))^2 + (p_1*y1+p_2*y)$ ,with
s.t p_1 >=0 ,p_2 >=0
Here variables are $p_1$ and $p_2$
So I tried using KKT as both the expression and constraint are convex. But l was not able to come with the generalized result over $p_k$ where $k = 1,2,3..$
In the expression I have used $k=2$ .
if $k = 3$ :
L = min (a0-b0*(p1+p2+p3))^2 + (p1*y1+p2*y2+p3*y3)
s.t p1>=0,p2>=0,p3>=0
Basically I used KKT,
Then considered 4 cases p1>0 && p2>0 ,p1>0 &&p2==0 ,p1==0&&p2>0 ,p1==0 && p2==0.
Can any one show me the steps to get the generalized result.