4.Integration using special functions (continued)

4.1.Gamma Function (continued) :

For simplicity we assumed int the gamma definition (1) (look the previous post) that gamma only works for positive integers . This definition was so helpful as we assumed the relation between gamma and factorials . Actually ,this restricts the gamma function so much , we want to exploit the real strength of this very nice function .

Hence, we must extend the gamma function to work for all real numbers except for some values. Actually we will see soon that we can extend it to work for all complex numbers except where the function has poles .

There are many representations for the gamma function :

$\displaystyle \Gamma(z) = \lim_{n=\infty}\frac{n! \, \, n^z}{z(z+1)(z+2) \, . \, . \, . \, (z+n)}\text{ ---- (2) }$

$\displaystyle \Gamma(z)\,= \frac{e^{-\gamma z}}{z} \prod_{n=1}^\infty \left(1 + \frac{z}{n}\right)^{-1} e^{z/n}\text{ ----(3)}$

Let us focus for the time being on the first representation :

This tells us a lot about the analyticity of gamma function , we notice that the gamma function is analytic everywhere except for z={0,-1,-2,-3, ... } , so zero and the negative integers are excluded and the function is not defined in this set .

We know have extended the gamma function and we want to evaluate interesting values .

Let us start by the following :

Find the integral :

$$\int^{\infty}_{0}\, \frac{e^{-t}}{\sqrt{t}}\, dt$$

Now according to definition (1) this is equal to $\displaystyle \Gamma\left(\frac{1}{2}\right)$ but we want to find a value for this if it exists ?

Laplace transform will not help here since we don't know what is the Laplace of a root !

Let us first make a substitution $\displaystyle \sqrt{t}=x$

so we have the integral as : $\displaystyle 2\int^{\infty}_{0}\, e^{-x^2}\, dx$

Now to find this integral we need to do a simple trick ....

$\displaystyle \left(\int^{\infty}_{0}\, e^{-x^2}\, dx \right)^2$

we will first try to find the upper integral ...

$\displaystyle \left( \int^{\infty}_{0}\, e^{-x^2}\, dx\right)^2=\left( \int^{\infty}_{0}\, e^{-x^2}\, dx\right)\cdot \left(\int^{\infty}_{0}\, e^{-x^2}\, dx\right)$

Now this is the crux movement (stay seated , don't shout, it is all ok )

$\displaystyle \left(\int^{\infty}_{0}\, e^{-x^2}\, dx\right)\cdot \left(\int^{\infty}_{0}\, e^{-y^2}\, dy\right)$

So we have done nothing just changed the second x by sub
.

Now since they are two independent variables we can do the following :

$\displaystyle \int^{\infty}_0\int^{\infty}_{0}\, e^{-(x^2+y^2)}\, dy \, dx$

Now by polar substitution we can do the following :

$\displaystyle \int^{\frac{\pi}{2} }_0\int^{\infty}_{0}\, e^{-r^2}\, r\,dr \, d\theta$

so this becomes elementary :

$\displaystyle \int^{\frac{\pi}{2}}_0\,\frac{1}{2}\, d\theta= \frac{\pi}{4}$

So we have $\displaystyle \left(\int^{\infty}_{0}\, e^{-x^2}\, dx \right)^2=\frac{\pi}{4}$

Take the square root to both sides :

$\displaystyle \int^{\infty}_{0}\, e^{-x^2}\, dx =\frac{\sqrt{\pi}}{2}$

$\displaystyle 2\int^{\infty}_{0}\, e^{-x^2}\, dx =\sqrt{\pi}$

So we have our result $\displaystyle \fbox{$ \displaystyle \Gamma \left(\frac{1}{2}\right)=\sqrt{\pi}$}$

This result is very interesting and will use it to solve many integrals .

To be continued ...

4.Integration using special functions (continued)

4.1.Gamma Function (continued) :

There are still lots of properties of gamma function one of which is related to the

factorial function . we know that $\displaystyle n!=n(n-1)(n-2)\, ... \, 4\cdot 3\cdot 2\cdot 1$.

For gamma function we have the following property :

$$\Gamma(x+1) = x\Gamma(x)$$

This is interesting because we can find some values for certain inputs for gamma .

Assume that we want to find
$\displaystyle \Gamma\left(\frac{3}{2}\right)$:

If we used this property we get :

$\displaystyle \Gamma\left(1+\frac{1}{2}\right)= \frac{1}{2}\cdot\Gamma\left(\frac{1}{2}\right)=$$\displaystyle \frac{\sqrt{\pi}}{2} Not all the time the result will be reduced to a simpler form as the previous example. For example we dont know how to express \displaystyle \Gamma(\frac{1}{4}) in a simpler form but we can approximate its value : \displaystyle \Gamma(\frac{1}{4})\approx 3.6256 \, ... so sometimes we just solve some integrals in terms of gamma function since we don't know a simpler form ... For example solve the integral : \displaystyle \int^{\infty}_0 e^{-t}t^{\frac{1}{4}} we know by definition --- (1) of gamma function that this reduces to: \displaystyle \int^{\infty}_0 e^{-t}t^{\frac{1}{4}}=\Gamma\left(\frac{5}{4}\right)=$$ \displaystyle \frac{\Gamma\left(\frac{1}{4}\right)}{4}$

We have seen that $\displaystyle \Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ but what about $\displaystyle \Gamma\left(\frac{-1}{2}\right)$ ?

The question is elementary since we know that $\displaystyle \Gamma\left(1-\frac{1}{2}\right)=\frac{-1}{2}\Gamma\left(\frac{-1}{2}\right)$

so we have that $\displaystyle \Gamma\left(-\frac{1}{2}\right)=-2\sqrt{\pi}$

Then we can prove that any fraction with the denomenator =2 and the numerator is odd can be reduced into

$\displaystyle \Gamma\left(\frac{2n+1}{2}\right)= C \,\Gamma\left(\frac{1}{2}\right)$ where $\displaystyle C\in \mathbb {Q}\text{ and n}\in \mathbb{Z}$

ِAs a practice for Gamma find :

$$\int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt$$

We have learned that gamma function has an exponent muliplied by a polynomial but here we have a hyperoblic function !

Hange on we know that we can expand cosh using power series :

$\displaystyle \cosh(x) = \sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}$

put $x=a\sqrt{t}$ we have
:

$\displaystyle \cosh(a\sqrt{t}) = \sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!}$

subsituting back in the integral we have :

$\displaystyle \int_{0}^{\infty}e^{-t}\sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!\, \sqrt{t}}dt$

Now since the series is always positive we can swap the integral and the series :

$\displaystyle \sum_{n=0}^{\infty}\frac{a^{2n}}{(2n)!}\left[ \int_{0}^{\infty}e^{-t} t^{n-\frac{1}{2}}dt\right]$

so we have using gamma :

$\displaystyle \sum_{n=0}^{\infty}\frac{a^{2n}\cdot \Gamma(n+\frac{1}{2})}{2n!}$

But we don't know how to simplify further because we need another property which will help us find the solution .

To be continued ...

4.Integration using special functions (continued)

4.1.Gamma Function (continued) :

In the previous post we were stuck trying to simplify $\displaystyle \Gamma(n+\frac{1}{2})$ but ,you know, the following property will make our life just easier.

: (LDF)*

$$\Gamma\left(\frac{1}{2}+n\right) = {(2n)! \over 4^n n!} \sqrt{\pi}$$

The proof of this identity requires some manipulation of beta function .

So , we have just got our free gift to continue our example , so we were stuck at :

$\displaystyle \sum^{\infty}_{n=0} \frac{a^{2n}\,\Gamma\left(\frac{1}{2}+n\right)}{(2n!)}$

so using LDF we get the following :

$\displaystyle \sum^{\infty}_{n=0}\frac{a^{2n}\,\left({(2n)! \over 4^n n!} \sqrt{\pi}\right)}{(2n!)}$

Further simplification we get :

$\displaystyle \sqrt{\pi}\,\sum^{\infty}_{n=0} \frac{{a^{2n}\over 4^n }}{n!}$

Now that looks familiar since we know that :

$\displaystyle \sum^{\infty}_{n=0}\frac{z^n}{n!}=e^z$

Putting $\displaystyle z={a^2\over 4 }$ and multiplying by $\sqrt{\pi}\,$ we get :

$\displaystyle \sqrt{\pi}\sum^{\infty}_{n=0} \frac{\left({a^2\over 4 }\right)^n}{n!}=\sqrt{\pi}\,e^{{a^2\over 4 }}$

So we have finally that :

$$\int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt\,=\,\sqrt{\pi}e^{{a^2 \over 4}}$$

Finally we have the interesting property : (ERF)*

$$\Gamma \left({z}\right) \Gamma \left({1 - z}\right) = \frac \pi {\sin \left({\pi z}\right)} \,\,\forall z \notin \mathbb{Z}$$

Let us have some examples on that :

Simplify the following expressions :

1. $\displaystyle \Gamma\left(\frac{3}{4}\right)\,\Gamma\left(\frac{1}{4}\right)$

2. $\displaystyle \Gamma{\left(\frac{1+i}{2}\right)} \, \Gamma{\left(\frac{1-i}{2}\right)}$

Solution :

1. we can rewrite as $\displaystyle \Gamma\left(1-\frac{1}{4}\right)\,\Gamma\left(\frac{1}{4}\right)$

Now by ERF we have the following :

$\displaystyle \Gamma\left(1-\frac{1}{4}\right)\,\Gamma\left(\frac{1}{4}\right)=\frac \pi {\sin \left({\frac{\pi}{4} }\right)}=\sqrt{2}\,\pi$

2. We can rewrite as $\displaystyle \Gamma{\left(\frac{1+i}{2}\right)} \, \Gamma{\left(1-\frac{1+i}{2}\right)}$

This expression simplifies to:

$\displaystyle \frac{\pi}{\sin\left(\frac{\pi(1+i)}{2}\right)}= \frac{\pi}{\cos \left( \frac{i \pi}{2}\right)}$

By geometry to hyperbolic conversions we get :

$\displaystyle \frac{\pi}{\cosh\left(\frac{\pi}{2}\right)}=\pi \, \text{sech}\left(\frac{\pi}{2}\right)$

LDF and ERF will be so much beneficial when we discuss the beta function in the next post .

* I will use these shortcuts when ever calling these formulas.

4.Integration using special functions (continued)

4.2.Beta Function :

General definition :

$$\int^1_0 t^{x-1}(1-t)^{y-1} \, dt= B(x,y)$$

This is actually my favourite function , and what is so nice about it , that it has many representations. Also it is related to Gamma function :

$$B(x,y)\,=\,{\Gamma(x)\Gamma(y) \over \Gamma(x+y)}$$

We have proved this identity earlier when we discussed convolution.

We shall realize the symmetry of beta function that is to say $\displaystyle B(x,y) = B(y,x)$.

Beta function has many other representations all can be deduced through substitution :

$$B(x,y) \,=\, \int ^{\infty}_0 \frac{t^{x-1}}{(1+t)^{x+y}}\, dt$$

$$B(x,y) \,=\,2\,\int^{\frac{\pi}{2}}_0 \cos^{2x-1}(t) \sin^{2y-1}(t)\,dt$$

The proofs are left to the reader as practice ...

Let us discuss some examples :

Find the following integral :

$\displaystyle \int^{\infty}_0 \frac{1}{(x^2+1)}\, dx$

we know that $\displaystyle \int^{\infty}_0 \frac{1}{(x^2+1)}=\frac{\pi}{2}$

Let us try to solve it by beta ,First put $x=\sqrt{t}$

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)}\,dt$

Now we know the second representation of beta so we have :

$\displaystyle x-1={-1 \over 2} \,\, \Rightarrow \,\, x={1\over 2}$

$\displaystyle x+y={1} \,\, \Rightarrow \,\, y={1\over 2}$

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)}\,dt=\frac{B({1 \over 2},{1 \over 2})}{2}=\frac{\Gamma({1 \over 2})\, \Gamma({1\over 2})}{2}= \frac{\sqrt{\pi} \cdot \sqrt{\pi}}{2}=\frac{\pi}{2}$

Now let us try to solve another similar integral :

$\displaystyle \int^{\infty}_0 \frac{1}{(x^2+1)^2}\, dx$

Using the same substitution as the previous example we get :

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)^2}\,dt$

$\displaystyle x-1={-1 \over 2} \,\, \Rightarrow \,\, x={1\over 2}$

$\displaystyle x+y={2} \,\, \Rightarrow \,\, y={3\over 2}$

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)^2}\,dt=\frac{B({1 \over 2},{3 \over 2})}{2}=\frac{\Gamma({1 \over 2})\, \Gamma({3\over 2})}{2}= \frac{\Gamma({1 \over 2})\, \Gamma({1\over 2})}{4}=\frac{\pi}{4}$

We might try to generalize :

$$\int^{\infty}_0 \frac{1}{(x^2+1)^n}\, dx \,\,\, \forall\,\, n> \frac{1} {2}$$

Using the same substitution again and again ..(boring) ..

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)^n}\,dt$

$\displaystyle x-1={-1 \over 2} \,\, \Rightarrow \,\, x={1\over 2}$

$\displaystyle x+y={n} \,\, \Rightarrow \,\, y=n-{1\over 2}$

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)^n}\,dt=\frac{\Gamma ({1\over 2})\cdot \Gamma\left(n-{1\over 2}\right)}{2\Gamma(n)}$

Now how to simplify $\displaystyle \Gamma\left(n-{1\over 2}\right)$ ?

But remember that by LDF that $\displaystyle \Gamma\left(k+{1\over2}\right) =\frac{(2k)!\sqrt{\pi}}{4^k\,k!}$

Now let $\displaystyle k=n-1$ so we have $\displaystyle \Gamma\left(n-{1\over2}\right) =\frac{(2n-2)!\sqrt{\pi}}{4^{n-1}\,(n-1)!}=\frac{\Gamma\left(2n-1\right)\sqrt{\pi}}{4^{n-1}\,\Gamma(n)}$

Substituting in our integral we have the following :

$\displaystyle \frac{1}{2}\int^{\infty}_0 \frac{t^{\frac{-1}{2}}}{(t+1)^n}\,dt=\frac{2\pi \,\cdot \Gamma\left(2n-1 \right)}{4^n \cdot \Gamma^2(n)}$

$$\int^{\infty}_0 \frac{1}{(x^2+1)^n}\, dx \,=\frac{\pi \,\cdot \Gamma\left(2n-1 \right)}{2^{2n-1}\cdot \Gamma^2(n)}$$

It is easy to say that for $n\in \mathbb{Z}^+ \,$ we get a $\pi$ multiplied by some rational number ...

[HW] Verify the previous exercises using the formula ...

To be continued ...

4.Integration using special functions (continued)

4.2.Beta Function (continued):

Prove that :

$$\int_0^1\frac{x^n}{\sqrt{1-x}}\,dx=2\,\frac{(2n)!!}{(2n+1)!!}$$

Where the double factorial !! is defined as the following :

$\displaystyle n!! = \begin{cases}n\cdot(n-2)... 5\cdot 3\cdot 1&; \mbox{if }n>0 \, \text{odd} \\n\cdot(n-2)... 6\cdot 4\cdot 2&; \mbox{if } n>0 \, \text{even}\\1 &; \mbox{if } n=0,-1\end{cases}$

Solution :

Now , we shall be familiar by just looking that this is the beta function :

$\displaystyle \int_0^1 x^n\cdot (1-x)^{-\frac{1}{2}}\, dx$

$\displaystyle \fbox{$ \displaystyle x-1 = n \,\, \Rightarrow \,\, x=n+1\,\,\,\, \displaystyle y-1= \frac{-1}{2}\,\, \Rightarrow \,\, y=\frac{1}{2}$}$

$\displaystyle \int_0^1 x^n\cdot (1-x)^{-\frac{1}{2}}\, dx=B(n+1,\frac{1}{2})$

$\displaystyle B\left( n+1,\frac{1}{2} \right)=\frac{\Gamma \left( \frac{1}{2} \right)\Gamma(n+1)}{\Gamma \left( n+\frac{3}{2}\right)}=\frac{2 \sqrt{\pi}\, \Gamma(n+1)}{(n+\frac{1}{2})\Gamma \left( n+\frac{1}{2} \right)}$

Now you shall realize that we must use LDF:

$\displaystyle \frac{\sqrt{\pi}\Gamma(n+1)}{(n+\frac{1}{2})\Gamma\left(n+\frac{1}{2}\right)}=\frac{2\sqrt{\pi}\, n!}{(2n+1)\sqrt{\pi}\, \frac{(2n)!}{4^n\, n!}}$

$\displaystyle \frac{2\, 2^{2n} (n!)^2}{(2n)!}=2\frac{2^{2n}(n\cdot(n-1)\,...\,3\cdot 2\cdot 1)^2}{(2n+1)\cdot 2n\cdot(2n-1)\, ... \, 3\cdot 2\cdot 1}$

Now we should separate odd and even terms in the denomenator :

$\displaystyle 2\frac{2^{2n}(n\cdot(n-1)\,...\,3\cdot 2\cdot 1)^2}{(2n\cdot(2n-2)\, ... \, 4\cdot 2)((2n+1)\cdot (2n-1)\, ... \, 3\cdot 1)}$

$\displaystyle 2\frac{(2n\cdot(2n-2)\,...\,6\cdot 4\cdot 2)^2}{(2n \cdot (2n-2)\, ... \, 4\cdot 2)((2n+1)\cdot (2n-1)\, ... \, 3\cdot 1)}=2\frac{(2n)!!}{(2n+1)!!}$

Find the following integral:

$$\int^{\infty}_{-\infty}\, \left(1+\frac{x^2}{n-1}\right)^{-\frac{n}{2}}\,dx$$

Solution :

First we shall realize the evenness of the integral :

$\displaystyle 2\int^{\infty}_{0}\, \left(1+\frac{x^2}{n-1}\right)^{-\frac{n}{2}}\,dx$

We should think of a substitution to get the second beta integral ...

Let $\displaystyle t=\frac{x^2}{n-1}\,\,\, \Rightarrow \,\,\, dt =\frac{2x}{n-1}\,dx$

$\displaystyle \sqrt{n-1}\int^{\infty}_{0}\frac{t^{-\frac{1}{2}}}{(1+t)^{\frac{n}{2}}}\, \,dx$

Now we see that our integral becomes so familiar :

$\displaystyle \sqrt{n-1}\, B\left(\frac{1}{2},\frac{n-1}{2}\right)= \frac{\sqrt{\pi(n-1)}\Gamma\left(\frac{n-1}{2}\right)}{\Gamma\left(\frac{n}{2}\right)}$

[HW] Prove $\displaystyle \int^{\infty}_{0}\frac{x^{2m+1}}{(ax^2+c)^n} dx\,=\frac{m!\,(n -m -2)!}{2(n-1)!\, a^{m+1}\,c^{n-m-1}}$

To be continued ...

4.Integration using special functions (continued)

4.2.Beta Function (continued):

Find the following integral:

$$\int^{\infty}_0\, \frac{x^{-p}}{x^3+1}\,dx$$

Solution :

We should foresee that this is the second beta integral.

Let us do the substitution :
$\displaystyle x^3\,=t\,$

$\displaystyle \frac{1}{3}\, \int^{\infty}_0\, \frac{t^{-\frac{p+2}{3}}}{t+1}\,dt$

Now we should find x, y :

$\displaystyle x =\frac{1-p}{3}$

$\displaystyle y+x =1\,\,\, \Rightarrow \,\, y = 1-\frac{1-p}{3}$

so we have our beta representation of the integral :

$\displaystyle \frac{B\left(\frac{1-p}{3}, \frac{1-p}{3}\right)}{3}= \frac{\Gamma\left(\frac{1-p}{3}\right) \Gamma\left(1-\frac{1-p}{3}\right)}{3}$

Now we should use the
ERF :

$\displaystyle \frac{\Gamma \left( \frac{1-p}{3}\right) \Gamma\left(1-\frac{1-p}{3}\right)}{3}= \frac{\pi}{3\, \sin\left(\frac{\pi(1-p)}{3}\right)}= \, \frac{\pi}{3}\,\csc\left(\frac{\pi-\pi p}{3}\right)$

Now let us try to find :

$$\int^{\frac{\pi}{2}}_0 \, \sqrt[3]{\sin^{2}x} \,\, dx$$

Solution:

Rewrite as :

$\displaystyle \int^{\frac{\pi}{2}}_0 \, \sin^{\frac{3}{2}}x \,\cos^{0}x\, dx$

$\displaystyle 2x-1= \frac{3}{2}\,\, \Rightarrow \,\,\, x = \frac{5}{4}$

$\displaystyle 2y-1= 0\,\, \Rightarrow \,\,\, y = \frac{1}{2}$

$\displaystyle \int^{\frac{\pi}{2}}_0 \, \sin^{\frac{3}{2}}x \, dx= \frac{B\left(\frac{5}{4}, \frac{1}{2}\right)}{2}=\frac{\Gamma\left(\frac{5}{4}\right) \Gamma\left(\frac{1}{2}\right)}{2\Gamma\left(\frac{7}{4}\right)}$

simplification is left to the reader as practice ...

Find the following integral :

$$\int^{\frac{\pi}{2}}_{0} (\sin x)^i \cdot (\cos x)^{-i}\, dx$$

Solution :

Don't be intimidated by the complex looking of the integral , we have the third beta integral :

$\displaystyle 2x-1= i \,\, \Rightarrow \,\,\, x = \frac{1+i}{2}$

$\displaystyle 2y-1= -i \,\, \Rightarrow \,\,\, y = \frac{1-i}{2}$

$\displaystyle \,\frac{1}{2} \Gamma\left(\frac{1+i}{2}\right) \, \Gamma\left(\frac{1-i}{2}\right)$

Now we see that we have to use ERF

$\displaystyle \,\frac{1}{2} \Gamma\left(\frac{1+i}{2}\right) \, \Gamma\left(1-\frac{1+i}{2}\right)= \frac{\pi}{2\sin\left(\frac{\pi(1+i)}{2}\right)}= \frac{\pi}{2}\text{sech}\,\left( {\pi \over 2}\right)$

Digamma function is explored in the next post

4.Integration using special functions (continued)

4.3.Digamma (psi) function :

General definition :

$$\psi(x) \, = \, \frac{\Gamma'(x)}{\Gamma(x)}$$

Assume that we have $\displaystyle F(x)= \ln \left(\Gamma(x)\right)$ then if we differentiate both sides we get $\displaystyle f(x)=\frac{\Gamma'(x)}{\Gamma(x)}$ then $f(x)= \psi(x)$ .

So clearly we see the strong relation between gamma and digamma through differentiation .

One of the most used results in solving integrals is the fact that can be obtained from the general definition $\displaystyle \Gamma'(x)=\psi(x)\, \Gamma(x)$.

Differentiating the gamma function is pretty unique since we can get the same function multiplied by digamma.

Assume we want to differentiate the following:

$\displaystyle \frac{\Gamma(2x+1) }{\Gamma(x)}$

We can use differentiating rule for quotients as the following :

$\displaystyle \frac{2\Gamma'(2x+1)\Gamma(x)-\Gamma'(x)\Gamma(2x+1) }{\Gamma^2(x)}$

Now we can use the result $\displaystyle \Gamma'(x)=\psi(x)\, \Gamma(x)$ :

$\displaystyle \frac{2\Gamma(2x+1)\psi(2x+1)\Gamma(x)-\psi(x)\Gamma(x)\Gamma(2x+1) }{\Gamma^2(x)}$

Now we can separate the numerator and simplify :

$\displaystyle \frac{\Gamma(2x+1)}{\Gamma(x)} \left( 2\psi(2x+1)-\psi(x) \right)$

Now that is interesting it is like we have just multilplied by the difference of psi if we neglect 2 .

A very interesting result is the following :

$$\psi(1-x)-\psi(x)=\pi \cot(\pi x)$$

Poof :

we know by ERF that:

$\displaystyle \Gamma(x)\Gamma(1-x)=\pi \csc(\pi x)$

Now differentiate both sides :

$\displaystyle \psi(x)\Gamma(x)\Gamma(1-x)-\psi(1-x)\Gamma(x)\Gamma(1-x)=-\pi^2 \csc(\pi x)\,\cot(\pi x)$

Take $\displaystyle -\Gamma(x)\Gamma(1-x)$ as a common factor :

$\displaystyle \Gamma(x)\Gamma(1-x)\left(\psi(1-x)-\psi(x)\right)=-\pi^2 \csc(\pi x)\,\cot(\pi x)$

Now we see the ERF again so we can simplify to get :

$\displaystyle \psi(1-x)-\psi(x)=\pi \cot(\pi x)$

That was basically a differentiating tutorial in the next post we will solve some integrals ...

[HW] $\displaystyle \psi(1+x)-\psi(x)= \frac{1}{x}$

4.Integration using special functions (continued)

4.3.Digamma function(continued) :

I gave this as HW :

$$\psi(1+x)-\psi(x) = \frac{1}{x}$$

Proof:

Let us start by the following :

$\displaystyle \frac{\Gamma(1+x)}{\Gamma(x)}= x\text{ ---- (1) }$

Now differentiate both sides :

$\displaystyle \frac{\Gamma(1+x)}{\Gamma(x)}\left(\psi(1+x)-\psi(x)\right)= 1$

$\displaystyle \psi(1+x)-\psi(x)= \frac{\Gamma(x)}{\Gamma(1+x)}$

The right hand side is the reciprocal of (1)

$\displaystyle \psi(1+x)-\psi(x) = \frac{1}{x}$

OK, Now that we have proved this identity we will use it in the next example.

Find the following integral :

$$\int^{\infty}_{0}\frac{\log(x) }{(1+x^2)^2}\, dx\text{ *}$$

Solution:

Let us try by finding the following :

$\displaystyle \int^{\infty}_{0} \frac{x^a}{(1+x^2)^2}\, dx$

Now use the following substitution : $\displaystyle x^2= t$

$\displaystyle \frac{1}{2}\int^{\infty}_{0}\frac{t^{\frac{a-1}{2}}}{(1+t)^2}\, dt$

By the beta function this is equivalent to :

$\displaystyle \frac{1}{2}\int^{\infty}_{0}\frac{t^{\frac{a-1}{2}}}{(1+t)^2}\, dt = \frac{1}{2}B\left(\frac{a+1}{2},2-\frac{a+1}{2}\right)=\frac{1}{2}\Gamma\left(\frac{a+1}{2}\right) \Gamma\left(2-\frac{a+1}{2}\right)$

Now let the following :

$\displaystyle F(a) =\frac{1}{2}\int^{\infty}_{0}\frac{t^{\frac{a-1}{2}}}{(1+t)^2}\, dt =\frac{1}{2}\Gamma\left(\frac{a+1}{2}\right)\Gamma\left(2-\frac{a+1}{2}\right)$

Differentiate with respect to a

$\displaystyle F'(a) =\frac{1}{4}\int^{\infty}_{0}\frac{\log(t) \,t^{\frac{a-1}{2}}}{(1+t)^2}\, dt =\frac{1}{4}\Gamma\left(\frac{a+1}{2}\right)\Gamma \left(2-\frac{a+1}{2}\right)\left[\psi \left(\frac{a+1}{2}\right)-\psi \left(2-\frac{a+1}{2}\right) \right]$

Now put a =0 so we have :

$\displaystyle \frac{1}{4}\int^{\infty}_{0}\frac{\log(t) \,t^{\frac{-1}{2}}}{(1+t)^2}\, dt =\frac{1}{4}\Gamma \left(\frac{1}{2}\right)\Gamma \left(\frac{3}{2}\right)\left[\psi \left(\frac{1}{2}\right)-\psi \left(\frac{3}{2}\right)\right]$

Now we use our identity :

$\displaystyle \psi \left(\frac{1}{2}\right)-\psi \left(\frac{3}{2}\right)=-\left(\psi \left(1+\frac{1}{2}\right)-\psi \left(\frac{1}{2}\right)\right)=-2$

Also by some gamma manipulation we have :

$\displaystyle \Gamma \left(\frac{1}{2}\right)\Gamma \left(\frac{3}{2}\right)=\frac{1}{2}\,\Gamma^2 \left(\frac{1}{2}\right)=\frac{\pi}{2}$

so the integral reduces to :

$\displaystyle \frac{1}{4}\int^{\infty}_{0}\frac{\log(t) \,t^{\frac{-1}{2}}}{(1+t)^2}\, dt=-\frac{\pi}{4}$

putting $\displaystyle x^2= t$ we have our result :

$\displaystyle \int^{\infty}_{0}\frac{\log(x) }{(1+x^2)^2}\, dx=-\frac{\pi}{4}$

To be continued ...

* In higher studies we usually donate the natural logarithm as log

4.Integration using special functions (continued)

4.3.Digamma function(continued) :

I introduced the
representation of gamma function :

$$\Gamma(x)=\frac{e^{-{\gamma}\,x}}{x}\,\prod^{\infty}_{n=1}\left(1+x/n \right)^{-1}e^{\frac{x}{n}}$$

Now to derive the digamma function :

First take the natural logarithm to both sides :

$\displaystyle \log\left(\Gamma(x)\right)=-\gamma\, x\,-\,\log(x)\,+\sum^{\infty}_{n=1}-\ln\left(1+\frac{x}{n}\right)+{x\over n}$

Now we shall differentiate with respect to x to get digamma :

$\displaystyle \psi(x)=-\gamma\,-\frac{1}{x}\,+\sum^{\infty}_{n=1}\frac{\frac{-1}{n}}{1+\frac{x}{n}}+{1 \over n}$

Further simplification will result in the following :

$\displaystyle \psi(x)=-\gamma\,-\frac{1}{x}\,+\sum^{\infty}_{n=1}\frac{x}{n(n+x)}$

Now let us evaluate some values :

1- $\displaystyle \psi(1)=-\gamma\,-1 \,+\sum^{\infty}_{n=1}\frac{1}{n(n+1)}$

$\displaystyle \sum^{\infty}_{n=1}\frac{1}{n(n+1)}=1$ (see why ? )

$\displaystyle \fbox{$ \displaystyle \psi(1)\,=\,-\gamma $}$

2- $\displaystyle \psi\left(\frac{1}{2}\right)=-\gamma\,-2\,+\sum^{\infty}_{n=1}\frac{1}{n(2n+1)}$

We need to find : $\displaystyle \sum^{\infty}_{n=1}\frac{1}{n(2n+1)}$

This requires the result $\displaystyle \sum^{\infty}_{n=1}\frac{(-1)^{n}}{n}=-\log(2)$

So we can prove easily that :

$\displaystyle \sum^{\infty}_{n=1}\frac{1}{n(2n+1)}=2-2\log(2)$

hence , $\displaystyle \fbox{$ \displaystyle \psi \left( \frac{1}{2} \right)=-\gamma \,-\, 2\log (2) $}$

Let us know have some examples on integrals :

Find the following integral :

$$\int^{\infty}_{0}e^{-a t}\, \log(t) \, dt$$

Let us start by noting that seems like a gamma function , but differentiated so :

$\displaystyle F(b)= \int^{\infty}_{0}e^{-at}\, t^b\,dt$

Now use the substitution $x=at$ we get

$\displaystyle F(b)= \frac{1}{a}\int^{\infty}_{0}e^{-x}\, \left(\frac{x}{a}\right)^b\,dx$

Now that looks exactly as the gamma definition so :

$\displaystyle F(b)= \frac{1}{a}\int^{\infty}_{0}e^{-x}\, \left(\frac{x}{a}\right)^b\,dx=\frac{\Gamma(b+1)}{a^{b+1}}$

Now differentiate with respect to b :

$\displaystyle F'(b)= \frac{1}{a}\int^{\infty}_{0}e^{-x}\,\log\left(\frac{x}{a}\right) \left(\frac{x}{a}\right)^b\,dx=\frac{\Gamma(b+1) \psi (b+1)}{a^{b+1}}-\frac{\log(a)\Gamma(b+1)}{a}$

Now put $b=0$ and $at=x$

$\displaystyle \int^{\infty}_{0}e^{-at}\,\ln(t) \,dx=\frac{\psi(1)-\log(a)}{a}=-\frac{\gamma+\log(a)}{a}$

To be continued ...

4.Integration using special functions (continued)

4.3.Digamma (psi) function :

Prove the following identity :

$\displaystyle \int^{\infty}_0 \frac{e^{-z}-(1+z)^{-a}}{z}\,dz = \psi(a)$

Solution :

We begin with the double integral :

$\displaystyle \int^{\infty}_0 \int^t_1 \,e^{-xz}\,dx\,dz=\int^{\infty}_{0}\frac{e^{-z}-e^{-tz}}{z}\, dz$

Using fubini theorem we also have :

$\displaystyle \int^t_1 \int^{\infty}_0\,e^{-xz}\,dz \,dx = \int^t_1 \frac{1}{x}\,dx = \ln t$

Hence we have the following :

$\displaystyle \int^{\infty}_{0}\frac{e^{-z}-e^{-tz}}{z}\, dz = \ln(t) \text{ --------(1)}$

We also know that :

$\displaystyle \Gamma'(a) = \int^{\infty}_0 t^{a-1}e^{-t}\,\ln t \, dt \text{ --------(2)}$

Substituting (1) in (2) we have :

$\displaystyle \Gamma'(a) = \int^{\infty}_0 t^{a-1}e^{-t}\,\left(\int^{\infty}_{0}\frac{e^{-z}-e^{-tz}}{z}\, dz \right)\, dt$

$\displaystyle \Gamma'(a) = \int^{\infty}_0 \int^{\infty}_{0}\frac{t^{a-1}e^{-t}e^{-z}-t^{a-1}e^{-t(z+1)}}{z}\, dz \, dt$

Now we can use the fubini theorem :

$\displaystyle \Gamma'(a) = \int^{\infty}_0 \int^{\infty}_{0}\frac{t^{a-1}e^{-t}e^{-z}-t^{a-1}e^{-t(z+1)}}{z}\, dt \, dz$

$\displaystyle \Gamma'(a) = \int^{\infty}_0 \frac{1}{z} \left( e^{-z}\int^{\infty}_{0}t^{a-1}e^{-t}\, dt-\int^{\infty}_0 t^{a-1}e^{-t(z+1)}\, dt \right)\, dz$

But we can easily deduce using Laplace that :

$\displaystyle \int^{\infty}_0 t^{a-1}e^{-t(z+1)}\,dt= \Gamma(a) \,(z+1)^{-a}$

Aslo we have :

$\displaystyle \int^{\infty}_{0}t^{a-1}e^{-t}\, dt=\Gamma(a)$

Hence we can simplify our integral to the following :

$\displaystyle \Gamma'(a) = \Gamma(a)\, \int^{\infty}_0 \frac{e^{-z}-(1+z)^{-a}}{z} dz$

$\displaystyle \frac{\Gamma'(a)}{\Gamma(a)} = \int^{\infty}_0 \frac{e^{-z}-(1+z)^{-a}}{z}\, dz = \psi(a)$

[HW] Prove that $\displaystyle \int^{\infty}_{0}\, \frac{e^{-ax}-e^{-bx}}{x}\, dx=\ln\left({b\over a}\right)$

[HW] Find $\displaystyle \int^{\infty}_0 \left(e^{-x} -\frac{1}{x+1}\right) \frac{dx}{x}$

To be continued ...

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•