Counter-example for integration by parts with improper integrals

improper-integralsintegration

Assume $f'$ and $g'$ continuous, the integration by parts for an indefinite integral

$$ \int f'(x)g(x)\; dx = f(x)g(x) – \int f(x)g'(x)\; dx$$

is a simple consequence of the Product Rule for the differentiation of a product of functions. By the Fundamental Theorem, it has a counter-part for definite integrals:

$$ \int_a^b f'(x)g(x)\; dx = \left[f(x)g(x)\right]_a^b – \int_a^b f(x)g'(x)\; dx$$

The version for improper integrals is false, since $\int_a^\infty f'(x)g(x)\; dx$ may be convergent, while $[f(x)g(x)]_a^\infty = \lim_{t\to\infty} [f(x)g(x)]_a^t$ and $\int_a^\infty f(x)g'(x)\; dx$ are divergent. Hence, we cannot write

$$ \int_a^\infty f'(x)g(x)\; dx = \left[f(x)g(x)\right]_a^\infty – \int_a^\infty f(x)g'(x)\; dx$$

without checking first that the three limits involved are convergent.

I couldn't find a counter-example to the last formula.

What is a counter-example to the formula $ \int_a^\infty f'(x)g(x)\; dx = \left[f(x)g(x)\right]_a^\infty – \int_a^\infty f(x)g'(x)\; dx$?

Bonus point for a simple counter-example (involving functions whose antiderivatives are easy to compute).

Best Answer

Consider the integral $\int_0^1 \frac{\log(t)}{(1+t)^2}\mathrm d t$.

This integral is convergent, but with $f(t) = \log(t)$ and $g(t) = \frac{-1}{1+t}$, you get $$\int_0^1 \frac{\log(t)}{(1+t)^2}\mathrm d t = \left[ \frac{-\log(t)}{1+t}\right]_0^1 + \int_0^1 \frac{\mathrm d t}{t(t+1)}.$$

But the integral on the RHS is not convergent (the antiderivative is $\log\left(\frac{t}{t+1}\right)$), neither the bracket part.