# Definite integrals solvable using the Feynman Trick

I'm looking for definite integrals that are solvable using the method of differentiation under the integral sign (also called the Feynman Trick) in order to practice using this technique.

Does anyone know of any good ones to tackle?

Since this became quite popular I will mention here about an introduction to Feynman's trick that I wrote recently. It also contains some exercises that are solvable using this technique.

My goal there is to give some ideas on how to introduce a new parameter as well as to describe some heuristics that I tend to follow when using Feynman's trick, hoping that it can serve as a good starting point.

In case you are already familiar with Feynman's trick or prefer to evaluate some integrals directly, here is a brief list:

A few good ones are: $$\int_0^\infty e^{-\frac{x^2}{y^2}-y^2}dx$$ $$\int_0^\infty \frac{1-\cos(xy)}xdx$$ $$\int_0^\infty \frac{dx}{(x^2+p)^{n+1}}$$ $$\int_{0}^{\infty}e^{-x^2}dx$$ $$\int_0^\infty \cos(x^2)dx$$ $$\int_0^\infty \sin(x^2)dx$$ $$\int_0^\infty \frac{\sin^2x}{x^2(x^2+1)}dx$$ $$\int_0^{\pi/2} x\cot x\ dx$$ That should keep you busy for a while ;)

I know I am kind of late, but here are a few $$\int_{-\infty}^\infty\frac{\ln{(x^2+1)}}{x^4+x^2+1}\,dx$$ $$\int_{-\infty}^\infty\frac{\ln{(x^4+x^2+1)}}{x^4+1}\,dx$$ $$\int_{-\infty}^\infty\left(x^2+\frac{1}{x^2}\right)e^{-\left(x^2+\frac{1}{x^2}\right)}\,dx$$ $$\int_{-\infty}^\infty\frac{x^2+2\cos{x}-2}{x^4}\,dx$$ $$\int_{-\infty}^\infty\frac{x^2+2\cos{x}-2}{x^4(x^2+1)}\,dx$$ $$\int_{-\infty}^\infty\left(\frac{1-\cos{x}}{x^2}\right)^2\,dx$$ $$\int_0^\infty\frac{\ln{(x+\sqrt{x^2+1})}} {(x+\sqrt{x^2+1})^2}\,dx$$ $$\int_0^{\frac{\pi}{2}}x\sqrt{\tan{x}}\space dx$$

you can try the most famous one which is: $$\int_0^\infty\frac{\sin(x)}{x}dx$$ good luck!

Maybe you can look at:

https://math.stackexchange.com/a/2989801/186817

Feynman's trick is used to compute:

\begin{align}\int_0^{\frac{\pi}{12}}\ln(\tan x)\,dx\end{align}

• Is the upper limit meant to be $\frac{\pi}{2}$
– user150203
Nov 16, 2018 at 1:00
• No, it's $\dfrac{\pi}{12}$. with upper bound to be $\dfrac{\pi}{2}$: \begin{align}\int_0^{\frac{\pi}{2}}\ln(\tan x)\,dx=0\end{align} (perform the change of variable $y=\dfrac{\pi}{2}-x$ )
– FDP
Nov 16, 2018 at 15:28

Another example is in evaluating $$\displaystyle \int_0^\infty \dfrac{\cos xdx}{1+x^2}$$

by first considering $$I\left(a\right)=\int_{0}^{\infty}\frac{\sin\left(ax\right)}{x\left(1+x^{2}\right)}dx,\,a>0$$ we have $$I'\left(a\right)=\int_{0}^{\infty}\frac{\cos\left(ax\right)}{1+x^{2}}dx$$ From which it can be shown that $$I\left(a\right)=\frac{\pi}{2}\left(1-e^{-a}\right)$$ hence $$\lim_{a\rightarrow1}I'\left(a\right)=\frac{\pi }{2e}.$$

$$I_9$$ in Zacky's answer is a special case to $$I(s)=\int_0^\infty \frac{x^s}{x^2+1} \, {\rm d}x \tag{1}$$ with $$-1<\Re(s)<1$$, i.e. $$I_9 = \int_{2/3}^{4/5} I(s) \, {\rm d}s \, .$$ (1) can be solved by contour integration $$2\pi i\, {\rm Res} \left( \frac{z^s}{z^2+1} \right)\Bigg|_{z=i}=\pi e^{i\pi s/2} = \oint_{-\infty}^\infty\frac{z^s}{z^2+1} \, {\rm d}z \\ = \int_{-\infty}^{-\epsilon}\frac{z^s}{z^2+1} \, {\rm d}z + \int_{|z|=\epsilon}\frac{z^s}{z^2+1} \, {\rm d}z + \int_\epsilon^\infty \frac{z^s}{z^2+1} \, {\rm d}z + \int_{|z|=\infty} \frac{z^s}{z^2+1} \, {\rm d}z \\ = I_- + I_\epsilon + I_+ + I_\infty \, ,$$ where the contour is closed and avoids the cut in the upper half plane. The second and fourth integral can be estimated and $$I_-$$ can be related to $$\lim_{\epsilon \rightarrow 0} I_+ = I(s)$$ $$|I_\epsilon| \leq \frac{\pi \epsilon^{s+1}}{1-\epsilon^2} \rightarrow 0 \quad \text{for} \quad \epsilon\rightarrow 0 \\ |I_\infty| \leq \frac{\pi R^{s+1}}{R^2-1} \rightarrow 0 \quad \text{for} \quad R\rightarrow \infty \\ \lim_{\epsilon \rightarrow 0} I_- \stackrel{z=-x}{=} \int_{0-i0}^{\infty-i0} \frac{(-x)^s}{x^2+1} \, {\rm d}x= e^{i\pi s} \int_0^\infty \frac{x^s}{x^2+1} \, {\rm d}x = e^{i\pi s} I(s) \, .$$ Hence $$\pi e^{i\pi s/2} = \lim_{\epsilon \rightarrow 0} \left(I_+ + I_-\right) = (1+e^{i\pi s})I(s) \\ \Rightarrow \quad I(s)=\frac{\pi/2}{\cos(\pi s/2)} \, .$$ Finally $$\int I(s) \, {\rm d}s = \log\left( \tan(\pi s/2) + \sec(\pi s/2) \right) + C \\ = \log\left( \tan\left(\frac{\pi}{4}(s+1)\right)\right) + C\, .$$

The integral $$\displaystyle \int_0^1 \frac{x-1}{\ln x}dx$$ can be used to introduce Feynman's trick (Leibniz was already using this trick)

• Leibiniz never used the trick to compute integrals. Aug 2, 2023 at 19:56