$\def\d{\mathrm{d}}$A common integration technique is to employ Feymann's trick. Assume that we have the following function of two variables$$\int_a^bf(x,y)\, \d x$$Then we can differentiate with respect to $y$ provided that $f$ is continuous and has partial continuous derivative on a chosen interval$$F'(y)=\int_{a}^bf_y(x,y)\, \d x$$But using this approach may be difficult because you have to think a lot to get the required answer. Since most integrals are in one variable, you will have to introduce a second variable and assume it is a function with two variables.


A worked example of integrating $\dfrac{x^2-1}{\ln x}$ with respect to $x$.$$\int_0^1\frac {x^2-1}{\ln x}\, \d x=?\tag1$$Since we can get a natural log when we diffentiate an exponential function $F(a)=2^a\implies F'(a)=\ln a\cdot 2^a$. Applying this to our problem, we have$$F(a)=\int_0^1\frac {x^a-1}{\ln x}\, \d x$$And taking the partial derivative with respect to $a$ gives$$F'(a)=\int_0^1\frac {\partial}{\partial a}\left(\frac {x^a-1}{\ln x}\right)\, \d x=\int_0^1x^a\, \d x=\frac 1{a+1}\tag{2}$$Integrating with respect to $a$ gives us$$F(a)=\ln(a+1)+C$$Set $a=0$ to find the value of the constant and we get $C=0$. Therefore, it implies that$$\int_0^1\frac {x^a-1}{\ln x}\, \d x=\ln(a+1)\implies\int_0^1\frac {x^2-1}{\ln x}\, \d x=\ln 3\tag3$$


  1. How do you know what to set $a$ as? In this case, they set the exponent of $x$ as $a$. Why? What was their reasoning?
  2. Isn't the derivative of $2^a=\ln 2\cdot 2^a$, not $\ln a\cdot 2^a$?
  3. Why did they set $a=0$? Why not $a=1$, or $2$?
  4. How do you integrate this using Feymann's trick?$$\int_0^\infty\frac {\sin x}x\, \d x\tag4$$
  • $\begingroup$ About (2), you're right. But see that when differentiating $x^a$, they did w.r.t. $a$, so you have a $(\ln x)x^a$. $\endgroup$ – AspiringMathematician Apr 18 '17 at 3:26
  • $\begingroup$ About (3), notice that $F(0)=0$. To see that, substitute $a=0$ in the integral when you defined $F(a)$. $\endgroup$ – AspiringMathematician Apr 18 '17 at 3:28
  • 2
    $\begingroup$ Well... this "trick" was "discovered" some centuries before than Feynmann was born but some one called Leibniz. $\endgroup$ – Masacroso Apr 18 '17 at 5:08
  • $\begingroup$ @Masacroso Well, I thought that I read somewhere that it was Feymann who first used this trick. But oh well $\endgroup$ – Crescendo Apr 19 '17 at 0:49

Let the integral of interest, $I$, be given by

$$I=\int_0^1 \frac{x^2-1}{\log(x)}\,dx \tag 1$$

The challenge in evaluating $I$ as given in $(1)$ is the presence of the logarithm in the denominator. So, we would like to find a way of eliminating the offending term.

One way to do this is to exploit the fact that $\frac{d\,x^a}{da}=\log(x)x^a$. Hence, if we had $x^a$ instead of $x^2$ in the numerator of the integrand, we could differentiate under the integral sign and eliminate the logarithm from the denominator.

It is worthy of mentioning that a second approach to eliminate the logarithm from the denominator is to recognize that $\frac{x-1}{\log(x)}=\int_0^1 x^t\,dt$ and proceed accordingly.

We proceed by forming a new function $F(a)$ given by

$$F(a)=\int_0^1 \frac{x^a-1}{\log(x)}\,dx \tag 2$$

so that upon differentiating $(2)$ under the integral sign reveals that

$$F'(a)=\int_0^1 x^a\,dx= \frac{1}{a+1} \tag 3$$

It is at this point that we would like to recover $F(a)$ and then $F(2)$. We can find $F(a)$ to within an integration constant from $(3)$ by integrating over $a$. Proceeding we obtain

$$F(a)=\log(a+1)+C \tag4$$

where $C$ is yet to be found. To find $C$, we need to know the value of $F(a)$ at some point. If $a=1$ or $a=2$, we would need to evaluate $F(1)$ or $F(2)$, respectively.

Well, if we already knew $F(2)$ we would not have to have gone through this procedure. And to find $F(1)=\int_0^1 \frac{x-1}{\log(x)}\,dx$ we suffer from the appearance of the offending logarithm in the denominator.

But $F(0)=\int_0^1 \frac{x^0-1}{\log(x)}\,dx=0$ is trivial to evaluate. And now that we know that $F(a)=\log(a+1)+C$ and $F(0)=0$, we see that $C=0$.

This leaves us with $F(a)=\log(a+1)$ from which we see that $F(2)=\log(3)$. And we are done!

Note that $F(2)=\int_0^1 \frac{x^2-1}{\log(x)}\,dx$ is the integral of interest.

To evaluate $\int_0^\infty \frac{\sin(x)}{x}\,dx$ by use of Feynman's Trick, we introduce the function

$$G(a)=\int_0^\infty \frac{e^{-ax}\sin(x)}{x}\,dx\tag 5$$

Since $\int_0^\infty e^{-ax}\sin(x)\,dx$ converges uniformly for $a\ge \delta>0$, we assert that

$$G'(a)=\int_0^\infty e^{-ax}\sin(x)\,dx=\frac{1}{1+a^2} \tag 6$$

Integrating $(6)$ we find that


Letting $a\to \infty$ in $(5)$ reveals $\lim_{a\to \infty}G(a)=0$ and hence $C=\pi/2$.

Finally, we see that $G(0)=\pi/2$ and we are done!

  • $\begingroup$ I'm sorry to have missed this post and glad I saw it in the queue after edit. Nice overview, I'll have to show it to students some time! $\endgroup$ – Brevan Ellefsen Apr 19 '17 at 2:27
  • $\begingroup$ Brevan, I'm honored that you'd consider showing this solution to you students. -Mark $\endgroup$ – Mark Viola Apr 19 '17 at 2:28
  • $\begingroup$ @Crescendo I don't understand your question. We wish to find $C$. It is easy to see that $\lim_{a\to \infty}G(a)=0$ $\endgroup$ – Mark Viola May 9 '17 at 14:33
  • $\begingroup$ @MarkViola Ignore the last question I asked, I understand it now. $\endgroup$ – Crescendo Jul 16 '17 at 3:33
  • $\begingroup$ @MarkViola So how did you know to assume $$\sin x/x$$ as a function of $$\frac {e^{-ax}\sin x}x$$For $a=0$? Was it because$$\int\limits_0^{\infty}e^{-ax}\sin x\, dx$$converges uniformly? Or is it a combination of thoughts? $\endgroup$ – Crescendo Jul 16 '17 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.