# Solve Lagrangian function for utility

I have the following Utility function: \begin{align} U = w^\prime\mu \end{align}

and Langrangian function subject to constraint: \begin{align} F (w, \lambda)= w^\prime\mu - \lambda(w^\prime i - 1) \end{align}

I would like to have an expression for w so that I can calculate the weights. Does anyone know how to solve the system and obtain the function for 'w'?

Shouldn't the utility function be like this?

$$L(w, \lambda) = w' \mu - \lambda\left( \sum_{i=1}^{n} w_i -1 \right)$$

In that case, let: $$w'\mu$$ be $$\sum_{i=1}^{n} w_i \mu_i$$, with the constraint that the weights must sum $$1$$.

$$L(w, \lambda) = \sum_{i=1}^{n} w_i \mu_i -\lambda\left( \sum_{i=1}^{n} w_i -1 \right)$$

Then you just have to find each derivative for the problem, meaning:

$$\frac{\partial L}{\partial w_i} = 0 \ , \forall i$$

$$\frac{\partial L}{\partial \lambda} = 0$$

If you had more constraints, you'd have to find also the derivative for the rest of constraints, meaning a vector $$\lambda'$$

• Yes, I think so! thanks. Do you know how to solve it, because I am still stuck.. – user9891079 Oct 10 '18 at 10:28
• But I still cannot figure out what the expressions for 'w' is.. I am trying to find the derivatives and set them equal to each other, but cannot find an expression for 'w' – user9891079 Oct 10 '18 at 12:40
• There was a typo in my text. Look the derivatives, it will help now, I hope. But do you have a numerical example to which you want a solution? – YetAnotherUsr Oct 11 '18 at 11:19