# Simplifying $3S_1 + 2S_2 + 2S_3$, where $S_1=2\sum_{k=0}^n16^k\tan^4{2^kx}$, $S_2=4\sum_{k=0}^n16^k\tan^2{2^kx}$, $S_3=\sum_{k=0}^n16^k$

If $$S_1=2\sum_{k=0}^n 16^k \tan^4 {2^k x}$$ $$S_2=4\sum_{k=0}^n 16^k \tan^2 {2^k x}$$ $$S_3= \sum_{k=0}^n 16^k$$ Find $$(3S_1 + 2S_2 + 2S_3)$$ as a function of $$x$$ and $$n.$$

In the expression asked it rearranges to $$2[(\tan^2x+1)(3\tan^2x+1)+(\tan^22x+1)(3\tan^22x+1)\cdots]$$ Now this is not simplifying further, I tried in converting $$\tan$$ to $$\sec$$ but no approach still found. Maybe there is some special series devoted to summation of $$\tan^2$$ and $$\tan^4$$ about which I’m not aware. I also thought differentiating twice the expression $$\log(\cos (x)\cos(2x)\cos(2^2x)\cdots\cos(2^nx))=\log\left(\frac{\sin(2^{n+1}x)}{2^{n+1}\sin(x)}\right)$$ so series of $$\tan^2$$ can be created by $$\tan^2\theta+1=\sec^2\theta$$ but the constant terms are coming wrong and series of $$\tan^4$$ is still far away.

• The "$n+1$" terms are a bit confusing - they aren't a continuation of the previous terms. Aug 8, 2023 at 14:22
• Are the general terms of the series $S_1=2\sum_{k=0}^n 16^k \tan^4 {2^k x}$, $S_2=4\sum_{k=0}^n 16^k \tan^2 {2^k x}$, $S_3 = \sum_{k=0}^n 16^n$? (If that's right it might be helpful to put those into the question - you can copy the MathJax by right-clicking) Aug 8, 2023 at 14:26
• I actually meant n+1 terms but missed writing it. Aug 8, 2023 at 15:22
• I think this question has a mistake, and that $S_3 = \sum_{k=0}^n 16^k$.
– Matt
Aug 11, 2023 at 10:05
• What makes you think there is a closed form? (At least one that does not involve a sum) Aug 12, 2023 at 5:50

## 2 Answers

If $$x=m\pi\ (m\in\mathbb Z)$$, then $$3S_1+2S_2+2S_3=\dfrac{2(16^{n+1}-1)}{15}$$

If $$x\not=m\pi\ (m\in\mathbb Z)$$, then $$3S_1+2S_2+2S_3=\dfrac{2^{4n+5}(\tan^2(2^{n+1}x)+3)(\tan^2(2^{n+1}x)+1)}{\tan^4(2^{n+1}x)}-\dfrac{2(\tan^2x+3)(\tan^2x+1)}{\tan^4x}$$

Proof :

For $$x=m\pi\ (m\in\mathbb Z)$$, since $$\sin x=0$$, we get $$3S_1+2S_2+2S_3=0+0+2S_3=\dfrac{2(16^{n+1}-1)}{15}$$

In the following, $$x\not=m\pi\ (m\in\mathbb Z)$$.

Let us start with $$\displaystyle\int(3S_1+2S_2+2S_3)dx$$.

Using \begin{align}\int \tan^4(2^kx)dx&=\frac{\tan^3(2^kx)}{3\cdot 2^k}-\frac{\tan(2^kx)}{2^k}+x+C \\\\\int\tan^2(2^kx)dx&=\frac{\tan(2^kx)}{2^k}-x+C\end{align} we have \begin{align}&\int(3S_1+2S_2+2S_3)dx \\\\&=\sum_{k=0}^{n}\bigg( 6\cdot 16^k\int \tan^4(2^kx)dx+8\cdot 16^k\int\tan^2(2^kx)dx+2\cdot 16^k\int dx\bigg) \\\\&=\sum_{k=0}^{n}\bigg[6\cdot 16^k\bigg(\frac{\tan^3(2^kx)}{3\cdot 2^k}-\frac{\tan(2^kx)}{2^k}+x\bigg) \\&\qquad\quad +8\cdot 16^k\bigg(\frac{\tan(2^kx)}{2^k}-x\bigg)+2\cdot 16^kx\bigg]+C_1 \\\\&=\sum_{k=0}^{n}\bigg(2\cdot 8^k\tan^3(2^kx)-6\cdot 8^k\tan(2^kx)+6\cdot 16^kx \\&\qquad\quad +8\cdot 8^k\tan(2^kx)-8\cdot 16^kx+2\cdot 16^kx\bigg)+C_1 \\\\&=\sum_{k=0}^{n}\bigg(2\cdot 8^k\tan^3(2^kx)+2\cdot 8^k\tan(2^kx)\bigg)+C_1 \\\\&=\underbrace{\sum_{k=0}^{n}\bigg(\frac{2\cdot 8^k\tan(2^kx)}{\cos^2(2^kx)}\bigg)}_{F_1}+C_1\end{align}

Using $$\int\frac{\tan(2^kx)}{\cos^2(2^kx)}dx=\frac{\tan^2(2^kx)}{2^{k+1}}+C$$ we have \begin{align}\int F_1\ dx&=\sum_{k=0}^{n}\bigg(2\cdot 8^k\int \frac{\tan(2^kx)}{\cos^2(2^kx)}dx\bigg) \\\\&=\sum_{k=0}^{n} \bigg(2\cdot 8^k\cdot \frac{\tan^2(2^kx)}{2^{k+1}}\bigg)+C_2 \\\\&=\underbrace{\sum_{k=0}^{n}\bigg(2^{2k}\tan^2(2^kx)\bigg)}_{F_2}+C_2\end{align}

So, we have \begin{align}\int F_2\ dx&=\sum_{k=0}^{n} 2^{2k}\int \tan^2(2^kx)dx \\\\&=\sum_{k=0}^{n} 2^{2k}\bigg(\frac{\tan(2^kx)}{2^k}-x\bigg)+C_3 \\\\&=\underbrace{\sum_{k=0}^{n}\bigg(2^k\tan(2^kx)-2^{2k}x\bigg)}_{F_3}+C_3\end{align}

Using $$\int \tan(2^kx)dx=-\frac{\log|\cos(2^kx)|}{2^k}+C$$ we have \begin{align}\int F_3\ dx&=\sum_{k=0}^{n}\bigg(2^k\int\tan(2^kx)dx-2^{2k}\int xdx\bigg) \\\\&=\sum_{k=0}^{n}\bigg(-\log|\cos(2^kx)|-2^{2k-1}x^2\bigg)+C_4 \\\\&=-\sum_{k=0}^{n}\log|\cos(2^kx)|-x^2\sum_{k=0}^{n}2^{2k-1}+C_4 \\\\&=-\log\bigg|\frac{\sin(2^{n+1}x)}{2^{n+1}\sin x}\bigg|-\frac{2^{2n+2}-1}{6}x^2+C_4 \\\\&=\underbrace{-\log|\sin(2^{n+1}x)|+\log|\sin x|-\frac{2^{2n+2}-1}{6}x^2}_{F_4}+C_5\end{align}

We can get $$3S_1+2S_2+2S_3$$ by differentiating $$F_4$$ four times, so $$3S_1+2S_2+2S_3=\dfrac{2^{4n+5}(\tan^2(2^{n+1}x)+3)(\tan^2(2^{n+1}x)+1)}{\tan^4(2^{n+1}x)}-\dfrac{2(\tan^2x+3)(\tan^2x+1)}{\tan^4x}.\ \blacksquare$$

There is another solution using the idea of telescoping sum.

Letting $$G(k):=\frac{2^{4k+1}(\tan^2(2^{k}x)+3)(\tan^2(2^{k}x)+1)}{\tan^4(2^{k}x)}$$ we have \begin{align}3S_1+2S_2+2S_3&=\sum_{k=0}^{n}2\cdot 16^k(3\tan^2(2^kx)+1)(\tan^2(2^kx)+1) \\\\&=\sum_{k=0}^{n}\bigg(G(k+1)-G(k)\bigg) \\\\&=G(n+1)-G(0)\end{align}

• Amazing answer, I’ll accept it once the bounty period expires just to attract more people to share their thoughts. Aug 14, 2023 at 15:43

We shall prove the identity $$$$\sum_{k=0}^n16^k[6\tan^4(2^kx)+8\tan^2(2^kx)+2]=16^{n+1}[6\cot^4(2^{n+1}x)+8\cot^2(2^{n+1}x)+2]- [6\cot^4(x)+8\cot^2(x)+2]$$$$ via complex analysis.

Let $$\mathcal{S}=3S_1+2S_2+2S_3$$ denote the LHS of the above equality, and notice that $$\mathcal{S}$$ is meromorphic, and $$\pi$$-periodic. Note that the poles of $$\tan^4(x)$$ and $$\tan^2(x)$$ lie at points of the form $$x_0=(m+\frac12)\pi$$, with corresponding Laurent expansions $$$$\begin{split} \tan^4(x)&=\frac1{(x-x_0)^4}-\frac4{3(x-x_0)^2}+O(1)\\ \tan^2(x)&=\frac1{(x-x_0)^2}+O(1)\\ \end{split}$$$$ about $$x_0$$. Therefore the set of poles of $$\mathcal{S}$$ is given by $$(\frac{\pi}{2^{n+1}})\mathbb{Z}\backslash \pi\mathbb{Z}$$, and each pole may be written uniquely as $$x_0=\frac{(2m+1)\pi}{2^{k+1}}$$ for integer $$m$$, and $$0\leq k\leq n$$, with corresponding Laurent expansion $$$$\begin{split} \mathcal{S}(x)&=6\cdot 16^k\left[\frac1{2^{4k}(x-x_0)^4}-\frac4{3\cdot 2^{2k}(x-x_0)^2}\right] -8\cdot 16^k\left[\frac1{2^{2k}(x-x_0)^2}\right]+O(1)\\ &=\frac{6}{(x-x_0)^4}+O(1) \end{split}$$$$ about $$x_0$$. Using the same logic as above, we may construct the meromorphic, $$\pi$$-periodic function $$f(x)=16^{n+1}[6\cot^4(2^{n+1}x)+8\cot^2(2^{n+1}x)+2]-[6\cot^4(x)+8\cot^2(x)+2]$$ which also has a set of poles given by $$(\frac{\pi}{2^{n+1}})\mathbb{Z}\backslash \pi\mathbb{Z}$$, and each pole $$x_0$$ also has the corresponding Laurent expansion $$f(x)=\frac{6}{(x-x_0)^4}+O(1)$$ about $$x_0$$.

Finally, notice that $$\lim_{\mathfrak{I}(x)\rightarrow\pm\infty}\tan^2(x)=-1$$, so $$$$\lim_{\mathfrak{I}(x)\rightarrow\pm\infty}\mathcal{S}(x)-f(x)=\sum_{k=0}^n16^k[6-8+2]-16^{n+1}[6-8+2]+[6-8+2]=0$$$$

Since $$\mathcal{S}$$ and $$f$$ are both meromorphic and $$\pi$$-periodic, and share the same poles with the same Laurent expansions about those poles up to $$O(1)$$, then $$\mathcal{S}-f$$ is analytic and $$\pi$$-periodic, and since $$\mathcal{S}-f$$ vanishes as $$\mathfrak{I}(x)\rightarrow\pm\infty$$, then $$S-f$$ is bounded. Therefore by Louville's theorem, $$\mathcal{S}-f$$ is constant. Finally, since $$\mathcal{S}-f$$ vanishes as $$\mathfrak{I}(x)\rightarrow\pm\infty$$, then $$\mathcal{S}-f$$ is precisely $$0$$, which completes the proof.

Addendum: Note that this procedure generalizes, and can be used to construct and prove higher order identities of this type. In fact, we have the following theorem which may be proven in the same way as above:

Let $$c_{k,\ell}$$ denote the $$(-2k)$$-th coefficient of the Laurent expansion of $$\cot^{2\ell}(x)$$ about $$0$$, and define the polynomial $$P_m(u)=a_m u^{2m}+\cdots +a_1u^2+a_0$$, where $$a_0,a_1,\ldots, a_m$$ is the solution to $$$$\left[\begin{matrix} 0\\0\\0\\\vdots\\0\\1\\ \end{matrix}\right] = \left[\begin{matrix} 1&-1&1&\cdots&(-1)^{m-1}&(-1)^m\\ 0&c_{1,1}&c_{1,2}&\cdots&c_{1,m-1}&c_{1,m}\\ 0&0&c_{2,2}&\cdots&c_{2,m-1}&c_{2,m}\\ \vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&\cdots&c_{m-1,m-1}&c_{m-1,m}\\ 0&0&0&\cdots&0&c_{m,m}\\ \end{matrix}\right] \left[\begin{matrix} a_0\\a_1\\a_2\\\vdots\\a_{m-1}\\a_m\\ \end{matrix}\right]$$$$ We then have the following identity: $$$$\sum_{k=0}^n2^{2mk}P_m(\tan(2^k x))=2^{2m(n+1)}P_m(\cot(2^{n+1}x))-P_m(\cot(x))$$$$ For example, the first few polynomials $$P_m(u)$$ are given below: $$\begin{split} P_1(u)&=u^2+1\\ P_2(u)&=u^4+\frac{4}{3}u^2+\frac{1}{3}\\ P_3(u)&=u^6+2u^4+\frac{17}{15}u^2+\frac{2}{15}\\ P_4(u)&=u^8+\frac{8}{3}u^6+\frac{12}{5}u^4+\frac{248}{315}u^2+\frac{17}{315}\\ \end{split}$$ Note that the identity proven in the first part of this answer is a special case of the above more general identity, setting $$m=2$$ (just multiply both sides by $$6$$).

• Sorry but I’m not familiar with the term meromorphic and Laurent expressions. Aug 14, 2023 at 15:41
• Fair enough. I suppose an answer of this sort won't make sense if you don't have the relevant prerequisites, though I do hope someone finds it helpful at least as a demonstration of the power of these sorts of methods. Anyways, how much do you know about complex analysis (or is it just those two terms that you don't understand)? Do you at least know what a complex analytic function is? I would like to give you some amount of intuition for what I just wrote, but I need to know what you know before I can try. Aug 14, 2023 at 16:01
• I’m not exactly knowing this topic by name but if it is related to complex conjugate, modulus, $n^{th}$ root of unity, geometrical applications, then I’m aware about it. Aug 14, 2023 at 17:07
• Ah, ok. Complex analysis is what comes after that and can broadly be considered the study of calculus on functions of complex variables. I'm not really going to be able to tell you anything deep without you having a good backround in complex analysis (I really reccomend studying it if you ever get the opportunity). Aug 14, 2023 at 17:44
• Ok I’ll surely return back to this answer after having an overview of complex analysis and thanks for the explanation at the end which didn’t left me blank and gave some intuition about your answer. Aug 15, 2023 at 1:45