Just playing with graph plotter I found some formulas for definite integrals of logarithmic functions such as $$ \int \limits_0^{\pi/2} \ln\left(a^2\cos^2 \theta + b^2\sin^2 \theta\right)\, \mathrm{d}{\theta} = \pi \ln \left(\frac{a+b}{2}\right), $$ $$ \int \limits_0^{\pi/2} \ln\left(4a^4\sin^4 \theta + b^4\cos^4\theta\right)\, \mathrm{d}{\theta}= \pi\ln\left(\frac{2a^2+b^2+2ab}{4}\right) $$ or even $$\int \limits_{0}^{1} \ln\left(a^2t^2 + b^2 (1-t)^2 \right) \, \mathrm{d}{t} = \frac{2a^2\ln a + \pi ab + 2b^2 \ln b}{a^2+b^2} - 2, $$ I hope you got the idea.
The formulas look relatively simple, like it is not impossible to prove, but I have no idea what method can be used. Not being a good mathematician, but rather the one who solves integrals by guessing in graph plotter, I asked a friend and he came up with an elegant way to prove the first one (partial derivatives along $a+b=\mathrm{const}$ are zero), but it does not seem to work well for the others as the contour lines have more complicated shapes.
Do you have any helpful thought about that? At least, where might some similar integrals have appeared before, what book/paper to search for?
Thank you.