On the graph of $y=\tan{x}$, $0<x<\pi/2$, draw $2n$ zigzag line segments that, with the x-axis, form equal-width isosceles triangles whose top vertices lie on the curve. Here is an example with $n=6$.
It seems that, as $n\to\infty$, the product of their lengths converges to a positive number. The limit is:
$$L=\lim\limits_{n\to\infty}\exp{\sum\limits_{k=1}^n}\ln{\left(\left(\frac{\pi}{4n}\right)^2+\tan^2{\left(\frac{2k-1}{4n}\pi\right)}\right)}$$
Desmos suggests that $L\approx 2.50917847$. I am looking for a closed form for this limit.
I've been trying to apply what I learned about sums of logs in a previous question of mine, but I still have not been able to evaluate this one.
If we change the graph to $y=\tan{\left(\frac{\pi}{2}x\right)}$, $0<x<1$, the corresponding limit seems strikingly similar to $\frac{1}{2}\left(e+\frac{1}{e}\right)$, based on computer calculation. So, assuming that is the correct limit in that case, I would expect the limit in this question, $L$, to look something along those lines.
I find it interesting that a geometrical infinite product, that is neither $0$ nor $\infty$, exists in such a simple geometrical construction, without needing to make any modifications.
EDIT: Thanks to @Jean Marie's comment, I am very confident that $L=\cosh{(\pi/2)}$. But how to prove this?