Find the differential equation satisfying $$f(\theta)=\frac{d}{d\theta}\int_0^\theta\frac{dx}{1-\cos\theta\cos x}$$
It is solved in my reference (also in this video) as: $$ f(\theta)=\frac{d}{d\theta}\int_0^\theta\frac{dx}{1-\cos\theta\cos x}=\frac{1}{1-\cos^2\theta}=\csc^2\theta\\ f'(\theta)=-2\csc^2\theta\cot\theta\\ f'(\theta)+2f(\theta)\cot\theta=0 $$ As per my knowledge the Leibniz rule is $$ \frac{d}{d\theta}\int_{a(\theta)}^{b(\theta)}g(\theta,x)dx=g(\theta,b(\theta))\frac{d}{d\theta}b(\theta)-g(\theta,a(\theta))\frac{d}{d\theta}a(\theta) $$ iff $g(x,\theta)=g(x)$
So isn't it wrong to approach the problem as in my reference ?