# Is this enough to demonstrate divergence of an improper integral?

The integral in question is

$$\int_0^\infty (f(x)-a)^2dx$$

Where f(x) is some continuous function and a is some constant.

When we expand the integrand,we end up with an $a^2$ term. We can then split up the integral to get:

$$\int_0^\infty [f(x)]^2dx +\int_0^\infty -2af(x)dx+\int_0^\infty a^2dx$$

Now we know that the third of the above integrals diverges, since it just becomes $a^2x$ (which tends to infinity as x increases).

Is this fact enough to demonstrate that the integral diverges? I highly suspect not but don't know for sure.

• No you can't expand the integrand on this manner! The integral may be convergent or divergent without further assumption on $f$.
– user63181
Commented Dec 19, 2014 at 4:23

In order to split a sum of integrals, you need them to each converge to a finite number, or for there to be just one of $+\infty$ and $-\infty$ which all of the infinite ones converge to. Here this may not necessarily happen, because you can have, for instance, the case $f(x)=a$, in which case the original integral is zero but the sum is the indeterminate form $\infty - \infty + \infty$ (assuming $a \neq 0$).
• @surelyourejoking Provided you're integrating bounded functions over bounded intervals, all relevant integrals will be finite, which means you can do pretty much whatever you want. In other words: yes, with the caveat that this needs the fact that $g(x) = (f(x)-a)^2$ is bounded. (In the sense of Riemann integration, all proper integrals have bounded integrands, so this is not actually any additional restriction.)
• Frankly speaking, the caveat is the following: when you study properties of limits, then you have property "if $\lim f(x)$ and $\lim g(x)$ exist (for $x$ tending somewhere, to finite value or infinity), then $\lim ( f(x)+g(x) )$ and is equal to $\lim f(x) + \lim g(x)$". It works only in one direction, only if, not iff. Commented Dec 19, 2014 at 6:31