# Finding the constraints for a profit maximization program in Acemoglu et al, 2016

I have been reading the paper of Acemoglu et al., 2016 Networks and the macroeconomy : an empirical exploration, and I have been struggling with a maximization programm in the early pages of the article. Even if I get the following parts, I am a bit frustrated I can't prove one of the first results.

The production function is :

With $$x_{ij}$$ the products of the firm $$j$$ treated as input for the output of the firm $$i$$.

My question is the following : What should I take as constraint for my Lagrangian function ? I am having difficulties seeing how the authors came to the (4) conclusion :

I think the constraints is given by the relation

But I must admit I am not sure about my result with these constraints.

Could anyone give me a tip about the constraints and how to proove the $$(4)$$ relation ?

$$\Pi = \underbrace{p_iy_i}_{\text{Total Revenue}} - \underbrace{\left(\sum_j p_jx_{ij} + wl_i\right)}_{\text{Total Costs}}$$ Differentiating the above with respect to $$x_{ij}$$ and setting to zero gives you the equation you are looking for. The assumption that the exponents sum to one in your last equation is just assuming that the production function has constant returns to scale, see here.