32

How to compute the following integral \begin{equation} \int_0^\pi\frac{\cos nx}{a^2-2ab\cos x+b^2}\, dx \end{equation}

I have been given two integral questions by my teacher. I cannot answer this one. I have also searched the similar question here but it looks like nothing is similar so I think this is not a duplicate. I could compute the integral if \begin{equation} \int_0^\pi\frac{dx}{a^2-2ab\cos x+b^2} \end{equation} The $\cos nx$ part makes the integral is really difficult. I want to use the result to compute this integral (the real question given by my teacher) \begin{equation} \int_0^\pi\frac{x^2\cos nx}{a^2-2ab\cos x+b^2}\, dx \end{equation} My question is how to compute the first integral (in the grey-shaded part) preferably with elementary ways (high school methods)?

Archer
  • 6,051

4 Answers4

26

Let $I_n(a,b)$ be the desired integral. Note that $I_n(a,b)=I_n(b,a)$, and $I_n(a,b)=I_n(-a,-b)$. So, we may suppose that $|b|< a$ Note that $$\eqalign{ \frac{a^2-b^2}{a^2-2ab\cos x+b^2}&=\frac{a}{a-e^{ix}b}+\frac{be^{-ix}}{a-e^{-ix}b}\cr &=\sum_{n=0}^\infty \left(\frac{b}{a}\right)^ne^{inx}+\frac{be^{-ix}}{a}\sum_{n=0}^\infty \left(\frac{b}{a}\right)^ne^{-inx}\cr &=1+\sum_{n=1}^\infty \left(\frac{b}{a}\right)^ne^{inx}+ \sum_{n=1}^{\infty} \left(\frac{b}{a}\right)^{n}e^{-inx}\cr &=1+2\sum_{n=1}^\infty \left(\frac{b}{a}\right)^n\cos(n x) } $$ It follows, using the uniform convergence of the series on $[0,\pi]$, that $$ \int_0^\pi\frac{(a^2-b^2)\cos(mx)}{a^2-2ab\cos x+b^2}dx =\int_0^\pi\cos(mx)dx+2\sum_{n=1}^\infty \left(\frac{b}{a}\right)^n\int_0^\pi\cos(n x)\cos(mx)dx $$ But $\int_0^\pi\cos(n x)\cos(mx)dx=0$ if $n\ne m$, and $\int_0^\pi\cos^2(n x)dx=\pi/2$ if $n\ne0$. So $$\eqalign{I_m(a,b)= \int_0^\pi\frac{\cos(mx)}{a^2-2ab\cos x+b^2}dx &=\left\{\matrix{\frac{\pi}{a^2-b^2}&\hbox{if}&m=0\cr \frac{\pi}{a^2-b^2}\left(\frac{b}{a}\right)^m&\hbox{if}&m\ne0 } \right.} $$ which is the desired formula for $|b|<a$.

Omran Kouba
  • 28,772
  • Very clever answer Professor, +1. You use Taylor series for $\displaystyle\frac{1}{1-y}=\sum_{n=1}^\infty y^n$ and it holds for $|y|<1$, does it also hold if $y$ is a complex number? What does this notation actually mean $|...|$? Absolute value for $y$ is a negative number or absolute value for $y$ is a complex number? Perhaps both? – Anastasiya-Romanova 秀 Jun 01 '14 at 14:25
  • I think the case for $m\neq0$, the answer should be $\displaystyle\frac{\pi}{a^2-b^2}\left(\frac{b}{a}\right)^m$. – Anastasiya-Romanova 秀 Jun 01 '14 at 15:24
  • @V-Moy: BTW, did you teacher presented you a solution to this problem? – Pranav Arora Jun 01 '14 at 17:34
  • @V-Moy, the proposed solution works in fact if the absolute value of $b$ as a complex number is smaller than the absolute value of $a$ also as a complex number. – Omran Kouba Jun 01 '14 at 18:11
  • (+1) This is known as the Poisson Kernel http://en.wikipedia.org/wiki/Poisson_kernel – Graham Hesketh Jun 01 '14 at 18:15
  • So the series also works for complex number. Okay then, thank you so much Prof Kouba, I learnt a lot from your answer. Thanks a bunch. (ô‿ô) – Anastasiya-Romanova 秀 Jun 02 '14 at 10:47
  • @PranavArora No. My teacher never gives the class any solutions of the assignment or test. Assignment will always be assignment (even forever!) unless one of us can give the solution and he/she who correctly answers it will get extra points. The reason why my teacher never gives us the solution is to make our class always competitive. – Anastasiya-Romanova 秀 Jun 02 '14 at 10:56
  • 1
    @GrahamHesketh Thanks for the link that you gave Sir. I really like it. $\ddot\smile$ – Anastasiya-Romanova 秀 Jun 02 '14 at 10:57
  • @V-Moy: Ah ok, are you allowed to consult your classmates? If so, did any of them solve it? :) – Pranav Arora Jun 02 '14 at 10:58
  • 1
    Of course but they often keep it for their selves except when they prove it their work to our teacher. It's hard to make friends in this course because almost all of them individualistic. – Anastasiya-Romanova 秀 Jun 02 '14 at 11:10
11

Assume for definiteness that $a>b>0$.

Method 1:

For integer $n\geq0$, we can rewrite the integral as $$\frac{1}{4ab}\int_{-\pi}^{\pi}\frac{e^{in x}dx}{\cosh\gamma-\cos x}=\frac{1}{2ia^2}\oint_{|z|=1}\frac{z^{n}dz}{(z-e^{-\gamma})(1-e^{-\gamma}z)},$$ where $e^{\gamma}=\frac{a}{b}$. Computing the residue at $z=e^{-\gamma}$, we find for the last integral $$2\pi i \cdot \frac{1}{2ia^2}\cdot\frac{\left(\frac{b}{a}\right)^n}{1-\frac{b^2}{a^2}}=\frac{\pi}{a^2-b^2}\left(\frac{b}{a}\right)^n.$$

Method 2:

Similarly rewrite the integral as $$\frac{1}{2(a^2-b^2)}\int_{-\pi}^{\pi}\left(\frac{1}{1-\frac{b}{a}e^{ix}}+\frac{\frac{b}{a}e^{-ix}}{1-\frac{b}{a}e^{-ix}}\right)e^{in x}dx.$$ Then expand the integrand into series in $\frac{b}{a}$ and use that $\displaystyle\int_{-\pi}^{\pi}e^{inx}dx=2\pi\cdot\delta_{n,0}$.

Start wearing purple
  • 53,234
  • 13
  • 164
  • 223
3

I don't have a proof yet, but with some computer assistance, this is what I believe to be the answer when $n$ is a non-negative integer.

\begin{align*} \int_0^\pi\frac{\cos nx}{a^2-2ab\cos x+b^2}\, dx &= \frac{\displaystyle \left(\left(a^{2n}+b^{2n}\right)\, \left(\Big\lvert \frac{a+b}{a-b}\Big\rvert +1\right)-2\, \sum_{k=0}^{2n}a^k\, b^{2n-k}\right)\, \pi}{\displaystyle 2\, a^n\, b^n\, (a+b)^2} \end{align*}

I think there might be a reduction formula for this, but at the moment I don't know.

gar
  • 4,948
1

See the last comment in

Evaluating $\int_0^{\pi}\frac{\cos n\eta\,d\eta}{1+a^2+2a\cos m\eta}$

for the answer to your original `$x^2\cos nx$' integral which I don't think is answered in any of the above posts.

Jog
  • 357