1

I am trying to evaluate this integral using integration by parts.

$$I=\int_{0}^{\infty}f(x)g'(x)dx,$$ where $f(x)=\sin x$ and $g'(x)=\dfrac{x}{1+x^2}$. So: $f'(x)=\cos x$ and $g(x)=\dfrac{1}{2}\log(1+x^2)$.

Therefore: $$\begin{equation}\begin{split}I=\int_{0}^{\infty}f(x)g'(x)dx&=\left[f(x)g(x)\right]_{0}^{\infty}-\int_{0}^{\infty}f'(x)g(x)dx,\\&=\left[\dfrac{1}{2}\log (1+x^2)\sin x\right]_{0}^{\infty}-\underbrace{\int_{0}^{\infty}\dfrac{1}{2}\log(1+x^2)\cos x\,dx}_{\text{another integration by parts}},\\&=\left[\dfrac{1}{2}\log (1+x^2)\sin x\right]_{0}^{\infty}-\dfrac{1}{2}\left(\left[-\log (1+x^2)\sin x\right]_{0}^{\infty}+\\2\underbrace{\int_{0}^{\infty}\sin x\dfrac{x}{1+x^2}dx}_{I}\right)\\&=\left[\log (1+x^2)\sin x\right]_{0}^{\infty}-I.\end{split}\end{equation}$$

Thus, $$I=\left[\dfrac{1}{2}\log (1+x^2)\sin x\right]_{0}^{\infty}=\lim_{x\to\infty}\dfrac{1}{2}\log (1+x^2)\sin x.$$

My question is: Whatever I did a mistake or not (of course I would like to know also), I would like to know what are the conditions to use integration by parts. Is it always allowed?

x.y.z...
  • 1,150
  • 1
    You did make a mistake; you have a sign wrong on the second integration by parts (in fact, the sign is wrong on both terms), and you will get $0=0$ I think, which is not too helpful :) In answer to your question, integration by parts is always valid assuming the component functions are reasonable, but it will not always be useful, nor can you always carry it through to get an answer in terms of elementary functions. – rogerl Jul 09 '14 at 14:52
  • 2
    "Evaluation" of $\frac{1}{2}\log(1+x^2)\sin x$ "at $\infty$" does not make sense. – André Nicolas Jul 09 '14 at 14:58
  • I thought it is $\infty$ @AndréNicolas – x.y.z... Jul 09 '14 at 15:00
  • 1
    It is quite unsafe to treat the symbol $\infty$ as if it were a number. For example, let $n$ be vary large, and let $x=n\pi$. Then $\sin x=0$, and therefore $\frac{1}{2}\ln(1+x^2)\sin x=0$. Or else imagine $x$ very large, but such that $\sin x=-1$. Then $\frac{1}{2}\ln(1+x^2)\sin x$ is large negative. – André Nicolas Jul 09 '14 at 15:05
  • Thank you. I understand it. – x.y.z... Jul 09 '14 at 15:13
  • By the way, the definite integral you started with does converge, and can be evaluated exactly using tools from complex variables. What is the original question you were asked? – André Nicolas Jul 09 '14 at 15:13
  • I was trying to answer this question (http://math.stackexchange.com/q/861230/15941) and I tried integration by parts by I found that it does not make sense. So I thought that maybe integration by parts cannot be used everywhere. Then I asked this question. – x.y.z... Jul 09 '14 at 15:27

2 Answers2

2

Your second integration by parts has an extra minus sign.

Overall, what you are trying to do wouldn't yield anything useful, because you write essentially this:

$$\int fg' = [fg]-\int f'g = [fg]- \left([fg]-\int fg'\right).$$

So unless you suddenly can produce an antiderivative of $\ln (1+x^2)$, your double integration by parts doesn't help.

TZakrevskiy
  • 22,980
2

To elaborate on @rogerl's comment, integration by parts holds when $f$ and $g$ are regular and of finite variation. For an example of why it is not sufficient for $f$ and $g$ to just be differentiable, see this reference.

MRicci
  • 1,646