Given the function: $f(x) = \cos(2x) \exp\left(-x^2\right)$
I estimated $\int_{-2}^2 f(x) \ dx$ using the formula. I need to calculate the error bound using the formula: $$ R = −\frac{b−a}{12} \cdot h^2 \cdot \frac{d^2 f}{dx^2}(\xi) $$ Where $(d^2 y/dx^2)(ξ)$ is the maximum of the second derivative. I can tried calculating the function at both limits getting the same answer of, -0.17075...
Is there a way to measure if this answer is correct or do I just hope for the best, I cant see the pattern as to where the function will be a maximum.
It's easy to see that the function $f$ is symmetric around zero, i.e. $f(-x) = f(x)$. Sometimes we say such $f$ is even. One other obvious place to check is at zero, and $f(0)=1$, and it's easy to see that is the global maximum, since both the cosine and the exponent cannot exceed one.