Let $f$, $g$ be continuous real valued functions defined on some compact space $X$, $g\ge 0$. Show that if $f>0$ on the subset $\{g=0\}$ then there exists a constant $\lambda$ such that $f+ \lambda g> 0$ on $X$ ( the converse is immediate).
Note: this is a standard result. I think I've found it in a book by - Mathematical Economics.
It can be applied to the problem: let $f$ be a quadratic form. In what case is $f$ positive on a subspace $W\subset \mathbb{R}^d$? We consider the $f$ on the sphere $X=S^{d-1}$. Let $g$ be a positive semi-definite quadratic form with zero set $W$.