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?

To be zero the integral, $h(x)=\log \left(\frac{1+a x}{1+b x}\right)$ must be odd, thus
$$\log \left(\frac{1+a x}{1+b x}\right)=-\log \left(\frac{1-a x}{1-b x}\right)$$
$$\log \left(\frac{1+a x}{1+b x}\right)+\log \left(\frac{1-a x}{1-b x}\right)=0$$
$$\log\frac{1-a^2x^2}{1-b^2x^2}=0$$
$$1-a^2x^2=1-b^2x^2\to b=-a$$
since the problem says $a\ne b$.
$h(x)=-h(-x)\to b=-a$
Must be added that  $h(x)$ exists on $[-1/2,1/2]$ only if
$$\frac{1+a x}{1-a x}>0\to -2<a<2$$
