I'm taking a course on numerical methods to be able to program math, it's part of the game option of my compsci bachelors.This is part of one of the questions:
Given the integral: $\int_6^{12} (9x^3 - x^4)dx$
A. Using the Composite Trapezoidal Rule, what is the min. n required to have an accuracy of six decimal places (TOL. $\le 10^{-6}$), in the approximation of the given integral. n must be solved theoretically.
B. just use the composite trapezoidal rule with said n, which is easy since I programmed the rule (code here: http://pastebin.com/QzRdijrh)
C. Same as A but for Composite Simpson's rule.
D. Same as B but for Composite Simpson's rule (code here: http://pastebin.com/V9DYdRXU)
So the problem I'm having is I can't remember how to find minimum n, I know for Bisection Algorithm you make $2^n \le (b-a)/TOL$ But I forgot how to apply that to other rules...