21

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.

Bill Dubuque
  • 282,220

2 Answers2

20

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)}}}}} $$


Let us prove the following by induction on $n$: $$ \left(-\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^n\frac{\sin(x)}x=\sum_{k=0}^\infty\frac{(-1)^k2^n(n+k)!/k!x^{2k}}{(2n+2k+1)!}\tag1 $$ $(1)$ holds for $n=0$: $$ \frac{\sin(x)}x=\sum_{k=0}^\infty\frac{(-1)^kx^{2k}}{(2k+1)!}\tag2 $$ Suppose $(1)$ holds for $n$, then $$ \begin{align} \left(-\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^{n+1}\frac{\sin(x)}x &=-\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\sum_{k=0}^\infty\frac{(-1)^k2^n(n+k)!/k!x^{2k}}{(2n+2k+1)!}\tag{3a}\\ &=\sum_{k=1}^\infty\frac{(-1)^{k-1}2^{n+1}(n+k)!/(k-1)!x^{2k-2}}{(2n+2k+1)!}\tag{3b}\\ &=\sum_{k=0}^\infty\frac{(-1)^k2^{n+1}(n+k+1)!/k!x^{2k}}{(2n+2k+3)!}\tag{3c} \end{align} $$ Thus, $(1)$ holds for all $n\ge0$.

robjohn
  • 353,833
  • Thanks, I still can't get it with this though. The best I got was r/(1-r^2 . [C'/(12) - S'/(23)]/S) where S = sin, S' = 1 - r^2/(4*5)(1 - ... the next term etc.. –  Jan 27 '13 at 11:47
  • Wow! I've seen the first version of the answer, it escalated quickly! – Red Banana Jan 28 '13 at 02:39
  • Here readers are assumed to know $(2k+2)(2k+4)\dots(2k+2j)=1,j=0$, i.e. equal to multiplicative identity when $j=0$ (This comment has been edited).
  • – An5Drama Jun 28 '24 at 02:04
  • Could you say more detailedly about the notation $\left(\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^n$ although we can understand your proof without knowing that (Thanks in advance)? I tried to compute $$\begin{align}P_1(x)&=\sum_{k=0}^\infty(-x^2)^k\dfrac{2^1(k+1)!/k!}{(2k+2+1)!}\&=\sum_{k=0}^\infty\frac{-x^2}{2k+3}\cdot(-x^2)^{k-1}\dfrac{1}{(2k+1)!}\ \frac1x\frac{\mathrm{d}\frac{\sin(x)}{x}}{\mathrm{d}x}&=\sum\limits_{k=0}^\infty k\cdot (-x^2)^{k-1}\cdot(\frac{-2x}x)\cdot\dfrac1{(2k+1)!}\&=\sum\limits_{k=0}^\infty(-2k)\cdot(-x^2)^{k-1}\dfrac1{(2k+1)!}\&\neq P_1(x).\end{align}$$
  • – An5Drama Jun 28 '24 at 02:05
  • 1
    @An5Drama: I forgot a minus sign, which I have added. I have included a proof of the formula for $\left(-\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^k\frac{\sin(x)}x$ – robjohn Jun 30 '24 at 06:39
  • Thanks. As indicated in your answer, my wrong calculation for $\frac1x\frac{\mathrm{d}\frac{\sin(x)}{x}}{\mathrm{d}x}$ should have the sum index starting from $1$ instead of $0$. – An5Drama Jun 30 '24 at 08:02
  • Could I ask one small question? Here it is fine by omitting $\left(-\frac1x\frac{\mathrm{d}}{\mathrm{d}x}\right)^n\frac{\sin(x)}{x}$ for proof when saying about $P_n(x)$. Then why do you explicitly say that (are there some tricky ideas behind that and the relation between derivatives and the continued fraction)? – An5Drama Jul 01 '24 at 05:52