Direct integration and integration by parts doesn't yield the same result

85 Views Asked by At

I've encountered a discrepancy while calculating the same integral using two different methods: direct integration and integration by parts. The integral in question is: $$\int (b_1 x + b_2 x^2) x^{-2} \, dx$$ Direct Integration:

First, I simplified and then integrated directly:

$$\int (b_1 x^{-1} + b_2) \, dx = b_1 \ln|x| + b_2 x + C$$

Integration by Parts:

Next, I used integration by parts, setting $u=b_1x+b_2x^2$ and $dv=−dx^{−1}$. I obtained:

$$\int (b_1x + b_2x^2) \left(\frac{dx}{x^2}\right) = -(b_1x + b_2x^2)\left(\frac{1}{x}\right) - \int \left(-\frac{1}{x}\right) (b_1 + 2b_2x) \, dx $$ Which simplifies to: $$-b_1 - b_2x + b_1 \ln|x| + 2b_2x + C $$

Question:

Why is there a discrepancy in the polynomial terms of the two results? Specifically, the term $b_1$ in the integration by parts result doesn't appear in the direct integration result.

This seems a generic problem for all functions since if I expand $f(x)$ around $x=0$, I obtain $f(x) = f(0) + b_1 x + b_2 x^2+...$. Then direct integration of $\int f(x)x^ndx$ ,where $n>1, n\in N$, doesn't yield a constant term $b_{n-1}$ while with integration by parts I have $b_{n-1}$.

1

There are 1 best solutions below

0
On BEST ANSWER

I think I can see where the discrepancy comes in, in a way that's more constructive than 'the constant is arbitrary'.

The full version of integration by parts uses the identity $d(uv)=udv+vdu$, so if you write the expression for $\int (b_1x+b_2x^2)(1/x^2)\, dx$ as $\int d((b_1x+b_2x^2)(-1/x))\, - \int (-1/x)(b_1+2b_2x)\, dx$, and you take the derivative before you integrate, then it annihilates the $-b_1$ constant. That is, the right hand side reduces to $\int (-b_2)\, dx - \int (-1/x)(b_1+2b_2x)\, dx$ and you recover an identical expression up to the arbitrary constant(s).

Both $-b_2x$ and $-b_1-b_2x$ are valid expressions for $\int d((b_1x+b_2x^2)(-1/x))\,$, it just depends on whether you expand the derivative before taking an antiderivative or not. This should happen for any expression $uv$ that contains a constant term, depending on whether you use $uv$ in the integration by parts formula or $\int d(uv)$.