6

Introduction:

$\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.

Example:

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$$

Questions:

  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$$
Ѕᴀᴀᴅ
  • 34,263
Crescendo
  • 4,089

1 Answers1

9

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

$$G(a)=-\arctan(a)+C$$

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!

Mark Viola
  • 179,405
  • 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! – Brevan Ellefsen Apr 19 '17 at 02:27
  • Brevan, I'm honored that you'd consider showing this solution to you students. -Mark – Mark Viola Apr 19 '17 at 02:28
  • @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$ – Mark Viola May 09 '17 at 14:33
  • @MarkViola Ignore the last question I asked, I understand it now. – Crescendo Jul 16 '17 at 03:33
  • @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? – Crescendo Jul 16 '17 at 03:34
  • @MarkViola +1 Very nice answer. If I may ask: for $\int_{0} \to \infty \frac{sin x}{x}dz$, is there anything more to the motivation of picking $(e^{-ax} \sin x)/x$ besides "The offending term is an $x$ in the denominator, and the derivative of an exponential function will cancel it?" – Ovi Sep 04 '19 at 18:54
  • 1
    @Ovi First, thank you for the upvote and the nice note. As far as the motivation for analyzing $G(a)$ and $G'(a)$, there is really nothing more than to say that it works. Feynman's trick is a very useful tool in evaluating certain integrals for which a useful antiderivative is unavailable. The challenge is always finding a suitable way forward. – Mark Viola Sep 04 '19 at 21:00
  • @MarkViola Thank you for your response. – Ovi Sep 04 '19 at 21:04
  • @Ovi You're welcome. My pleasure. – Mark Viola Sep 04 '19 at 21:07
  • @MarkViola Perhaps I'm missing something, but shouldn't there be a minus sign after you differentiate the integrand of Eq. 5 w.r.t. $ a $? i.e. $ G(a) = - \text{arctan}(a) + C $. (This doesn't change the final answer though.) – GnomeSort May 17 '20 at 16:05
  • 1
    @NewDogOldTricks Indeed. Good catch. I've edited. – Mark Viola May 17 '20 at 16:15
  • Please let me know how I can improve my answer. I really want to give you the best answer I can. – Mark Viola May 27 '20 at 18:36