If $\frac{3-\tan^2\frac\pi7}{1-\tan^2\frac\pi7}=k\cos\frac\pi7$, find $k$ I need help solving this question:
$$
\text{If }\frac{3-\tan^2\frac\pi7}{1-\tan^2\frac\pi7}=k\cos\frac\pi7\text{, find k.}
$$
I simplified this down to:
$$
\frac{4\cos^2\frac\pi7-1}{2\cos^2\frac\pi7-1}
$$
But am unable to proceed further. The value of k is given to be 4, but I am unable to derive that result.
Kindly provide me with some insight, or with a step-by-step solution.
Thanks in advance,
Abhigyan
 A: \begin{align}
k&=\frac{4\cos^2\frac\pi7-1}{\cos\frac{\pi}{7}(2\cos^2\frac\pi7-1)}\\
&=\frac{2\cos\frac{2\pi}{7}+1}{\cos\frac{2\pi}{7}\cos\frac{\pi}{7}}\\
&=\frac{2\cos\frac{2\pi}{7}+1}{\frac{1}{2}(\cos\frac{3\pi}{7}+\cos\frac{\pi}{7})}\\
&=\frac{4\sin\frac{\pi}{7}\cos\frac{2\pi}{7}+2\sin\frac{\pi}{7}}{\sin\frac{\pi}{7}\cos\frac{3\pi}{7}+\sin\frac{\pi}{7}\cos\frac{\pi}{7}}\\
&=\frac{2\sin\frac{3\pi}{7}-2\sin\frac{\pi}{7}+2\sin\frac{\pi}{7}}{\frac{1}{2}(\sin\frac{4\pi}{7}-\sin\frac{2\pi}{7}+\sin\frac{2\pi}{7})}\\
&=\frac{4\sin\frac{3\pi}{7}}{\sin\frac{4\pi}{7}}\\
&=4
\end{align}
A: We need to prove that
$$3-\tan^2\frac{\pi}{7}=4(1-\tan^2\frac{\pi}{7})\cos\frac{\pi}{7}$$ or
$$\frac{3}{2}+\frac{3}{2}\cos\frac{2\pi}{7}-\frac{1}{2}+\frac{1}{2}\cos\frac{2\pi}{7}=4\cos\frac{2\pi}{7}\cos\frac{\pi}{7}$$ or
$$1+\frac{3}{2}\cos\frac{2\pi}{7}+\frac{1}{2}\cos\frac{2\pi}{7}=2\cos\frac{3\pi}{7}+2\cos\frac{\pi}{7}$$ or
$$\cos\frac{2\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{6\pi}{7}=-\frac{1}{2}$$ or
$$2\sin\frac{\pi}{7}\cos\frac{2\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{4\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{6\pi}{7}=-2\sin\frac{\pi}{7}$$ or
$$\sin\frac{3\pi}{7}-\sin\frac{\pi}{7}+\sin\frac{5\pi}{7}-\sin\frac{3\pi}{7}+\sin\frac{7\pi}{7}-\sin\frac{5\pi}{7}=-\sin\frac{\pi}{7}.$$
Id est, indeed, $k=4$.
Done!
A: $$k\cos y=\dfrac{3-\tan^2y}{1-\tan^2y}=\dfrac{3\cos^2y-\sin^2y}{\cos^2y-\sin^2y}=\dfrac{4\cos^2y-1}{2\cos^2y-1}$$
$$\iff2k\cos^3y-4\cos^2y-k\cos y+1=0\  \ \ \ (1)$$
Now if $7y=(2n+1)\pi,$
$\cos4y=\cdots=-\cos3y$
Using $\cos2A=2\cos^2A-1,\cos3B=4\cos^3B-3\cos B$
The roots of $$8\cos^4y+4\cos^3y-8\cos^2y-3\cos y+1=0$$ are $$\cos\dfrac{(2n+1)\pi}7$$ where $n\equiv0,\pm1,\pm2,\pm3\pmod7$
As for $n=3,\cos\dfrac{(2n+1)\pi}7=-1,$ the roots of $$0=\dfrac{8\cos^4y+4\cos^3y-8\cos^2y-3\cos y+1}{\cos y+1}$$
$$\iff8\cos^3y-4\cos^2y-4\cos y+1=0\  \ \ \ (2)$$ will be $$\cos\dfrac{(2n+1)\pi}7$$ where $n\equiv0,\pm1,\pm2,3\pmod7$
Compare $(1),(2)$
A: Set $z=e^{i\pi/7}$, so $z^7=e^{i\pi}=-1$ and $z^{-1}=\bar{z}$.
Then
$$
\cos\frac{\pi}{7}=\frac{z+\bar{z}}{2}=\frac{z^2+1}{2z},
\qquad
\sin\frac{\pi}{7}=\frac{z-\bar{z}}{2i}=\frac{z^2-1}{2iz}
$$
Therefore
$$
\tan\frac{\pi}{7}=-i\frac{z^2-1}{z^2+1}
$$
Plugging in the left hand side, we get
$$
\frac{3(z^2+1)^2+(z^2-1)^2}{(z^2+1)^2+(z^2-1)^2}=
\frac{4z^4+4z^2+4}{2z^4+2}=2\frac{z^4+z^2+1}{z^4+1}
$$
and finally
$$
k=2\frac{z^4+z^2+1}{z^4+1}\frac{2z}{z^2+1}=
\frac{4z(z^4+z^2+1)}{(z^4+1)(z^2+1)}
$$
The denominator reads $z^6+z^4+z^2+1$, but from $z^7+1=0$ we can deduce $z^6-z^5+z^4-z^3+z^2-z+1=0$ and so
$$
z^6+z^4+z^2+1=z^5+z^3+z=z(z^4+z^2+1)
$$
and you get
$$
k=4
$$
