Showing posts with label gamma function. Show all posts
Showing posts with label gamma function. Show all posts

Wednesday, 14 December 2022

Two Equations, Two Unknowns and the Beta Function

I spotted this little problem on Twitter (see Figure 1):


Figure 1

The proximity of \(+31\) to \(+32\) should alert us to the possibility that either \(x=+2\) or \(y=+2\) is a solution. After that, the corresponding \(x\) and \(y\) values fall into place. However, let's suppose that we didn't spot this and I have to confess I didn't. In that case, we follow the conventional method. 

At first sight, it looks like you will end up with a quintic equation after substituting \(y=1-x\) into \(x^5+y^5=31\) and there is no general formula for solving quintic equations. However, the \(x^5\) terms cancels out nicely leaving us with a quartic equation. Let's see how:$$\begin{align} x^5+(1-x)^5&=31\\x^5+(1-5x+10x^2-10x^3+5x^4-x^5)&=31\\5x^4-10x^3+10x^2-5x-30&=0\\5x^3(x-2)+5(2x^2-x-6)&=0\\5x^3(x-2)+5(2x+3)(x-2)&=0\\(x-2)(5x^3+10x+15)&=0\\5(x-2)(x^3+2x+3)&=0\\5(x-2)(x+1)(x^2-x+3)&=0 \end{align}$$Thus \(x=2\) and \(y=-1\) or \(x=-1\) and \(y=2\). Using GeoGebra, this can be confirmed visually as shown in Figure 2:


Figure 2

Differentiation reveals a little more about the graph of \(x^5+y^5=31\):$$\begin{align} y'&=\frac{-x^4}{y^4}\\&=-\frac{x^4}{\sqrt[5]{31-x^5}} \end{align} $$It can be seen that \(y'\) is undefined when \(x=\sqrt[5]{31} \approx 1.9873 \) and thus the graph is vertical at this point. If we zoom in a little, this becomes clearer (see Figure 3). There is a point of horizontal inflection when \(x=0\).


Figure 3

This was a useful little exercise as I got to revisit the binomial expansion for \( (a+b)^5\) and the factor theorem in order to factorise \(x^3+2x+3\). Using 1 rather than 31, I was also prompted to consider the area under the curve for \( x^5+y^5 =1\) between 0 and 1. See Figure 4.


Figure 4

In this graph, the vertical tangent occurs at \(x=1\) and this got me thinking about the area under the curve between 0 and 1. In other words, what is the value of:$$ \int_0^1 \sqrt[5]{1-x^5} \, dx$$Using SageMathCell, the integral evaluates to:$$ 0.2 \cdot \beta \! \left (0.2, 1.2 \right )$$Now I vaguely remember coming across a so-called \( \beta \) function that is in some way, I think, related to the \(\Gamma \) function. Further investigation revealed that they are indeed related. In fact:$$ 0.2 \cdot \beta(0.2, 1.2)= 0.2 \cdot \frac{ \Gamma(0.2) \cdot \Gamma(1.2)}{ \Gamma(0.2 +1.2)} \approx 0.950150138988437 $$This result looks about right but what is going on with this \( \beta \) function? Well, the beta function is actually an integral between 0 and 1 involving two different values, let's say \(a\) and \(b\), so that we have:$$\beta(a,b)=\int_0^1 t^{a-1} \cdot (1-t)^{b-1} dt$$If we can get our integral into that form then we can integrate it. Firstly, we make a substitution. Let \(t=x^5\) and so \(dt/dx=5x^4\) and \(dx=0.2 x^{-4}\). We can write \(x^{-4}=t^{-0.8}\) and the integral now transforms into:$$ \begin{array} \displaystyle \displaystyle \int_0^1 \sqrt[5]{1-x^5} \, dx &=\text{0}.2 \displaystyle \int_0^1 t^{-0.8} (1-t)^{0.2} \, dt \\&=0.2 \displaystyle \int_0^1 t^{0.2-1} (1-t)^{1.2-1} \, dt\\&=0.2 \, \beta(0.2,1.2) \end{array} $$So this was quite an interesting post that led me in some unexpected directions. I also was interested in the area between the curves \(x^2+y^2=1\) and \(x^5+y^5=1\) in the range from 0 to 1. See Figure 5 where eq2 is \(x^2+y^2=1\) and the curve \(x^5+y^5=1\) is a tangent to the circle at \(x=0\) and \(x=1\).


Figure 5

Clearly, the area between the two curves from \(x=0 \text{ to }1\) is given by \( \beta(0.2,1.2) - \dfrac{\pi}{4} \). What I've learned from all this is that the \(\beta\) function is a very useful tool to have in one's integration armoury.

Monday, 25 October 2021

Fee, Phi, Fo, Sum

Time to return to integrals for a while and practice my LaTeX skills. I came across an interesting video on YouTube recently that investigated the following integral:$$\int_0^{\infty} \frac{1}{(1+x^{\phi})^{\phi}}\, \text{d}x$$Figure 1 shows that the result is 1 using GeoGebra, using 1000 as the limit of integration rather than infinity, because the program doesn't seem to cope with the latter. 


Figure 1

The program however, gives no clue as to how this result was arrived at, although it looks to be likely given the appearance of the area under the curve. Symbolab isn't much help. See Figure 2.


Figure 2

The online integral calculator wasn't any help either. See Figures 3 and 4.


Figure 3


Figure 4

So to show why the integral is equal to 1, I'll basically follow the steps as outlined in the video. Let's remember that \(\phi\) is the solution to the equation:$$ \begin{align}x^2-x-1&=0\\ \text{where }x&=\frac{1+\sqrt{5}}{2}=\phi\\ \text{also } 1&=\phi^2-\phi\\ \text{and } \frac{1}{\phi}&=\phi-1 \end{align}$$To integrate, the following substitution is used:$$\begin{align}u&=x^{\phi}\\ \text{d}u&=\phi x^{\phi-1} \text{d}x\\ \frac{\text{d}u}{\phi x^{\phi-1}}&=\text{d}x \end{align}$$The limits of integration don't need to be changed because \(u=0\) when \(x=0\) and \(u \rightarrow \infty\) as \(x \rightarrow \infty\). So the integral becomes:$$ \int_0^{\infty} \frac{\text{d} u}{(1+u)^{\phi} \, \phi \, x^{\phi-1}}$$ However \( \dfrac{u}{x}=x^{\phi-1} \) because \(u=x^{\phi}\) and so the integral becomes:$$ \frac{1}{\phi} \, \int_0^{\infty} \frac{x}{(1+u)^{\phi} \, u} \text{d}u$$Because \(u=x^{\phi}\), we can write \(u^{1/\phi}=x\), thus the integral now becomes:$$\frac{1}{\phi} \, \int_0^{\infty} \frac{u^{1/\phi}}{(1+u)^{\phi} \, u} \text{d}u$$Now we saw earlier that \(\dfrac{1}{\phi}=\phi-1\) and we can use this fact in transforming the integral even further. We can now write it as:$$ \begin{align} \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1}}{(1+u)^{\phi} \, u} \text{d}u &= \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1-1}}{(1+u)^{\phi}} \text{d}u \\ &= \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1-1}}{(1+u)^{\phi-1+1}} \text{d}u \end{align} $$Now this last transformation of the integral may seem strange but it's usefulness becomes apparent once we bear in mind the beta function, defined as:$$ \beta(x,y)=\int_0^{\infty} \frac{u^{x-1}}{(1+u)^{x+y}} \text{d}u=\frac{\Gamma(x) \, \Gamma(y)}{\Gamma(x+y)}$$In this beta function, if we let \(x=\phi-1\) and \(y=1\), our integral now becomes:$$\begin{align} \frac{1}{\phi} \beta(\phi-1,1)&=\frac{1}{\phi} \, \frac{\Gamma(\phi-1) \, \Gamma(1)}{\Gamma(\phi)}\\ &=\frac{1}{\phi} \, \frac{(\phi-2)! \, 0!}{(\phi-1)!}\\&= \frac{1}{\phi} \, \frac{1}{\phi-1} \\ &= \frac{1}{\phi^2-\phi}\\ &=1 \end{align} $$Thus we have confirmed that the integral does indeed evaluate to 1. The transformation of the gamma function to the factorial is achieved via the fact that \( \Gamma(x)=(x-1)!\).

Here is the actual video embedded into this blog. It covers precisely the same steps and my main purpose in creating this blog is simply to prevent my LaTeX skills from becoming too rusty.

Saturday, 28 January 2017

Double Factorial

On Day 24771, my tweet was:
24771: 3×23×359; member of OEIS A259359: numbers n such that n!!-8 is prime (useful as a means of generating probable primes) #mathematics. 
Prior to this I'd been perplexed until I read the following in Wikipedia:
The double factorial should not be confused with the factorial function iterated twice, which is written as (n!)! and not n!!
This of course is quite confusing. The Wikipedia goes on to say that:
The sequence of double factorials for even n = 0, 2, 4, 6, 8,... starts as
1, 2, 8, 48, 384, 3840, 46080, 645120,... (sequence A000165 in the OEIS) 
The sequence of double factorials for odd n = 1, 3, 5, 7, 9,... starts as
1, 3, 15, 105, 945, 10395, 135135,... (sequence A001147 in the OEIS) 
Perhaps the alternative term semifactorial is more appropriate and odd factorial is sometimes used for the double factorial of an odd number. Interestingly, the Wikipedia article mentions that double factorials also arise in expressing the volume of a hypersphere. The 4-dimensional hypersphere, or 3-sphere, was the subject of my previous post. The formula for the volume of an n-dimensional hypersphere is:

 
which reduces to the familiar formula for the volume of a sphere when n=3.

Saturday, 29 October 2016

Gaussian Integral, the Jacobian and the Gamma Function

To evaluate the Gaussian Integral requires the use of double integrals and the Jacobian for the change of variables from rectangular to polar coordinates. The following YouTube video gives a clear account of how this integral is evaluated:



The following video deals with the gamma function for value 1/2 (=1/2!) and the use of the above integral technique to evaluate it.



The final video is by the author of the second video and is an introduction to the gamma function. I'm just skimming the surface of things here but it's a start.