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?

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

  • $\begingroup$ This way is more simple than what I suggested $\endgroup$ – Yuriy S Nov 15 '17 at 22:46
  • $\begingroup$ 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. $\endgroup$ – Renon Nov 15 '17 at 22:50
  • $\begingroup$ 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).$$ $\endgroup$ – gt6989b Nov 15 '17 at 22:53
  • $\begingroup$ oh wow. So then we didn't need $f'(-1)$ at all for our approximation $\endgroup$ – Renon Nov 15 '17 at 22:54
  • $\begingroup$ @Renon I guess, not $\endgroup$ – gt6989b Nov 15 '17 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.