# Solving a difficult integral

Mr Davis 97
I have the integral ##\displaystyle \int_{- \infty}^{\infty} \frac{\cos x}{x^2+1} dx##. We are going to use differentiation under the integral sign, so we let ##\displaystyle I(t) = \int_{- \infty}^{\infty} \frac{\cos tx}{x^2+1} dx##, and then, after manipulation, ##\displaystyle I'(t) = \int_{- \infty}^{\infty} \frac{\sin tx}{x(x^2+1)} dx - \int_{- \infty}^{\infty} \frac{\sin tx}{x} dx##. My question lies in the rightmost integral. In a solution I've seen, the rightmost integral is linked to the Dirichlet integral: https://en.wikipedia.org/wiki/Dirichlet_integral. And so ##\pi## is simply substituted for this expression. What I don't understand is how can it be linked to this known integral when there is that ##t## in the argument of ##\sin##?

Homework Helper
Gold Member
2021 Award
Can you not change variables? Let ##u=tx##, etc. etc.

Mr Davis 97
Can you not change variables? Let ##u=tx##, etc. etc.
Okay, I see how that could work... But I don't know the sign of t, right? As such I can't tell whether the upper bound on the integral goes to ##+ \infty## or ##- \infty##