I am trying to solve the matrix equation
$x^t D x = 1$
where $x\in \mathbb R^n$ and $D$ is a positive definite $n\times n$ diagonal matrix (if it helps, it takes the form in components $D_{ij} = \delta_{ij}( \sum_{k=0}^n (k+1/2))$, where $\delta_{ij}$ is the Kronecker delta.) I was trying to determine the vector $x = (x_1, x_2, \dots, x_n)$ which solves this equation. Is there a general procedure for doing this? I have a gut feeling that this is something extremely simple that I'm overlooking...
If $\dfrac1{a_i^2}$ denotes the $i^{th}$ diagonal element of $D$, we then have $$\sum_i \dfrac{x_i^2}{a_i^2} = 1$$ Then $$x_n = a_n\prod_{k=1}^{n-1} \sin(\theta_k) \text{ and } x_i = a_i\cos(\theta_i)\prod_{k=1}^{i-1} \sin(\theta_k) \text{ for }i<n$$ satisfies the equation and provides all possible solutions for all $\theta_i$'s.