What is the solution of the following definite integral? I encountered this integral in my calculations (picture here):
$$
\int_{f=0}^{f=\pi/2} \frac
{\left(n_0 \sqrt{1 - \left(\frac{n_0}{n_1} \sin f \right)^2} - n_1 \cos f\right)^2}
{\left(n_0 \sqrt{1 - \left(\frac{n_0}{n_1} \sin f \right)^2} + n_1 \cos f\right)^2}
 2 ~ \sin f ~ \cos f ~\mathrm{d}f
$$
Here, $n_0$ and $n_1$ are constants, such that $n_0$<$n_1$. Both constants are real and positive.
I tried to find solution in Table of integrals,series and products and by using Wolfram mathematica, but I have not managed to find it.
 A: This seems to be the Lambertian reflectance for parallelly polarised light passing from medium 0 to medium 1, so let us introduce $n = \frac{n_1}{n_0} > 1$ and write your integral as
\begin{align}
r_\text{p} (n) &= \int \limits_0^{\pi/2} \left(\frac{n^2 \cos(f) - \sqrt{n^2 - \sin^2(f)}}{n^2 \cos(f) + \sqrt{n^2-\sin^2(f)}}\right)^2 2 \sin(f) \cos(f) \, \mathrm{d} f \\
&\!\!\!\!\!\!\stackrel{\sin^2(f) = t}{=} \int \limits_0^1 \left(\frac{1 - \frac{n^2 \sqrt{1-t}}{\sqrt{n^2-t}}}{1 + \frac{n^2 \sqrt{1-t}}{\sqrt{n^2-t}}}\right)^2 \, \mathrm{d} t \stackrel{\frac{n \sqrt{1-t}}{\sqrt{n^2-t}} = u}{=} 2 n^2 (n^2 - 1) \int \limits_0^1 \frac{u (1-nu)^2}{(1+nu)^2(n+u)^2(n-u)^2} \, \mathrm{d} u \\
&= 2 n^2 (n^2 - 1) \int \limits_0^1 \left[\frac{8 n^3(n^4+1)}{(n^4-1)^3(1+nu)} - \frac{4n^3}{(n^4-1)^2 (1+nu)^2} \right. \\
&\phantom{= 2 n^2 (n^2 - 1) \int \limits_0^1 \left[\vphantom{\frac{8 n^3(n^4+1)}{(n^4-1)^3(1+nu)}}\right.} \left.  - \, \frac{n^2-1}{(n^2+1)^3 (n-u)} + \frac{(n^2-1)^2}{4(n^2+1)^2n(n-u)^2} \right. \\
&\phantom{= 2 n^2 (n^2 - 1) \int \limits_0^1 \left[\vphantom{\frac{8 n^3(n^4+1)}{(n^4-1)^3(1+nu)}}\right.} \!\left. - \, \frac{n^2+1}{(n^2-1)^3(n+u)} - \frac{(n^2+1)^2}{4(n^2-1)^2 n (n+u)^2}\right] \mathrm{d} u \, .
\end{align}
The remaining integrals are elementary and after some simplification we end up with
$$ r_\text{p} (n) = 1 - \frac{4 n^3 (n^2+2n-1)}{(n^2-1)(n^2+1)^2} + \frac{16 n^4 (n^4+1)}{(n^2-1)^2(n^2+1)^3} \ln(n) - \frac{4 n^2 (n^2-1)^2}{(n^2+1)^3} \operatorname{arcoth} (n) \, .$$
A: Hint. Simplify the integrand by rationalising the denominator. Then use the substitution $f=π/2-g.$
