Suppose we have two integers $a$ and $b$.
What's the fastest way to get an exact value for $\int_a^b{(1+x)^n dx}$, with $n$ large?
Suppose we have two integers $a$ and $b$.
What's the fastest way to get an exact value for $\int_a^b{(1+x)^n dx}$, with $n$ large?
Use a substitution, $u=1+x$: for $n\ne -1$ $$ \int_a^ b(1+x)^n\,dx=\int_{1+a}^{1+b} u^n \,du={u^{n+1}\over n+1}\biggl|_{1+a}^{1+b} ={(1+b)^{n+1}\over n+1} -{(1+a)^{n+1}\over n+1} . $$