Consider two line pieces of same size that are connected at one end and at the other end they are connected by a circle segment. The total length, so circle segment and straight parts together have length $L$. I have to determine the following (approximate) integral and minimize it with respect to the apex angle $\alpha$ (angle between straight lines)
$$H=\int^L_0 \frac{1}{R(s)^2} ds$$
where $R(s)$ is the radius of curvature. I know that for the circular part it holds true that this is constant. And I thought that the straight parts do not contribute. However, this idea does not yield the result $\alpha+\pi=\tan(\alpha)$ for the $\alpha$ that minimizes $H$. What goes wrong in my calculations?
$\renewcommand{\dd}[1]{\,\mathrm{d}#1}\renewcommand{\paren}[1]{ \Bigl( #1 \Bigr) }$Following the given settings, denote the length of each straight segment as $\ell$, the apex angle as $\alpha$, and the radius of the circular arc as $r$. From the diagram we have: $$r = \ell \tan\frac{\alpha}2 \qquad \text{or} \quad\ell = \frac{r}t \qquad \text{where} \quad t \equiv \tan\frac{\alpha}2~.$$
Also from the diagram are the angles sizes, making the total length (straight plus arc) $$L=2\ell + r(\pi+\alpha) \implies r \paren{ \frac2t + \pi + \alpha} = L~.$$
The contribution from the straight segments is zero (radius of curvature $R(s)$ is infinite), and for the circular part it is $R(s) = r$, constant over the entire arc length of $r(\pi+\alpha)$:
$$H=\int^L_0 \frac{1}{R(s)^2} \dd{s} = \int^{r(\pi+\alpha)}_0 \frac1{r^2} \dd{s} = \frac{\pi+\alpha}{r} = \frac1L(\pi+\alpha)\paren{\pi+\alpha+\frac2t} \\ \begin{aligned} \implies \frac{ \dd{H} }{ \dd{\alpha } } &\propto \frac{ \dd{} }{ \dd{\alpha } } \left( (\pi+\alpha)^2 + (\pi+\alpha) \frac2t \right) \quad\small\text{, written this way for convenience at the end}\\ &= 2(\pi+\alpha) + \frac2t + (\pi+\alpha) \frac{-2}{t^2} \frac{ \dd{t} }{ \dd{\alpha } } \qquad \text{, note that} \quad \frac{ \dd{t} }{ \dd{\alpha } } = \frac{1+t^2}2 \\ &= 2 \paren{\pi+\alpha + \frac1t} - (\pi+\alpha)\frac{1+t^2}{t^2} \end{aligned}$$
The optimal angle will be at $dH/d\alpha = 0$ (with considerably more effort $d^2 H/d\alpha^2 > 0$ can be double checked).
\begin{align} 2 \paren{\pi+\alpha + \frac1t} &= (\pi+\alpha)\frac{1+t^2}{t^2} \\ 1 + \frac1{ (\pi+\alpha) \cdot t} &= \frac{1+t^2}{2t^2} \\ \frac1{ (\pi+\alpha) t} &= \frac{1-t^2}{2t^2} \\ \pi+\alpha &= \frac{2t}{1-t^2} = \tan\alpha \end{align} The last line ends with the well-known identity for tangent-of-half-angle.