Let $\boldsymbol{u}$ be a vector with length $F$. Let $\boldsymbol{c}, \boldsymbol{w} \in \mathbb{R}^{F\times1}$ be column vectors with length $F$.
I have the following equation: $$ (\alpha + \sum_{f} c_{f})w_{f} -c_{f} \sum_f w_{f} = \beta ~c_{f} $$ where I want to isolate $w_f$ (or the whole vector $\boldsymbol{w}$).
If I express it in matricial form I have: \begin{align*} (\alpha + \boldsymbol{u}^T \boldsymbol{c}) w_{f} - c_{f} \boldsymbol{u}^T \boldsymbol{w} &= \beta \boldsymbol{c} \end{align*} And putting it in terms of the whole vector $\boldsymbol{w}$:
\begin{align*} (\alpha\boldsymbol{u} + \boldsymbol{u}^T \boldsymbol{c}\boldsymbol{u})\odot \boldsymbol{w} - \boldsymbol{c} \boldsymbol{u}^T \boldsymbol{w}\boldsymbol{u} &= \beta \boldsymbol{c} \end{align*} And know I'm stuck. I think the trick is to express the second term as another Hadamard product ($\odot$), then I'll have something like $$ (...) \odot\boldsymbol{w} =\beta \boldsymbol{c} $$ but I don't find the way. Any help?
Deduced from @lynn's comment.
First, it can be easily checked that the expression in terms of the whole vector $\boldsymbol{w}$ can be written as: $$ (\alpha \mathbf{I} + \mathbf{u}^T\mathbf{c}\mathbf{I})\mathbf{w} - \mathbf{c}\mathbf{u}^T\mathbf{w} = \beta \mathbf{c} $$ or $$ (Diag(\alpha) + Diag(\mathbf{u}^T\mathbf{c}))\mathbf{w} - Diag(\mathbf{c}\mathbf{u}^T)\mathbf{w} = \beta \mathbf{c} $$ Since both terms in the left-hand side are matrix products, is clear that we can take the common factor $\mathbf{w}$ and obtain: $$ (\alpha \mathbf{I} + \mathbf{u}^T\mathbf{c}\mathbf{I} - \mathbf{c}\mathbf{u}^T)\mathbf{w} = \beta \mathbf{c} $$ The term in parentheses is an $F\times F$ matrix. Multiplying by its inverse in the left of both sides, we arrive to the solution $$ \mathbf{w} = \beta (\alpha \mathbf{I} + \mathbf{u}^T\mathbf{c}\mathbf{I} - \mathbf{c}\mathbf{u}^T)^{-1}\mathbf{c} $$