I want to minimize the function
$$ \underset{x}{\text{minimize}}\left[\underset{i}{\Sigma}(x_i - w_i)^2 + (x^TPx - 1)^2\right] $$
subject to some constraints, and where $x$ is the minimization variable, a vector, $w$ is a known desired vector and $P$ is a known PSD matrix.
The issue is that the first expression $\underset{i}{\Sigma}(x_i - w_i)^2$ and the second expression $(x^TPx - 1)^2$ are on different scales, so any minimizer I use will penalize the expression with the larger scale much more heavily.
What would be the best and most straighforward approach to get the two expressions on the same scale?