Question: How to evaluate $$\int_{0}^{\pi/2} \ln \left( \frac{2 + \sin x}{2 - \sin x} \right) \, dx$$
My attempt
The original integral is: $$ J = \int_{0}^{\pi/2} \ln \left( \frac{2 + \sin x}{2 - \sin x} \right) \, dx $$
Using the substitution $y = \tan\left(\frac{x}{2}\right)$, we have: $$ \sin x = \frac{2y}{1 + y^2}, \quad dx = \frac{2 \, dy}{1 + y^2} $$
The integral becomes: \begin{align*} J &= \int_{0}^{1} \ln \left( \frac{2 + \frac{2y}{1 + y^2}}{2 - \frac{2y}{1 + y^2}} \right) \cdot \frac{2 \, dy}{1 + y^2} \\ &= \int_{0}^{1} \ln \left( \frac{2 \left( 1 + \frac{y}{1 + y^2} \right)}{2 \left( 1 - \frac{y}{1 + y^2} \right)} \right) \cdot \frac{2 \, dy}{1 + y^2} \\ &= \int_{0}^{1} \ln \left( \frac{\frac{2y^2 + 2y + 2}{1 + y^2}}{\frac{2y^2 - 2y + 2}{1 + y^2}} \right) \cdot \frac{2 \, dy}{1 + y^2} \\ &= \int_{0}^{1} \ln \left( \frac{y^2 + y + 1}{y^2 - y + 1} \right) \cdot \frac{2 \, dy}{1 + y^2} \end{align*}
Rewriting as a sum of integrals: $$ \int_{0}^{1} \ln \left( \frac{y^2 + ay + 1}{y^2 - ay + 1} \right) \cdot \frac{2 \, dy}{1 + y^2} $$
Splitting into parts: $$ = \int_{0}^{1} \int_{0}^{1} \left( \frac{y}{y^2 + ay + 1} + \frac{y}{y^2 - ay + 1} \right) \cdot \frac{2 \, da \, dy}{1 + y^2} $$
Combining \begin{align*} = \int_{0}^{1} \int_{0}^{1} \frac{4y \, da \, dy}{(y^2 + ay + 1)(y^2 - ay + 1)} \\ \end{align*}
maybe we can simplify the terms and get two different arctan integrals, but that doesn't seem like a good way to evaluate the integral. I tried simplifying the integral, and it resulted in two arctan integrals in my mind, so it might be incorrect.
edit: Thanks to Princess Eev for the link, but I'm actually interested in how to pick up where I left off. This isn't a duplicate question at all.