If $\int_{-x}^{x}f(t)dt=x^3-x^2+x+1$, then find $f(-2)+f(2).$

If $$\int_{-x}^{x}f(t)dt=x^3-x^2+x+1,$$ then how can I find $f(-2)+f(2)?$

I tried to use the derivative of integral but I get $f(2)-f(-2)=9.$

$$I(x) = \int_{-x}^x f(t)dt = \int_{-x}^0 f(t)dt + \int_0^x f(t)dt = -\int_0^{-x} f(t)dt + \int_0^x f(t)dt$$

If we let $F(x) = \int_0^x f(t)dt$ then $F'(x) = f(x)$ and the integral becomes $$I(x)=-F(-x)+F(x).$$

Now calculate $I'(x)$ (don't forget about the chain rule).

HINT:

$\frac{dF(-x)}{dx} \neq f(-x)$.

Consider the chain rule.

Hint. Observe that $$\left(\int_{-x}^{x}f(t)dt \right)'=\left(\int_{-x}^0f(t)dt \right)'+\left(\int_0^{x}f(t)dt \right)'=-(-f(-x))+f(x).$$

Apply the rule for Differentiation under the integral sign: $$\dfrac{\mathrm{d}}{\mathrm{d}x} \left (\int_{a(x)}^{b(x)}f(x,t)\,\mathrm{d}t \right) = f(x,b(x))\cdot b'(x) - f(x,a(x))\cdot a'(x) + \int_{a(x)}^{b(x)} \dfrac{\partial}{\partial x}f(x,t)\; \mathrm{d}t.$$ Now make the identifications: \begin{align}a(x)&=-x\\ b(x)&=x\\ f(x,t)&=f(t)\end{align} Such that: \begin{align}\dfrac{\mathrm{d}}{\mathrm{d}x} \left (\int_{-x}^{x}f(t)\, \mathrm{d}t\right) &= f(x)\cdot 1 - f(-x)\cdot (-1) + 0\\ &= f(x) + f(-x)\\ &=\dfrac{\mathrm{d}}{\mathrm{d}x}\left(x^3-x^2+x+1\right)\\ &=3x^2-2x+1\end{align} Evaluating at $x=2$: $$f(2)+f(-2)=3\cdot 2^2-2\cdot 2+1=9$$