# Prove this formula $\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$

I am trying to use prove, by just simple algebraic manipulation, to prove the equality of this formula. $$\dfrac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$$

I have been given hints and instructions from this thread

1. Write using Euler’s identity $$\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$$
2. Factor the denominator
3. Find the partial fractions decomposition, expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again).

This is how I have done:

1. RHS: $$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{1-2r(\dfrac{e^{ix}+e^{-ix}}{2})+r^{2}}=\dfrac{1-r(\dfrac{e^{ix}-e^{-ix}}{2})}{1-re^{ix}-re^{-ix}+r^2}$$

Then from this thread, I have learnt how to factorize the denominator (See Jack D'Aurizio answer, first answer of the thread, first line). The trick is to write $$1=e^0$$.

1. $$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(re^{ix})(r-e^{-ix})}$$
1. The third step is to decompose the fraction:

$$\dfrac{A}{r-e^{ix}}+\dfrac{B}{r-e^{-ix}}=\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(r-e^{ix})(r-e^{-ix})}$$

$$A(r-e^{-ix})+B(r-e^{ix})=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I notice that let $$x=0$$, we will have

$$A(r-1)+B(r-1)=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I don't know to find $$A$$ and $$B$$

Also, could you provide in details how to finish the part "expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again)".

My symbolic manipulation skill is not very good, so a detailed answer is great!

Thanks!

• You have some typos where you write $e^{ix}$ instead of $e^{-ix}$.
– J.G.
Jan 27, 2021 at 22:30
• @ J.G. Thanks, I just copy and paste, let me correct them all Jan 27, 2021 at 22:30
• There are sign errors in the $e^{-ix}$ coefficients too.
– J.G.
Jan 27, 2021 at 22:31
• the sum spans over $-\infty , \infty$ or $1, \infty$, although $\cos$ is symmetric you might miss some piece Jan 27, 2021 at 23:00

There is possibly a better way, and I think this was discussed as solved example in tristam needham's book(*). Any who, we begin with geometric series:

$$\frac{1}{1-x} = \sum_{j=0}^{\infty} x^j$$

Sub: $$x \to re^{ i \theta}$$ and simplfy

$$\frac{1}{(1- r \cos \theta) - i \sin \theta} = \sum_{j=0}^{\infty} r^j e^{i j\theta} \tag{2}$$

For LHS, by multiplying with complex conjguate

$$\frac{1}{(1-r \cos \theta) - i r\sin \theta} = \frac{ (1-r \cos \theta) + i \sin \theta}{ 2 - 2 r \cos \theta+r^2} \tag{1}$$

Equating real part in (1) to real part in (2),

$$\frac{1 - r \cos \theta}{ 2 - 2r \cos \theta + r^2} = \sum_{j=0}^{\infty} r^j \cos j \theta$$

Done!

Another identity could be made by equating imaginary parts

*: Indeed it was! See page-78, 79 of Visual Complex Analysis to see how this is simply the fourier series corresponding to the geometric series. Simply two ways to view a function: As an infinite trignometric sum or as a infinite polynomial series. Pretty neat.

• in geo series sum is starting from $0$ Jan 27, 2021 at 23:02

Similar to Buraian's answer, a method I enjoy using is using the equivalent series for $$\sin$$, and then adding $$C+iS$$, as follows:

Let \begin{align} C&=1+r\cos x+r^2\cos2x+r^3\cos3x+\cdots\\ S&=r\sin x+r^2\sin2x+r^3\sin3x+\cdots\\ \end{align} Then \begin{align} C+iS&=1+r(\cos x+i\sin x)+r^2(\cos 2x+i\sin2x)+r^3(\cos3x+i\sin3x)+\cdots\\ &=1+re^{ix}+(re^{ix})^2+(re^{ix})^3+\cdots\\ &=\frac{1}{1-re^{ix}}=\frac{(1-re^{-ix})}{(1-re^{ix})(1-re^{-ix})}=\frac{1-r\cos x+ri\sin x}{1-2r\cos x+r^2} \end{align} Hence, equating real and imaginary parts we obtain \begin{align} C&=\frac{1-r\cos x}{1-2r\cos x+r^2}\\ S&=\frac{r\sin x}{1-2r\cos x+r^2}\\ \end{align} I hope that was helpful and gives you a new and interesting method for attacking these sorts of problems.

• I like your answer most, but I also vote for Buraian since he post this method first. Your solution has a "Eulerish" feeling to it. haha :) Cheers! Jan 28, 2021 at 15:42
• @JamesWarthington :)) I'm so glad I helped you! This method is pretty powerful: for other examples of me using it in other answers/questions of mine see here: math.stackexchange.com/questions/3886649/… and math.stackexchange.com/questions/3988168/… Jan 28, 2021 at 17:18
• Could you help me here as well: math.stackexchange.com/questions/4003509/… Jan 28, 2021 at 17:41
• @JamesWarthington I will have a go, I suspect the proof lies in using trig identities. Jan 28, 2021 at 17:50
• thank you, I wish my algebraic manipulation skill can be as good as you Jan 28, 2021 at 17:53

$$\cos(nx)=2\cos(x)\cos((n-1)x)-\cos((n-2)x)$$, then $$\sum_{n=1}^\infty r^n\cos(nx)=2\cos(x)\sum_{n=1}^\infty r^n\cos((n-1)x)-\sum_{n=1}^\infty r^n \cos((n-2)x)$$ $$=2r\cos(x)\sum_{n=0}^\infty r^n\cos(nx)-r^2\sum_{n=0}^\infty r^n \cos(nx)$$ Then, after some algebra, $$\sum_{n=1}^\infty r^n\cos(nx)=\frac{r\cos(x)-r^2}{1-2r\cos(x)+r^2}$$

• Can you expand your answer? They are so compacted that I don't know how did you derive these from "some algebra". Jan 28, 2021 at 3:55
• @JamesWarthington set $$f=\sum_{n\ge0}r^n\cos(nx).$$ Then $$\sum_{n\ge1}r^n\cos(nx)=f-1$$ and $$f-1=2r\cos(x)f-r^2f.$$ Solve for $f$. Jan 28, 2021 at 6:46

I might derive the series from $$\frac{1-r \cos (x)}{r^2-2 r \cos (x)+1}$$ by setting $$\cos x = (e^{ix}+e^{-ix})/2 = (z+z^{-1})/2$$ with $$z=e^{ix}$$. Then \eqalign{ \frac{1-r \cos (x)}{r^2-2 r \cos (x)+1} &= \frac{r z^2+r-2 z}{2 (r-z) (r z-1)} = \frac{1}{2}\left(1+\frac{r/z}{(1-r/z)}+\frac{1}{(1-r z)}\right) \cr &= \frac{1}{2}\left(2+\frac{r/z}{(1-r/z)}+\frac{r/z}{(1-r z)}\right) = \frac{1}{2}\left(2+\sum_{n=1}^{\infty}{(r/z)^n}+\sum_{n=1}^{\infty}{(r z)^n}\right) \cr &= 1+\sum_{n=1}^{\infty}{z^n+1/z^n\over2} {r^n} = 1+\sum_{n=1}^\infty r^n \cos nx \ \ \text{or}\ \sum_{n=0}^\infty r^n \cos nx \,. \cr }

• @Micheal E2: Man, your answer is quite difficult. I think you write with great brevity. I am trying to retrace every step you post here but they are so hard. Jan 28, 2021 at 15:39

Since\begin{align}\frac{1-r(e^{ix}+e^{-ix})/2}{(r-e^{ix})(r-e^{-ix})}&=\frac{A}{r-e^{ix}}+\frac{B}{r-e^{-ix}}\\\implies 1-r(e^{ix}+e^{-ix})/2&=A(r-e^{-ix})+B(r-e^{ix}),\end{align}the next step is to consider the $$r^0$$ and $$r^1$$ terms separately, giving$$1=-e^{-ix}A-e^{ix}B,\,-(e^{ix}+e^{-ix})/2=A+B.$$Now solve simultaneous equations. You should find$$A=-\frac12e^{ix},\,B=-\frac12e^{-ix}.$$

• @ J.G. what do you by $r^{0}$ and $r^{1}$ terms? By setting $r=r^{0}$ and $r=r^{1}$. This is not right, I think my interpretation is wrong. Jan 27, 2021 at 23:32
• @.J.G could you edit your reply and show me how to solve this system of equations? I have tried for 2 hours and only obtain $A=\frac{e^{ix}+3e^{ix}}{2(1-e^{-2ix})}$, increadily more complicated than your result. Jan 28, 2021 at 3:16
• @.J.G how do you know this system of equations only has 1 roots for A and for B? Jan 28, 2021 at 3:41
• @.J.G Here are my efforts to solve your system of equations: math.stackexchange.com/questions/4002655/… Jan 28, 2021 at 4:00

With $$1 - 2r\cos x + r^2 = (1-re^{i x})(1-re^{-ix})$$

\begin{align} \frac{1-r\cos x}{1-2r\cos x+r^2} = Re \frac{1}{1-re^{ix}} = Re\sum_{n=0}^\infty(re^{ix})^n =1+\sum_{n=1}^{\infty}r^{n}\cos nx \end{align}