Consider the following hermitian form on the sobolev space H^1(I), of an interval I: g(u,v):= \int_I (du/dt dv/dt - \rho(t) u v)dt, where \rho is a nice bounded function on I. Riesz representation theorem gives us a bounded linear operator A on the Hilbert space H^1(I) such that (Au,v) = g(u,v), where (,) is the inner product of H^1(I). The question is: can you find sufficient conditions on \rho for A to have a dense range?
This looks a bit like it could be a H/W exercise, but having started to type something up I might as well give most of it. I'm assuming all your functions are real-valued, since otherwise your form isn't hermitian.
Start by noting that a hermitian, bounded linear operator on Hilbert space has dense range if and only if it's injective. (Let $v\in H$: then $v$ is orthogonal to $Tu$ for all $u$ if and only if $Tv=T^*v$ is orthogonal to all $u$, i.e. if and only if $Tv=0$.)
So your operator $A$ has dense range if and only if it is injective. In particular (again, assuming that we're talking about real-valued H^1(I) here), if \rho is negative a.e. and not identically zero, then the only solution of $Au=0$ is $u=0$ (just consider $g(u,u)$ ).
Conversely, suppose that \rho is positive on some sub-interval $[a,b]$. Then I think we can find $u\in H^1(I)$ which is supported on $[a,b]$ and is not identically zero, such that $(du/dt)^2 - \rho(t)u(t)^2=0$ almost everywhere. (Hint: just try doing it!)
Depending on how nice your function \rho is supposed to be, that almost answers your question. If you're merely requiring it to be integrable then I'd have to think a bit more on this.