Let $1<p<\infty $.We define the space: $L_{V}^{p}(-1,1)=\left \{ f:(-1,1)\rightarrow \mathbb{R}:\int_{-1}^{1}\left | f(x) \right |^{p}V(x)dx<\infty \right \}$
We define the norm: $\left \| f \right \|_{L_{V}^{p}}=(\int_{-1}^{1}\left | f(x) \right |^{p}V(x)dx)^{\frac{1}{p}}$
Consider $W\subset L_{V}^{p}(-1,1)$ to be a finite dimensional subspace. For a given $f$ in $L_{V}^{p}(-1,1)$, we define the minimizer $m$ in $W$ such that: $\left \| f(x)-m(x) \right \|_{L_{V}^{p}}= min\left \| f(x)-q(x) \right \|_{L_{V}^{p}}$ for all $q$ in $W$.
I need to show that $m$ satisfies the following:
$\int_{-1}^{1}\left | f(x)-m(x) \right |^{p-2}(f(x)-m(x))q(x)V(x)dx=0$ for all $q\in W$
I have no idea how to prove the above identity based on the information given in the problem. Any ideas?
Hint: Since $m$ is the minimizer of $\|f - m\|_p$, for any $q \in W$, $$ \frac{d}{dt} \|f - m - tq\|_p^p = 0 $$ (why?) Then try and evaluate this expression.