0
$\begingroup$

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}$.

$\endgroup$
5
  • 1
    $\begingroup$ $$ -b_1 - b_2 x + b_1 \ln \vert x \vert + 2b_2 x + C $$ can be further simplified into $$ b_1 \ln \vert x \vert + b_2 x + (C - b_1)$$ This is the same as the one you obtain by direct integration except the constant term $C - b_1$, so these two solutions are equivalent $\endgroup$ Commented Dec 18, 2023 at 2:53
  • 1
    $\begingroup$ One should remember that the integration of $f$ gives a class of functions that can differ by a constant. That is, if $F, G$ are two indefinite integrals of the same function $f$ then there exists a constant $C$ such that $F(x) = G(x) + C \ \forall x$ $\endgroup$ Commented Dec 18, 2023 at 2:58
  • $\begingroup$ It is not a homework problem; I come across this issue during my research. I understand that one can absorb $b_1$ into a constant C then it means that $C_{direct} = C_{by.parts}-b_1$ which implies that the direct integration must yield a specific constant term $-b_1$ in addition to C. It is difficult to see this when just integrating directly. $\endgroup$ Commented Dec 18, 2023 at 3:08
  • $\begingroup$ what I am truly interested in is $\chi - f(x) = -x \int f(x) g(x) dx -f(x)$ where $f(x) = b_1 x + b_2 x^2, \quad g(x) = x^{-2}$. If I do the integral by parts then $b_1$ term cancels; but if I directly integrated $\chi$ then I will have an additional $b_1$ $\endgroup$ Commented Dec 18, 2023 at 3:16
  • $\begingroup$ If you are talking about an indefinite integral, then by convention, two antiderivatives are considered the same if they differ only by a constant. Alternatively, if you are talking about a definite integral of the form $~\displaystyle \int_a^b f(x) ~dx,~$ then you will find that both anti-derivatives yield the same numerical answer. This is because the constant of integration never affects the numerical computation of a definite integral. $\endgroup$ Commented Dec 18, 2023 at 6:35

1 Answer 1

1
$\begingroup$

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)$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.