I would like to solve the following equation for $x\in\mathbb{R}^{n}$ $$\mathrm{diag}(x) \; A \; x = \mathbf{1}, \quad \text{with $A\in\mathbb{R}^{n\times n}$},$$ where $\mathrm{diag}(x)$ is a diagonal matrix whose diagonal elements are the elements of $x$ and $\mathbf{1}$ is a vector whose elements are equal to 1.
I will already be very happy to find a solution if $A$ is a positive definite and symmetric.
Ideally I would like to find a closed-form solution for this quadratic equation.
Any ideas (or solution ;-) would be greatly appreciated.
Other formulation
Another way to formulate this equation is as follows $$A \; x = 1./x, \quad \text{with $A\in\mathbb{R}^{n\times n}$},$$ where $1./x$ denotes the "element-wise inverse of the vector $x$".
Solution for the 1-dimensional case
The solution for the 1-dimensional case is straightforward $$ x = \frac{1}{\sqrt{A}} .$$
Do these least squares solutions help?
$n=2$
$$ \begin{align} % \mathbf{D} \mathbf{A} x &= \mathbf{1} \\ % \left[ \begin{array}{cc} a_{\{1,1\}} & a_{\{1,2\}} \\ a_{\{2,1\}} & a_{\{2,2\}} \\ \end{array} \right] % \left[ \begin{array}{cc} x_{\{1\}} & 0 \\ 0 & x_{\{2\}} \\ \end{array} \right] % \left[ \begin{array}{c} x_{\{1\}}\\ x_{\{2\}} \\ \end{array} \right] % &= % \left[ \begin{array}{c} 1 \\ 1 \\ \end{array} \right] % \end{align} $$ The least squares solution is $$ \begin{align} % x_{LS} &= \left( \mathbf{D} \mathbf{A} \right)^{+} \mathbf{1} \\ % &= \left( \det \mathbf{DA} \right)^{-1} \left[ \begin{array}{c} \frac{a_{\{2,2\}}}{x_{\{1\}}}-\frac{a_{\{1,2\}}}{x_{\{2\}}} \\ \frac{a_{\{1,1\}}}{x_{\{2\}}}-\frac{a_{\{2,1\}}}{x_{\{1\}}}\end{array} \right] % \end{align} $$
$n=3$
$$ \begin{align} % \mathbf{D} \mathbf{A} x &= \mathbf{1} \\ % \left[ \begin{array}{ccc} x_{\{1\}} & 0 & 0 \\ 0 & x_{\{2\}} & 0 \\ 0 & 0 & x_{\{3\}} \\ \end{array} \right] % \left[ \begin{array}{ccc} a_{\{1,1\}} & a_{\{1,2\}} & a_{\{1,3\}} \\ a_{\{2,1\}} & a_{\{2,2\}} & a_{\{2,3\}} \\ a_{\{3,1\}} & a_{\{3,2\}} & a_{\{3,3\}} \\ \end{array} \right] % \left[ \begin{array}{c} x_{\{1\}} \\ x_{\{2\}} \\ x_{\{3\}} \\ \end{array} \right] % &= % \left[ \begin{array}{c} 1 \\ 1 \\ \end{array} \right] % \end{align} $$ The least squares solution is $$ \begin{align} % x_{LS} &= \left( \mathbf{D} \mathbf{A} \right)^{+} \mathbf{1} \\ % &= \left( \det \mathbf{DA} \right)^{-1} \left[ \begin{array}{c} % \frac{a_{\{1,3\}} a_{\{3,2\}}-a_{\{1,2\}} a_{\{3,3\}}}{x_{\{2\}}}+a_{\{2,3\}} \left(\frac{a_{\{1,2\}}}{x_{\{3\}}}-\frac{a_{\{3,2\}}}{x_{\{1\}}}\right)+a_{\{2,2\}} \left(\frac{a_{\{3,3\}}}{x_{\{1\}}}-\frac{a_{\{1,3\}}}{x_{\{3\}}}\right) \\ % \frac{a_{\{1,1\}} a_{\{3,3\}}-a_{\{1,3\}} a_{\{3,1\}}}{x_{\{2\}}}+a_{\{2,1\}} \left(\frac{a_{\{1,3\}}}{x_{\{3\}}}-\frac{a_{\{3,3\}}}{x_{\{1\}}}\right)+a_{\{2,3\}} \left(\frac{a_{\{3,1\}}}{x_{\{1\}}}-\frac{a_{\{1,1\}}}{x_{\{3\}}}\right) \\ % \frac{a_{\{1,2\}} a_{\{3,1\}}-a_{\{1,1\}} a_{\{3,2\}}}{x_{\{2\}}}+a_{\{2,2\}} \left(\frac{a_{\{1,1\}}}{x_{\{3\}}}-\frac{a_{\{3,1\}}}{x_{\{1\}}}\right)+a_{\{2,1\}} \left(\frac{a_{\{3,2\}}}{x_{\{1\}}}-\frac{a_{\{1,2\}}}{x_{\{3\}}}\right) % \end{array} \right] % \end{align} $$