Showing posts with label Feynman. Show all posts
Showing posts with label Feynman. Show all posts

Tuesday, 30 March 2021

More Feynman Integration

On December 20th 2020, I created a post titled Feynman Integration in which I used Feynman's technique to show that: $$\int_\infty^\infty \frac{\cos x}{x^2+1} \mathrm{d}x=\frac{\pi}{\mathrm{e}}$$Lately my daily number analysis has not generated any material for a post but I have been practising my LaTeX skills and I thought that this blackpenredpen video that involved the use of Feynman's technique provided a good opportunity in this regard. Here is the video:


In this post, I'll be showing that:$$\int_0^1 \frac{\sin(\ln x)}{\ln x} \mathrm{d}x=\frac{\pi}{4}$$So let's get started. Firstly, we need to remember that:$$\begin{align}
\sin z &= \frac{e^{iz}-e^{-iz}}{2i}\\
\therefore \sin( \ln x)&=\frac{e^{i \ln x}-e^{-i \ln x}}{2 i}\\
&=\frac{e^{(\ln x)^{i}}-e^{(\ln x )^{-i}}}{2i}\\
&=\frac{x^i-x^{-i}}{2i}
\end{align}$$Thus our original integral changes:$$\begin{align} \int_0^1 \frac{\sin(\ln x)}{\ln x} \mathrm{d}x&=\int_0^1 \frac{x^i-x^{-i}}{2i \ln x} \mathrm{d}x\\
\text{ let }I(b) &=\int_0^1 \frac{x^{bi}-x^{-i}}{2i \ln x} \mathrm{d}x \text{ where }b \text{ is a parameter}\\
\frac{\mathrm{d}}{\mathrm{d}b}I(b) &=\frac{\mathrm{d}}{\mathrm{d}b}\int_0^1 \frac{x^{bi}-x^{-i}}{2i \ln x} \mathrm{d}x\\
I'(b)&=\int_0^1 \frac{\partial{}}{\partial{b}} \left (\frac{x^{bi}-x^{-i}}{2i \ln x} \right ) \mathrm{d}x \\
&=\int_0^1 \frac{\ln x \cdot x^{bi} \cdot i}{2i \ln x}\\
&=\frac{1}{2} \int_0^1 x^{bi} \mathrm{d} x\\
&=\frac{1}{2}\left[\frac{x^{bi+1}}{bi+1}\right]_{x=0}^{x=1}\\
&=\frac{1}{2(bi+1)}\\
\therefore I(b)&=\frac{\ln(bi+1)}{2i}+C\\
\text{but } I(-1)&=\int_0^1 \frac{x^{-1}-x^{-1}}{2i \ln x} \mathrm{d} x \text{ when }b=-1\\
&=0\\
\therefore C&=-\frac{\ln(1-i)}{2i}\\
\text{and } I(b)&=\frac{\ln(bi+1)}{2i}-\frac{\ln(1-i)}{2i}\\
I(1)&=\frac{\ln(1+i)}{2i}-\frac{\ln(1-i)}{2i}\\
&=\frac{1}{2i} \left (\ln(1+i)-\ln(1-i) \right )\\
&=\frac{\ln \left (\dfrac{1+i}{1-i} \right )}{2i}\\
&=\frac{1}{2i} \cdot \ln i\\
&=\frac{1}{2i} \cdot \frac{\pi}{2} \cdot i\\
&=\frac{\pi}{4}\\
\text{thus }\int_0^1 \frac{\sin(\ln x)}{\ln x} \mathrm{d}x&=\frac{\pi}{4}
\end{align}$$
Even though complex numbers were used in the solution, the final result for our real integral yielded a real solution. The typesetting for this post took quite some time but it provided valuable practice. So what does the graph of the function \( \dfrac{\sin(\ln x)}{\ln x}\) look like? This is what my next post will examine.

Sunday, 20 December 2020

Feynman Integration

Figure 1 shows a graphic in a tweet by Cliff Pickover that caught my attention recently:

Figure 1

It turns out that the denominator of \(x^2+1)^2\) gives the same result for \(x^2+1\) so in this video I'll just be considering the integral:$$\text{I}=\int_{-\infty} ^{\infty} \frac{\cos x}{x^2+1} \text{ d}x$$It's such an aesthetic result that I thought I'd investigate how the result was arrived at. Flammable Maths YouTube channel solves this definite integral in three different ways, although in this post I'll only be looking at the Feynman method. I'll be simply reproducing the steps outlined in the video that is shown below. It's a good opportunity to practise my LaTeX.


The first step is to introduce a variable \(t\) into the integral:$$\text{I}(t)=\int_{-\infty} ^{\infty} \frac{\cos (t \, x)}{x^2+1} \text{ d}x$$When \(t=1\), we have \(\text{I}(1)=\text{I}\). Now we'll determine the first and second derivatives. Let's start with the first derivative:$$\text{I'}(t)=\int_{-\infty} ^{\infty} \partial_t \,\frac{\cos (t \, x)}{x^2+1} \text{ d}x=\int_{-\infty} ^{\infty} \frac{1}{x^2+1} \, -x \sin (t \, x) \text{ d}x$$Now we multiply top and bottom by \(x\) and add \(0\) in the form of \(+1 + -1\):$$\text{I'}(t)=-\int_{-\infty} ^{\infty} \frac{(x^2+1-1) \, \sin (t \, x)}{x \,(x^2+1)} \text{ d}x$$We can now split the integral into two parts thanks to our \(+1 + -1\) trick:$$\text{I'}(t)=-\int_{-\infty} ^{\infty} \frac{(x^2+1) \, \sin (t \, x)}{x \,(x^2+1)} \text{ d}x+\int_{-\infty} ^{\infty} \frac{ \sin (t \, x)}{x \,(x^2+1)} \text{ d}x$$The first part of the integral simplifies to:$$-\int_{-\infty} ^{\infty} \frac{ \sin (t \, x)}{x} \text{ d}x=-\pi $$We'll just accept that result for the moment and so we have the following result for the first derivative:$$\text{I'}(t)=-\pi+\int_{-\infty} ^{\infty} \frac{ \sin (t \, x)}{x \,(x^2+1)} \text{ d}x$$Now we'll find the second derivative:$$\text{I''}(t)=\int_{-\infty} ^{\infty} \partial_t \frac{ \sin (t \, x)}{x \,(x^2+1)} \text{ d}x=\int_{-\infty} ^{\infty} \frac{ \cos (t \, x)}{(x^2+1} \text{ d}x=\text{I}(t) $$The fact the the second derivative of the function is equal to the original function means that we have a second order linear differential equation of the form:$$\text{I''}(t)-\text{I}(t)=0 \text{ where we'll assume that I}(t)=c \, e^{\, \lambda \,t}$$This means that \(\text{I''}(t)=\lambda^2 \,c\,e^{\, \lambda \, t}\) and substituting this into the differential equation we get:$$\lambda^2 \,c\,e^{\, \lambda \, t}-c \, e^{\, \lambda \,t}=0 \implies c \, e^{\, \lambda \,t}(\lambda^2-1)=0 \text{ and }\lambda=\pm1$$Thus we have: $$ \text{I}(t)=c_1 \,e^{\, t}+c_2 \,e^{-t} \text{ and }\text{I'}(t)=c_1 \,e^{\, t}-c_2 \,e^{-t}$$$$\text{I}(0)=\pi=c_1+c_2 \text{ and } \text{I'}(0)=-\pi =c_1-c_2 \implies c_1=0 \text{ and }c_2=\pi$$ $$ \text{I}(t)=\pi \,e^{-t} \text{ and thus }\text{I}(1)=\text{I} =\frac{\pi}{e}$$.Figure 2 shows a graph of the function:

Figure 2

Clearly there are negative areas under the curve that will cancel with the positive areas but the bulk of the area lies between \( \frac{-\pi}{2} \) and \(\frac{\pi}{2}\).

Here are some links that Flammable Maths provides for some of the techniques used in this video:
There are lots of interesting integrals like the one we have just dealt with and I am certainly out of practice in dealing with them. I should make posts like this more frequently. Looking back over my previous posts, I notice that I've made the following integration-related posts:

Friday, 29 September 2017

Novel Integration Technique

How does one integrate the integral shown below? Well, the standard approaches don't work here and so a little trickery is called for. Here's the integral in question:  \[ \int_0^\infty \! \frac{\sin x}{x} \mathrm{d}x \]Firstly, let's define a function \( I(b) \) as follows:\[ I(b)=\int_0^\infty \! \frac{\sin x}{x}\mathrm{e}^{-bx} \mathrm{d}x \; \text{where } b>=0 \]Now let's differentiate both sides with respect to \(b \), not \( x \):\[ I'(b)=-\int_0^\infty  \! \sin x \, \mathrm{e}^{-bx} \mathrm{d}x \; \]Using integration by parts, \(I(b) \) can be expressed as follows: \[ I'(b)=\left. \frac{\mathrm{e}^{-bx}(\cos x + b \sin x)}{b^2+1} \right| _{x=0} ^{x=\infty} =-\frac{1}{b^2+1} \]The demonstration of this integration by parts can be found here. Now integrating both sides with respect to b, we get:\[I(b)=-\int \!\frac{1}{b^2+1} \mathrm{d}b =-\arctan b+\mathrm{C} \]Comparing this result for \( I(b) \) with our earlier result, we can write:\[ -\arctan b +\mathrm{C}=\int_0^\infty \! \frac{\sin x}{x}\mathrm{e}^{-bx} \mathrm{d}x \]Now as \( b \rightarrow \infty \), the equation reduces to: \[ -\frac{\pi}{2} + \mathrm{C}=0 \text{ and so } \mathrm{C}=\frac{\pi}{2} \]Finally, we can write:\[I(b)=-\arctan(b)+\frac{\pi}{2}=\int_0^\infty \! \frac{\sin x}{x}\mathrm{e}^{-bx} \mathrm{d}x \]Now setting \( b \)=0, we achieve our desired result, namely:\[ I(0)=\int_0^\infty \! \frac{\sin x}{x}\mathrm{d}x=\frac{\pi}{2} \]A video demonstration of this technique (known as Feynman's Technique, presumably after the famous physicist) can be found here: