Find $\frac{a+b}{ab}$ such that $\int_{-1/2}^{1/2} \cos x\ln\frac{1+ax}{1+bx}dx=0$ Let $f(x) = \cos(x) \ln\left(\frac{1+ax}{1+bx}\right)$ be integrable on $\left[-\frac{1}{2} , \frac{1}{2}\right]$. Let
$$\displaystyle \int_{-1/2}^{1/2}f(x)\operatorname{dx}=0$$
where $a$ and $b$ are real numbers and not equal. Find the value of $\frac{a+b}{a\cdot b}$.
At first I applied integration by parts but then it got even more complicated and I couldn't solve it. How can I solve this problem?

Note that the log function in the integrand can be decomposed as a sum of odd and even ones
\begin{align}
\ln\frac{1+ax}{1+bx}& =\frac12\ln\frac{1+ax}{1-ax}-\frac12\ln\frac{1+bx }{1-bx} + \frac12 \ln\frac{1-a^2x^2}{1-b^2x^2} \\
& =\tanh^{-1}(ax)-\tanh^{-1}(bx) + \frac12 \ln\frac{1-a^2x^2}{1-b^2x^2}
\end{align}
where the odd functions $\tanh^{-1}()$ do not contribute to the integral and the even function has to vanish for the integral to vanish, i.e.
$$\ln\frac{1-a^2x^2}{1-b^2x^2} =0$$
which leads to $a=-b$, hence $\frac{a+b}{ab }=0$.
