Pencils of real symmetric matrices and the numerical range