Quadratic functionals with a variable singular end point