# How effective is this alternative to integration?

I have a function that is difficult to integrate. So I elect to work with power series representations. Suppose the power series representation for this function is the following:

$f(x) = \sum_{i=M}^N{c_i x^i}$

I attempt to integrate each term of the power series seperately. For instance, looking at a few terms, we can integrate this to obtain $g(x)$:

$f(x) = \cdots + c_0 x^0 + c_1 x^1 + c^2 x^2 + \cdots$

$g(x) = \cdots + c_0 x^1 + \frac{1}{2}c_1 x^2 + \frac{1}{3}c_2 x^3 + \cdots$

In effect, we take $c_i x_i \mapsto \frac{1}{i+1}c_i x^{i+1}$ integrating terms individually.

Its possible to do this using generating function methods, which is fairly routine.

The Problem

Two terms are problematic. The term $c_{-1} x^{-1}$ should integrate to $\log(x)$. The constant of integration is not known, so this is the second problem term.

The Question

I'm looking for a way to perhaps solve this problem. For instance, finding a way to approximate the two problem terms would be a good start. In the end, I want to get an approximation to the integral within an error bounds. I really want to consider this particular method, though. I'd be interested in seeing related literature.

Some Ideas

We may be able to use approximations to similar integrals to solve for approximations to the two problem terms. I'm interested in trying to get an approximation (to the original integral) within a certain amount of error. If this is possible, I'd consider the problem solved.

An Example: Particular integrals that I'm using this on.

Here's a description of the function(s) I want to integrate. I take:

$\displaystyle x^b \frac{\prod_{i=0}^m{(\pm x^{c_i} \pm 1)}}{\prod_{j=0}^n{(\pm x^{d_j} \pm 1)}}$

Note that both the quotient and the denominator consist of products of the form $\pm x^r \pm 1$. Here, $r \in \mathbb{N}$ and $-(2^s) \leq r \leq 2^s$ for some natural $s$. Also, $b$ is similarly restricted/defined as $r$.

I take this formula and make the substitution $x \mapsto e^{i t}$ and integrate from $t=-\pi$ to $t=\pi$.

-
@Matt: I continue to have no idea what you're trying to do. Can you please just post the complete problem you're working on? – Qiaochu Yuan Oct 28 '10 at 18:44
Maybe this will help regarding your rational function: en.wikipedia.org/wiki/Partial_fraction. – Aryabhata Oct 28 '10 at 18:51
Neither of your terms is actually problematic as long as your functions are well enough behaved. The constant of integration subtracts out, and the log(x) term is reality. But you might want to consider some of the techniques of numerical integration. The power series is so local, the accuracy is often poor. – Ross Millikan Oct 28 '10 at 19:19
@Qiaochu: My webpage links to a blog that I'll be working on today and tonight. Eventually I should have a good description of my project. There you'll find the details of this question. – Matt Groff Oct 28 '10 at 20:49
I really need to see these "particular integral" if you want to get something useful from this site. As @Ross mentions, power series have crappy performance when already a teeny bit far away from the point of expansion. I'm pretty sure any bad behavior in your integrands can be tamed. Power series might still help, but certainly not in this way. – J. M. Oct 28 '10 at 23:17