# Approximation to $\int_{-1}^{1}f(x)dx$ using only $f(0)$, $f'(-1)$, and $f''(1)$

The exercise is

Using only $f(0)$, $f'(-1)$, and $f''(1)$, compute an approximation to $\int_{-1}^{1}f(x)dx$ that is exact for all quadratic polynomials

I have only seen guassian quadrature without derivatives so i'm not sure how to go about this. Usually I check what conditions are needed so my approxiation is exact for all monomials of degree $\leq 4$, but since it asks to use derviatives of the function i'm not sure what to do.'

Could anyone lend a hand?

• I suggest using integration by parts formula – Yuriy S Nov 15 '17 at 22:37
• @YuriyS I'm not sure how that would help. – Renon Nov 15 '17 at 22:40
• take $u=f$ and $v=x$, then you get first derivative under the integral, which is a linear function for a quadratic polynomial – Yuriy S Nov 15 '17 at 22:45

HINT If $f(x) = ax^2 +bx+c$, you have $$\int_{-1}^1 f(x) dx = \frac{2a}{3} + 2c,$$ can you compute $f(0)$ and $f''(1)$ and complete the problem?
• So $\frac{2a}{3} + 2c$ is supposed to be equal to $f(0) + f'(-1) + f''(1)$ ? Er, no that can't be it since I would get $\frac{2a}{3} + 2c = c+b$ which doesn't make sense. – Renon Nov 15 '17 at 22:50
• I see $f(0) = c, f'(-1) = b-2a$ and $f''(1) = 2a$ so the most blatant thing that comes to mind is $$\int_{-1}^1 f(x) dx = \frac{f''(1)}{3} + 2f(0).$$ – gt6989b Nov 15 '17 at 22:53
• oh wow. So then we didn't need $f'(-1)$ at all for our approximation – Renon Nov 15 '17 at 22:54