Number Theory – How to Perform Long Division: Continued Fraction for Tan

continued-fractionsnumber theorypower seriestrigonometry

I want to compute $$\tan(r) = \cfrac{r}{1 – \cfrac{r^2}{3 – \cfrac{r^2}{5 – \cfrac{r^2}{7 – {}\ddots}}}}$$ by dividing the power series for sin and cos as it is said can be done in http://arxiv.org/abs/0911.1929.


When I try it I get $$\frac{\sin(r)}{\cos(r)} = \frac{r}{1 + r^2\cdot\frac{\frac{2}{3!} – r^2 \frac{4}{5!} + r^4 \frac{6}{7!} – r^6 \frac{8}{9!} + \cdots}{\cos(r)}}$$ which has sign wrong and the series in the numerator gets mor and more complicated. The next term of the continued fraction comes up as $\frac{2}{3!}$ instead of $3$ and the next series is even more complicated (3 factorials in each summand).

I was using $A = BQ+R$ for the long division and picking $Q$ the leading coefficient of the series.

Best Answer

After looking at my previous hint, I was unable to proceed as easily as I thought. Instead, I have here expanded the division of power series in detail.

Start with $$ \begin{align} \frac{\cos(x)}{\sin(x)/x} &=\frac{\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k)!}} {\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k+1)!}}\\[12pt] &=\frac{\sum\limits_{k=0}^\infty(-x^2)^k\dfrac{2k+1}{(2k+1)!}} {\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k+1)!}}\\[12pt] &=1+\frac{\sum\limits_{k=0}^\infty(-x^2)^k\dfrac{2k}{(2k+1)!}} {\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k+1)!}}\\[12pt] &=1+\frac{\sum\limits_{k=0}^\infty(-x^2)^{k+1}\dfrac{2k+2}{(2k+3)!}} {\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k+1)!}}\\[12pt] &=1-x^2\left/\left(\frac{\sum\limits_{k=0}^\infty(-x^2)^k\dfrac1{(2k+1)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{2k+2}{(2k+3)!}}\right)\right.\\[12pt] \end{align} $$ Then note that the ratio of sums is the case $j=0$ of $$ \begin{align} &\frac{\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j)}{(2k+2j+1)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}}\\[12pt] &=\frac{\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j)(2k+2j+2)(2k+2j+3)}{(2k+2j+3)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}}\\[12pt] &=(2j+3)+\frac{\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j)(2k+2j+2)(2k)}{(2k+2j+3)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}}\\[12pt] &=(2j+3)+\frac{\sum\limits_{k=0}^\infty(-x^2)^{k+1}\dfrac{(2k+4)(2k+6)\dots(2k+2j+2)(2k+2j+4)(2k+2)}{(2k+2j+5)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}}\\[12pt] &=(2j+3)-x^2\frac{\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+4)}{(2k+2j+5)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}}\\[12pt] &=(2j+3)-x^2\left/\left(\frac{\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+2)}{(2k+2j+3)!}} {\sum\limits_{k=0}^\infty(-x^2)^{k}\dfrac{(2k+2)(2k+4)\dots(2k+2j+4)}{(2k+2j+5)!}}\right)\right.\\[12pt] \end{align} $$ and this justifies the continued fraction. That is, if we define $$ P_n(x)=\sum_{k=0}^\infty(-x^2)^k\dfrac{2^n(k+n)!/k!}{(2k+2n+1)!}=\left(\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^n\frac{\sin(x)}{x} $$ we have shown that $$ \tan(x)=\cfrac{x}{1-\cfrac{x^2}{3-\cfrac{x^2}{\ddots\lower{6pt}{(2n+1)-\cfrac{x^2}{P_n(x)/P_{n+1}(x)}}}}} $$

Related Question