Prove that $$\int_0^{\frac{\pi}{2}}\frac{\log\left(\sin x\right)}{\cos^2\left(x\right)+y^2\sin^2\left(x\right)}{\rm d}x=-\frac{\pi}{2}\frac{\log\left(1+y\right)}{y}$$ where $y\ge0$.
I came across this problem on a math forum, but after attempting to solve it, I didn't get any results. I attempted to solve the problem using the residue theorem but found it challenging to prove the expression. I believe the issue lies in how to handle $\log(\sin x)$, which might require some clever substitution. But I couldn't think of any.
I hope someone can provide the correct solution. Thanks!