I have difficulties in understanding the role of the weight function $w(x)$ that occurs in the solution of PDEs via the Galerkin approach. Consider a linear differential equation of the form $$ \partial_t \,u(x,t) \ = \ L \, u(x,t) $$ where $L= L[x,\partial_x,\partial_{xx}]$ is a differential operator. In the Galerkin approach one uses the ansatz $u(x,t) = \sum_k a_k(t) \,p_k(x)$ to obtain $$ \sum_k {\dot a}_k(t) \,p_k(x) \ = \ \sum_k a_k(t) L\, p_k(x) $$ The next step is an application of the functional $\int p_i(x) w(x) dx$: $$ \sum_k {\dot a}_k(t) \,(p_i,p_k)_w \ = \ \sum_k a_k(t) \;(p_i, L \, p_k)_w $$ The resulting equation is solved by the usual methods for time-propagation.
Now to the point: the functions $p_k(x)$ are often chosen as orthogonal polynomials (with appropriately built-in boundary conditions via basis recombination). For this, the book of Hesthaven and Gottlieb states (e.g. page 118)
Since we are using (orthogonal) polynomials $p_k(x)$ as a basis it is natural to choose the weight function $w(x)$ such that $(p_k,p_j)_w =\gamma_k \delta_{kj}$
Questions:
Isn't it so that for each different $w(x)$, one solves a different problem?
Why should one a priory attribute particular importance to different regions of $[-1,1]$ and relatively neglect others (as it is done for all weights $w(x)\neq1$). Put differently, why should one ever use the Chebyshev polynomials and weight function $w_\text{Cheb}(x) = 1/\sqrt{1-x^2}$ if I can use the Legendre polynomials and $w_{\text{Leg}}(x)=1$ (--one reason is the FFT, but please neglect that here, as it's meant more as a general question)?
And if one does so, i.e. applies a weighting in $[-1,1]$, which weight function is "optimal" (in the sense, that the original PDE is approximated "best")?
And, just to confirm my understanding: if I use Chebyshev polynomials with a weight $w(x)=1$ (which is effectively Clenshaw-Curtis integration), I lose all the advantages of the Gaussian grid, yes?
I'd appreciate also partial answers, thanks in advance.