Let $I(\theta)=\int_0^\theta\log\left(\cos x-\sqrt{\cos^2x-\cos^2\theta}\right)dx$ for $0<\theta<\frac{\pi}{2}$.
Prove that $I(\theta)=\left(\theta+\frac{\pi}{2}\right)\log(\cos\theta)$.
Context
The question arose when I was investigating the following geometry question.
Tangents to a circle at $B$ and $C$ meet at $A$. Let $\angle BAC=2\theta$. Draw $n$ line segments from $A$ to minor arc $\overset{\huge\frown}{\rm{BC}}$, equally spaced in terms of angles, with two of the line segments coincident with the tangent lines. Here is an example with $n=9$.
If $\lim\limits_{n\to\infty}(\text{product of lengths of the line segments})$ is a positive real number, then what is $AB$ in terms of $\theta$ ?
Long story short: numerical investigation suggested that $AB=\left(\cos\theta\right)^{-\pi/(2\theta)}$ (which surprisingly does not contain $e$), which is true if and only if $I(\theta)=\left(\theta+\frac{\pi}{2}\right)\log(\cos\theta)$. (And this would imply that the limit of the product equals $AB$.)
The case $\theta=\frac{\pi}{4}$
$I\left(\frac{\pi}{4}\right)=\int_0^{\pi/4}\log\left(\cos x-\sqrt{\cos^2x-\frac12}\right)dx$, via $x\to\frac{x}{2}$, is equal to $-\frac34\int_0^{\pi/2}\log{(\sqrt{\cos x}+\sqrt{\cos x+1})}dx$, which is evaluated here. I don't know how to adapt this solution to the general case.
