Continued fractions for $\sin 1$ and $\cos 1$ (radians)

I am aware of Euler's continued fraction:

$$a_0+a_0a_1 + a_0a_1a_2 + a_0a_1a_2a_3 +\cdots = \cfrac{a_0}{1-\cfrac{a_1}{1+a_1-\cfrac{a_2}{1+a_2-\cfrac{a_3}{1+a_3-\ddots}}}}$$ (inductive proof)

I am also aware of the Taylor series representations of $$\sin x$$ and $$\cos x$$.

\begin{align}\sin x &= \sum_{i=0}^\infty \cfrac{(-1)^ix^{2i+1}}{(2i+1)!} = x - \cfrac{x^3}{3!}+\cfrac{x^5}{5!}-\cfrac{x^7}{7!}+\cdots\\ \cos x &= \sum_{i=0}^\infty \cfrac{(-1)^ix^{2i}}{(2i)!}=1-\cfrac{x^2}{2!}+\cfrac{x^4}{4!}-\cfrac{x^6}{6!}+\cdots\end{align}

So that's when I thought: what would happen if I combine these together?

For $$\sin x$$, I let $$a_0=x$$, $$a_1=-\cfrac{x^2}{2\cdot 3}$$, $$a_2=\cfrac{x^2}{4\cdot 5}$$, $$a_3=-\cfrac{x^2}{6\cdot 7}$$, thus getting

\begin{align}\sin x &=\cfrac{x}{1+\cfrac{x^2\div (2\cdot 3)}{1+x^2\div (2\cdot 3)-\cfrac{x^2\div (4\cdot 5)}{1+x^2\div (4\cdot 5)+\cfrac{x^2\div (6\cdot 7)}{1+x^2\div (6\cdot 7)-\ddots}}}} \\ &=\cfrac{x}{1+\cfrac{x^2}{x^2+(2\cdot 3)\Bigg\{1-\cfrac{x^2}{x^2+(4\cdot 5)\left\{1+\cfrac{x^2}{x^2+(6\cdot 7)\big\{1-\ddots\big\}}\right\}}\Bigg\}}}\end{align}

We could similarly derive a continued fraction for $$\cos x$$. However, I noticed a way to write $$\sin 1$$ and $$\cos 1$$ as continued fractions, with a much nicer form: \begin{align}\sin 1 &= \cfrac{1}{1+\cfrac{1!^2}{3!-1!+\cfrac{3!^2}{5!-3!+\cfrac{5!^2}{7!-5!+\cfrac{7!^2}{9!-7!+\ddots}}}}} \\ \cos 1 &= \cfrac{1}{1+\cfrac{0!^2}{2!-0!+\cfrac{2!^2}{4!-2!+\cfrac{4!^2}{6!-4!+\cfrac{6!^2}{8!-6!+\ddots}}}}}\end{align} Methinks these could be derived by a combination of Euler's continued fraction and the Taylor series, but this looks different and way nicer than my results when I plug in $$x=1$$. How would one be able to derive the two latter continued fractions in order to prove them (if true)?

Thanks.

• Does en.wikipedia.org/wiki/… help? Commented Mar 11, 2020 at 3:06
• @WillieWong I will post an answer, shortly. I think I got it, but with lots of messy algebra. No equivalence transforms needed, I don't think (btw why is the name of it so complex over something so trivial?) Commented Mar 11, 2020 at 4:50
• Possible duplicate? How can we convert sin function into continued fraction Commented Mar 11, 2020 at 6:05

I think the trick is to make the $$a_n$$ terms reciprocals.

$$a_0+a_0a_1 + a_0a_1a_2 + a_0a_1a_2a_3 +\cdots = \cfrac{a_0}{1-\cfrac{a_1}{1+a_1-\cfrac{a_2}{1+a_2-\cfrac{a_3}{1+a_3-\ddots}}}}\tag{given}$$

Let $$a_0=\dfrac{1}{b_0}$$, $$a_1=\dfrac{b_0}{b_1}$$, $$a_2 = \dfrac{b_1}{b_2}$$, $$a_3=\dfrac{b_2}{b_3}$$, $$\ldots$$ so $$a_0+a_0a_1+a_0a_1a_2+a_0a_1a_2a_3+\cdots=\frac{1}{b_0}+\frac{1}{b_1}+\frac{1}{b_2}+\frac{1}{b_3}+\cdots$$

$$\therefore \cfrac{a_0}{1-\cfrac{a_1}{1+a_1-\cfrac{a_2}{1+a_2-\cfrac{a_3}{1+a_3-\ddots}}}}=\cfrac{1\div b_0}{1-\cfrac{b_0\div b_1}{1+(b_0\div b_1)-\cfrac{b_1\div b_2}{1+(b_1\div b_2)-\cfrac{b_2\div b_3}{1+(b_2\div b_3)-\ddots}}}}$$

$$=\cfrac{1}{b_0-\cfrac{b_0^2\div b_1}{1+(b_0\div b_1)-\cfrac{b_1\div b_2}{1+(b_1\div b_2)-\cfrac{b_2\div b_3}{1+(b_2\div b_3)-\ddots}}}}$$

$$=\cfrac{1}{b_0-\cfrac{b_0^2}{b_1+b_0-\cfrac{b_1^2\div b_2}{1+(b_1\div b_2)-\cfrac{b_2\div b_3}{1+(b_2\div b_3)-\ddots}}}}$$

$$=\cfrac{1}{b_0-\cfrac{b_0^2}{b_1+b_0-\cfrac{b_1^2}{b_2+b_1-\cfrac{b_2^2\div b_3}{1+(b_2\div b_3)-\ddots}}}}$$

$$\boxed{\therefore \frac{1}{b_0}+\frac{1}{b_1}+\frac{1}{b_2}+\frac{1}{b_3}+\cdots=\cfrac{1}{b_0-\cfrac{b_0^2}{b_1+b_0-\cfrac{b_1^2}{b_2+b_1-\cfrac{b_2^2}{b_3+b_2-\ddots}}}}}$$

Now to evaluate $$\dfrac{1}{b_0}-\dfrac{1}{b_1}+\dfrac{1}{b_2}-\dfrac{1}{b_3}+\cdots$$. Recall: $$a_0=\dfrac{1}{b_0}$$, $$a_1=\dfrac{b_0}{b_1}$$, $$a_2 = \dfrac{b_1}{b_2}$$, $$a_3=\dfrac{b_2}{b_3}$$, $$\ldots$$

If we let $$a_1, a_2, a_3, \ldots < 0$$ then we would have $$a_0-a_0a_1+a_0a_1a_2-a_0a_1a_2a_3+\cdots$$ Therefore let $$a_0=\dfrac{1}{b_0}$$, $$a_1=-\dfrac{b_0}{b_1}$$, $$a_2 = -\dfrac{b_1}{b_2}$$, $$a_3=-\dfrac{b_2}{b_3}$$, $$\ldots$$

$$\therefore \cfrac{a_0}{1-\cfrac{a_1}{1+a_1-\cfrac{a_2}{1+a_2-\cfrac{a_3}{1+a_3-\ddots}}}}=\cfrac{1\div b_0}{1+\cfrac{b_0\div b_1}{1-(b_0\div b_1)+\cfrac{b_1\div b_2}{1-(b_1\div b_2)+\cfrac{b_2\div b_3}{1-(b_2\div b_3)+\ddots}}}}$$

$$\boxed{\therefore \frac{1}{b_0}-\frac{1}{b_1}+\frac{1}{b_2}-\frac{1}{b_3}+\cdots=\cfrac{1}{b_0+\cfrac{b_0^2}{b_1-b_0+\cfrac{b_1^2}{b_2-b_1+\cfrac{b_2^2}{b_3-b_2+\ddots}}}}}$$

That explains it :)

Continued Fractions for $$\sin x$$ and $$\cos x$$

Let $$b_0=\dfrac{1}{x}$$, $$b_1=\dfrac{3!}{x^3}$$, $$b_2=\dfrac{5!}{x^5}$$, $$b_3=\dfrac{7!}{x^7}$$, $$\ldots$$

$$\sin x=\cfrac{1}{(1\div x)+\cfrac{1\div x^2}{(3!\div x^3)-(1\div x)+\cfrac{3!^2\div x^6}{(5!\div x^5)-(3!\div x^3)+\cfrac{5!^2\div x^{10}}{(7!\div x^7)-(5!\div x^5)+\ddots}}}}$$

$$=\cfrac{x}{1+\cfrac{1\div x}{(3!\div x^3)-(1\div x)+\cfrac{3!^2\div x^6}{(5!\div x^5)-(3!\div x^3)+\cfrac{5!^2\div x^{10}}{(7!\div x^7)-(5!\div x^5)+\ddots}}}}$$

$$=\cfrac{x}{1+\cfrac{1}{(3!\div x^2)-1+\cfrac{3!^2\div x^5}{(5!\div x^5)-(3!\div x^3)+\cfrac{5!^2\div x^{10}}{(7!\div x^7)-(5!\div x^5)+\ddots}}}}$$

$$=\cfrac{x}{1+\cfrac{1}{(3!\div x^2)-1+\cfrac{3!^2}{5!-x^2\cdot 3!+\cfrac{5!^2\div x^5}{(7!\div x^7)-(5!\div x^5)+\ddots}}}}$$

$$=\cfrac{x}{1+\cfrac{1}{(3!\div x^2)-1+\cfrac{3!^2}{5!-x^2\cdot 3!+\cfrac{5!^2}{(7!\div x^2)-5!+\ddots}}}}$$

$$\boxed{\therefore \sin x = \cfrac{x}{1+\cfrac{(x\cdot 1!)^2}{3!-x^2\cdot 1!+\cfrac{(x\cdot 3!)^2}{5!-x^2\cdot 3!+\cfrac{(x\cdot 5!)^2}{7!-x^2\cdot 5!+\cfrac{(x\cdot 7!)^2}{9!-x^2\cdot 7!+\cfrac{(x\cdot 9!)^2}{11!-x^2\cdot 9!+\ddots}}}}}}}$$

$$\boxed{\therefore \cos x = \cfrac{x}{1+\cfrac{(x\cdot 0!)^2}{2!-x^2\cdot 0!+\cfrac{(x\cdot 2!)^2}{4!-x^2\cdot 2!+\cfrac{(x\cdot 4!)^2}{6!-x^2\cdot 4!+\cfrac{(x\cdot 6!)^2}{8!-x^2\cdot 6!+\cfrac{(x\cdot 8!)^2}{10!-x^2\cdot 8!+\ddots}}}}}}}$$