We're asked to integrate a polynomial function (fortunately of low degree) on an interval symmetric about $ \ x \ = \ X \ \ . \ $ Integrating a quadratic polynomial $ \ ax^2 + bx + c \ $ will produce
$$ \frac{a}{3} · [ \ (X + \Delta)^3 - (X - \Delta)^3 \ ] \ + \ \frac{b}{2} · [ \ (X + \Delta)^2 - (X - \Delta)^2 \ ] \ + \ c · [ \ (X + \Delta) - (X - \Delta) \ ] \ \ , $$
[with the differences "canceling" all the terms with even powers of $ \ \Delta \ \ , \ $ including $ \ \Delta^0 \ \ ] $
$$ = \ \ \frac{a}{3} · 2 · ( \ 3X^2·\Delta \ + \ \Delta^3 \ ) \ + \ \frac{b}{2} · 2 · (2X · \Delta) \ + \ c · 2 · \Delta $$ $$ = \ \ \Delta · \left[ \ 2aX^2 \ + \ \frac{2a}{3}·\Delta^2 \ + \ 2bX \ + \ 2c \ \right] \ \ . $$
This is not a formula to memorize, but a "gimmick" to apply. (Know your binomial coefficients when you need to go to powers higher than 2...) For $ \ \int_{2-\sqrt{3}}^{2+\sqrt{3}} \ { \left(x^2-4x+1\right) \ \textrm{d}x} \ \ , \ $ we have
$$ \sqrt3 · \left[ \ 2·1·2^2 \ + \ \frac{2·1}{3}·(\sqrt3)^2 \ + \ 2·(-4)·2 \ + \ 2·1 \ \right] $$
$$ = \ \ \sqrt3 · ( \ 8 \ + \ 2 \ - \ 16 \ + \ 2 \ ) \ \ = \ \ -4·\sqrt3 \ \ . $$
It probably helps with some of the methods proposed that this is a "contest-math" problem, so the numerical values permit something "slick". (I can't remember the last time otherwise, though, that I saw completing the square on a quadratic place the vertex right in the center of the integration interval -- still, it's neat and I upvoted Tom Chen's answer.) Jyrki Lahtonen is using Archimedes' formula (A. was mighty proud of it), so that's something you ought to "store away in your head" for when you have an occasion to use it. (As for spotting that the integration is over the interval between the $ \ x-$intercepts of the parabola, I guess one would use the problem-solving "principle" of asking, "Why those numbers?" (for the integration limits), which is frequently helpful for contest-math and even course exam problems...)