# An Useful Integral Formula

#### stainburg

We do meet the integrals such as $$\displaystyle \int x^n\cos{(ax+b)}dx$$or $$\displaystyle \int x^n\sin{(ax+b)}dx$$frequently in

calculus area., where n is a positive integer.

Actually, the two above are just the same, because $$\displaystyle \sin{(ax+b)}=\cos{(ax+b-\frac{\pi}{2})}=\cos{(ax+c)}$$, where

$$\displaystyle c=b-\frac{\pi}{2}$$.

So, $$\displaystyle I_n=\int x^n\cos{(ax+b)}dx$$ is the only one I want to discuss here.

Firstly I give the formula as below:

$$\displaystyle I_n=\int x^n\cos{(ax+b)}dx =\sum_{m=0}^{n}{\frac{\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\sin{(ax+b+\frac{m\pi}{2})}$$,

where $$\displaystyle \Gamma(.+1)=(.)!$$

Proof:

It is easy to show that, the integral:

$$\displaystyle \int x^n\e{(ax+b)}dx$$

$$\displaystyle =\sum_{m=0}^{n}{\frac{(-1)^{m}\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\e (ax+b)$$

By using the Euler's formula, $$\displaystyle \cos t=\frac{\e (-it)+\e (it)}{2}$$($$\displaystyle i$$ denotes the imaginary unit):

$$\displaystyle I_n=\int x^n\cos{(ax+b)}dx$$

$$\displaystyle =\frac{1}{2}\int x^n(\e{[-i(ax+b)]}+\e{[i(ax+b)]})dx$$

$$\displaystyle =\frac{1}{2}\{\sum_{m=0}^{n}{\frac{(-1)^{m}\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)(-ia)^{m+1}}\e {[-i(ax+b)]}+\sum_{m=0}^{n}{\frac{(-1)^{m}\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)(ia)^{m+1}}\e {[i(ax+b)]}\}$$

We know,

$$\displaystyle (-1)^m=\e (-im\pi)=\e (im\pi)$$

$$\displaystyle (-i)^{m}=\e (-i\frac{m\pi}{2})$$

$$\displaystyle (i)^{m}=\e (i\frac{m\pi}{2})$$,

then,

$$\displaystyle I_n=\frac{1}{2}\sum_{m=0}^{n}{\frac{\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\{\frac{(-1)^{m}\e {[-i(ax+b)]}}{(-i)^{m+1}}+\frac{(-1)^{m}\e {[i(ax+b)]}}{i^{m+1}}\}$$

$$\displaystyle =\frac{1}{2}\sum_{m=0}^{n}{\frac{\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\{\frac{\e (-im\pi)\e {[-i(ax+b)]}}{(-i)\e (-i\frac{m\pi}{2})}+\frac{\e (im\pi)\e {[i(ax+b)]}}{i\e (i\frac{m\pi}{2})}\}$$

$$\displaystyle =\sum_{m=0}^{n}{\frac{\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\{\frac{\e {[i(ax+b+\frac{m\pi}{2})]}-\e {[-i(ax+b+\frac{m\pi}{2})]}}{2i}\}$$

$$\displaystyle =\sum_{m=0}^{n}{\frac{\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\sin{(ax+b+\frac{m\pi}{2})}$$.

Q.E.D.

#### stainburg

Appendix I

$$\displaystyle E_n=\int x^n\e{(ax+b)}dx$$

$$\displaystyle =\frac{x^n}{a}\e(ax+b)+(-1)\frac{n}{a}\int x^{n-1}\e(ax+b)dx$$

$$\displaystyle =\frac{x^n}{a}\e(ax+b)+(-1)\frac{n}{a}E_{n-1}$$

$$\displaystyle =\frac{x^n}{a}\e(ax+b)+(-1)\times\frac{nx^{n-1}}{a^2}\e(ax+b)+(-1)^2\times\frac{n(n-1)}{a^2}E_{n-2}$$

.......

We know,

$$\displaystyle E_{n-m}=\int x^{n-m}\e{(ax+b)}dx=\frac{x^{n-m}}{a}\e(ax+b)+(-1)\frac{n}{a}E_{n-m-1}$$

Using the induction, finally,

$$\displaystyle E_n=\sum_{m=0}^{n}{\frac{(-1)^m\Gamma(n+1)x^{n-m}}{\Gamma(n-m+1)a^{m+1}}\e(ax+b)}$$

#### zaidalyafey

Math Team
stainburg said:
where $$\displaystyle \Gamma(.+1)=(.)!$$
Can you please explain what do you meant by that

#### stainburg

zaidalyafey said:
Can you please explain what do you meant by that
Oops, sorry for my neglect.

$$\displaystyle \Gamma(z)$$ is the Gamma function.

http://en.wikipedia.org/wiki/Gamma_function,

A very important property of the Gamma function is,

$$\displaystyle \Gamma(z+1)=z\Gamma(z)$$

If n is a positive integer,

$$\displaystyle \Gamma(n+1)=n!$$, that's what I meant.

#### mathbalarka

Math Team
zaidalyafey said:
Can you please explain what do you meant by that
Gamma function is the integral $$\displaystyle \int_{0}^{\infty} e^{-t} t^{z-1} dz$$ which is a meromorphic extension of the factorial function.

Bohr Mollerups theorem states that this is a unique extension of the factorial function having a logarithmic convexity and hence, an analytic continuation.

#### JJacquelin

Nice work !
Nevertheless, the integral (x^n)cos(ax+b)dx can be expressed on a closed form, without series, thanks to the Incomplete Gamma function. Or thanks to the Generalised Fresnel functions (or Boehmer functions).

#### stainburg

mathbalarka said:
Gamma function is the integral $$\displaystyle \int_{0}^{\infty} e^{-t} t^{z-1} dz$$ which is a meromorphic extension of the factorial function.

Bohr Mollerups theorem states that this is a unique extension of the factorial function having a logarithmic convexity and hence, an analytic continuation.
Thanks, mathbalarka!

#### stainburg

JJacquelin said:
Nice work !
Nevertheless, the integral (x^n)cos(ax+b)dx can be expressed on a closed form, without series, thanks to the Incomplete Gamma function. Or thanks to the Generalised Fresnel functions (or Boehmer functions).
Thanks J!

Lately, I teach myself the special functions finding it's rather beatiful when expanding a function with them!

I'm a beginner. I'll try the closed form you mentioned .Thanks again!

#### stainburg

According to JJacquelin, we can change the series into a closed form by using the incomplete Gamma function:

$$\displaystyle \Gamma(s,x)=\int_x^{\infty} t^{s-1}\e{(-t)}dt$$, which is the 'upper' incomplete Gamma function.

http://en.wikipedia.org/wiki/Incomplete_gamma_function

We now know the ordinary Gamma function is (Thanks to mathbalarka):

$$\displaystyle \Gamma(s)=\int_0^{\infty} t^{s-1}\e(-t)dt$$.

Actually, there is relation between the ordinary one and 'upper' one( use the integration by parts and induction):

$$\displaystyle \Gamma(n+1,x)=\sum_{m=0}^{n}\frac{x^{m}}{\Gamma(m+1)}\Gamma(n+1)\e(-x)$$, where n is a positive integer.

Back to the Appendix, we've got

$$\displaystyle E_n=\sum_{k=0}^{n}\frac{(-1)^k\Gamma(n+1)x^{n-k}}{\Gamma(n-k+1)a^{k+1}}\e (ax+b)$$(It means we count from 0 to n).

Now let $$\displaystyle m=n-k$$ and substitute this into $$\displaystyle E_n$$(It means we count from n to 0):

$$\displaystyle E_n=\sum_{m=0}^{n}\frac{(-1)^{n-m}\Gamma(n+1)x^{m}}{\Gamma(m+1)a^{n-m+1}}\e (ax)\e(b)$$

$$\displaystyle =(-1)^na^{-(n+1)}\e(b)\sum_{m=0}^{n}\frac{\Gamma(n+1)(-ax)^{m}}{\Gamma(m+1)}\e [-(-ax)]$$

$$\displaystyle =-(-a)^{-(n+1)}\e(b)\Gamma(n+1,-ax)$$.

Now we get the closed form of $$\displaystyle E_n$$.

For $$\displaystyle I_n=\int x^n\cos(ax+b)dx$$, we have

$$\displaystyle I_n=\frac{1}{2}\{\int x^n\e(-iax-ib)dx+\int x^n\e(iax+ib)dx\}$$

$$\displaystyle =-\frac{1}{2}\{(ia)^{-(n+1)}\e(-ib)\Gamma(n+1,iax)+(-ia)^{-(n+1)}\e(ib)\Gamma(n+1,-iax)\}$$

$$\displaystyle =\frac{i}{2a^{n+1}}\{\e[-i(b+\frac{n\pi}{2})]\Gamma(n+1,iax)-\e[i(b+\frac{n\pi}{2})]\Gamma(n+1,-iax)\}$$

That's one of the closed forms of $$\displaystyle I_n$$. Thanks to JJacquelin.

Similar threads