how can we convert sin function into continued fraction?

Solution 1:

We will proceed as in this answer.

Define $$ P_n(x)=\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k\tag{1} $$ Then $$ \begin{align} \frac{P_{n-1}(x)}{P_n(x)} &=\frac {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n-1}-\sum\limits_{j=1}^{n-1}\binom{2k+2n-1}{2j-1}}{(2k+2n-1)!}(-x^2)^k} {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k}\\[12pt] &=\color{#C00000}{-x^2+}\frac {\displaystyle\sum_{k=0}^\infty\frac{\color{#C00000}{\binom{2k+2n-1}{2n-1}}}{(2k+2n-1)!}(-x^2)^k} {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k}\\[12pt] &=-x^2+\frac {\displaystyle\sum_{k=0}^\infty\color{#C00000}{\frac{2n(2n+1)\binom{2k+2n+1}{2n+1}}{(2k+2n+1)!}}(-x^2)^k} {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k}\\[12pt] &=\color{#C00000}{2n(2n+1)}-x^2\color{#C00000}{-}\frac {\displaystyle\sum_{k=0}^\infty\frac{2n(2n+1)\color{#C00000}{\left[4^{k+n}-\sum\limits_{j=1}^{n+1}\binom{2k+2n+1}{2j-1}\right]}}{(2k+2n+1)!}(-x^2)^k} {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k}\\[12pt] &=2n(2n+1)-x^2\color{#C00000}{+2n(2n+1)x^2}\frac {\displaystyle\sum_{k=0}^\infty\color{#C00000}{\frac{4^{k+n+1}-\sum\limits_{j=1}^{n+1}\binom{2k+2n+3}{2j-1}}{(2k+2n+3)!}}(-x^2)^k} {\displaystyle\sum_{k=0}^\infty\frac{4^{k+n}-\sum\limits_{j=1}^n\binom{2k+2n+1}{2j-1}}{(2k+2n+1)!}(-x^2)^k}\\[12pt] &=2n(2n+1)-x^2+2n(2n+1)x^2\color{#C00000}{\left/\frac{P_n(x)}{P_{n+1}(x)}\right.}\tag{2} \end{align} $$ As I suggested in chat, consider $$ \begin{align} \sin(x) &=\frac{\sin(2x)}{2\cos(x)}\\ &=\frac {\displaystyle x\sum_{k=0}^\infty\frac{4^k(-x^2)^k}{(2k+1)!}} {\displaystyle\sum_{k=0}^\infty\frac{(-x^2)^k}{(2k)!}}\\ &=x\left/\left(\frac {\displaystyle\sum_{k=0}^\infty\frac{(-x^2)^k}{(2k)!}} {\displaystyle \sum_{k=0}^\infty\frac{4^k(-x^2)^k}{(2k+1)!}} \right)\right.\\ &=x\left/\left(1+x^2\left/\frac{P_0(x)}{P_1(x)}\right.\right)\right.\tag{3} \end{align} $$ $(2)$ and $(3)$ lead us to the continued fraction $$ \sin(x)=\cfrac{x}{1+\cfrac{x^2}{2\cdot3-x^2+\cfrac{2\cdot3x^2}{\ddots\lower{6pt}{2n(2n+1)-x^2+\cfrac{2n(2n+1)x^2}{P_n(x)/P_{n+1}(x)}}}}}\tag{4} $$

Solution 2:

I learned how to do this from this document (look for Theorem I) https://people.math.osu.edu/sinnott.1/ReadingClassics/continuedfractions.pdf

Interestingly, this looks to be a translation of Euler's original work. I find him easy to understand, he avoids confusing his message in clumsy notation.