Solving an integral using Leibnitz rule Is it possible to solve the integral $$\int_0^{\pi/2}\frac{\ln(a + b \sin x)}{(a - b \sin x) \sin x} dx$$ using Leibnitz's rule of differentiating under the integral sign? If so, how? I've tried differentiating with respect to 'a' it but instead of simplification, only further complication is achieved. So many things that could be done turn up after the differentiation. 
And Wolframalpha says the integral does not converge though its supposed answer is $\pi \arcsin(b/a)$
 A: According to Gradshteyn and Ryzhik's "Tables of Integrals, Series, and Products", 1980 edition, page 595 formula 4.441 (2), there is a formula
$$\int_0^{\pi/2} \ln \frac{p+q \sin ax}{p-q \sin ax} \frac{dx}{\sin ax}=\pi \arcsin \frac{q}{p},$$
with the restriction $p>q>0.$ The restriction is natural for the arcsine to exist on the right side, and maybe $p>q$ indicates the formula has some problem when $p=q.$ Also note the independence of the result on the multiplier $a,$ in particular taking $a=1$ the integrand here "almost" matches yours [replacing your $a,b$ by $p,q$ to align the constants]. But a crucial difference is that the factor $(p-q \sin ax)$ does not, as in your integral, occur as a factor of the denominator of the entire integrand, but rather it appears as the denominator of the quotient to which $\ln$ is applied. Given the matching of all other aspects of the formula, I'd have to guess your version is a typo in a sense, in that the entire quotient of the two sine terms should be "inside" the log in the integrand.
ADDED: Leibniz does imply something...
In the above integral (with $a=1$), denoted $H(p,q),$ using Leibniz differentiation under the integral sign gives the derivative w.r.t. $p$ as
$$H_p=\int_0^{\pi/2}\frac{-2q}{(p-q \sin x)^2}$$
and the derivative w.r.t. $q$ as
$$H_q=\int_0^{\pi/2}\frac{2p}{(p-q \sin x)^2}.$$
This implies that $H(p,q)$ satisfies
$$p\cdot H_p(p,q)+q \cdot H_q(p,q)=0. \tag{1}$$
This pde is satisfied by the actual value $\pi \arcsin(q/p).$ Of course the $\pi$ here could be replaced by another constant and $(1)$ would still hold, and from the symmetry $k \arcsin(p/q)$ would also solve $(1)$. I don't know much about pde but I tried a few other simple formulas for $H(p,q)$ and didn't get other solutions to $(1)$. [It may be a large class of functions for all I know.]
