I am looking for an approximation $$\alpha_0f(-1) + \alpha_1f(0) + \alpha_2f(1)$$ of $$\int_{-2}^2 e^{-x} f(x) dx $$ that is exact for polynomials $f$ of degree 2.
My first idea is to solve these equations for the polynomials $1$, $x$ and $x^2$.
$$ \int_{-2}^2 e^{-x} dx = \alpha_0 + \alpha_1 + \alpha_2 $$ $$ \int_{-2}^2 e^{-x} x dx = -\alpha_0 + \alpha_2 $$ $$ \int_{-2}^2 e^{-x} x^2 dx = \alpha_0 + \alpha_2 $$
I believe that should work. I have a feeling, though, that I am missing a much more elegant way.
Because of $e^{-x}$, there is no symmetry to exploit. Since the coefficients give you the value of integrals such as $\int x^2 e^{-x}\,dx$, having a ridiculously easy way to find them would revolutionalize the teaching of integral calculus. This is unlikely. I would write $$ \begin{split} \alpha_0 &= \frac12 \int_{-2}^2 e^{-x}(x^2-x)\,dx \\ \alpha_1 &= \int_{-2}^2 e^{-x}(1-x^2)\,dx \\ \alpha_2 &= \frac12 \int_{-2}^2 e^{-x}(x^2+x)\,dx \end{split} $$ and outsource the boring parts to a computer, for example this is the computation of $\alpha_2$.