Calculus – Continued Fraction for $\tan(nx)$

algebra-precalculuscalculuscontinued-fractionstrigonometry

I found this beautiful continued fraction expansion of $\tan(nx)$, $n$ being a positive integer, online but I don't remember the source now:

$\displaystyle \tan(nx) = \cfrac{n\tan x}{1 -\cfrac{(n^{2} – 1^{2})\tan^{2}x}{3 -\cfrac{(n^{2} – 2^{2})\tan^{2}x}{5 -\cfrac{(n^{2} – 3^{2})\tan^{2}x}{7 -\cdots}}}}$

the last term in the continued fraction being $\dfrac{(n^{2} – (n – 1)^{2})\tan^{2}x}{(2n – 1)} = \tan^{2}x$. For example for $n = 3$ we have

$\displaystyle \tan 3x = \cfrac{3\tan x}{1 -\cfrac{8\tan^{2}x}{3-\cfrac{5\tan^{2}x}{5}}}$

which is correct and can be verified easily. I would like to know a simple proof via elementary trigonometry and algebra.

I had asked this question long back on NRICH(https://nrich.maths.org/discus/messages/153904/145455.html) but did not get any helpful answer. The reason I wish to know the proof is that it will lead me to an elementary proof of continued fraction expansion of $\tan z$. Putting $nx = z$ where $z$ is kept constant and $n$ is made to tend to $\infty$ (so that $x \to 0$) we get

$\displaystyle \tan z = \cfrac{z}{1-\cfrac{z^{2}}{3 -\cfrac{z^{2}}{5-\cfrac{z^{2}}{7-\cdots}}}}$

instead of the complicated proof by Lambert given in my blog http://paramanands.blogspot.com/2011/04/continued-fraction-expansion-of-tanx.html

I have got another formula from an exercise in "A Course of Pure Mathematics" by G. H. Hardy:
$$\cos nx = 1 – \frac{n^{2}}{2!}\sin^{2}x – \frac{n^{2}(2^{2} – n^{2})}{4!}\sin^{4}x – \frac{n^{2}(2^{2} – n^{2})(4^{2} – n^{2})}{6!}\sin^{6}x – \cdots$$

I will try to find out if this formula can be used to prove the continued fraction expansion of $\tan(nx)$.

Update: This question was originally posed by Euler in 1813. See Chrystal's Algebra Vol 2 (page 526, problem 31).

Further Update: The following approach looks promising but I don't know how to complete it.

We have $\tan nx=A/B$ where $$A=\binom{n} {1}\tan x-\binom{n}{3}\tan ^3x+\dots$$ and $$B=\binom{n} {0}-\binom{n}{2}\tan ^2x+\dots$$ and thus $$\frac{\tan nx} {n\tan x} =\frac{C} {B} =\dfrac{1}{1+\dfrac{B-C}{C}}$$ where $$C=1-\frac{(n-1)(n-2)}{3!}\tan^2x+\dots$$ Next $$B-C=-\frac{n^2-1^2}{1!3}\tan^2x+\frac{(n^2-1^2)(n-2)(n-3)}{3!5}\tan^4x-\dots$$ and this can be rewritten as $$-\frac{n^2-1^2}{3}\tan^2x\left(1-\frac{(n-2)(n-3)}{2!5}\tan^2x+\dots\right)$$ If the expression in large parentheses above is $D$ then we have $$\frac{\tan nx} {n\tan x} =\dfrac{1}{1-\dfrac{(n^2-1^2) \tan^2x}{3+\dfrac{3C-3D}{D}}}$$ The problem now is to put $B, C, D$ into a common pattern so that we can easily get the next expressions like $E, F, \dots$.

Thanks to user Paul Enta (and his wonderful answer) the above approach is completed via the use of hypergeometric series. See my answer for details.

Best Answer

In this answer, I got this continued fraction $$ \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)}}}}} $$ where $$ 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} $$ I don't know if my proof is any simpler or harder than the one you are considering.

Related Question