<s>[INST] Compute $ f(x) = \int_0^{\pi} \frac{ \sin \theta ( \cos \theta - x) d \theta}{ [(\cos \theta - x)^2 + \sin^2 \theta]^{1.5} } x \in \Bbb{R}$ Compute
$$ f(x) = \int_0^{\pi} \frac{ \sin \theta ( \cos \theta - x)}{ [(\cos \theta - x)^2 + \sin^2 \theta]^{1.5} }
\,\,d \theta\,,\quad   x \in \Bbb{R}$$
The denominator makes it a bit annoying. We can evaluate it as
$ [(\cos \theta - x)^2 + \sin^2 \theta = (1 - 2 \cos \theta x + x^2)^{1.5}$ but it doesn't make it any easier.  We can also expand $(1 + x^2 - 2 \cos \theta x )^{1.5}$ using $(1+x)^\alpha = \sum_{n=0}^\infty \binom{\alpha}{n} x^n$ but it's still difficult.
The denominator also has some geometric meaning  (cubed distance from $(x,0)$ to $(\cos \theta, \sin \theta)$ ) but does it help?
 [/INST] Consider the sequence of substitutions:
$$u=\cos\theta-x\implies\mathrm du=-\sin\theta\,\mathrm d\theta$$
$$\implies f(x)=-\int_{1-x}^{-1-x}\frac u{(u^2+1-(u+x)^2)^{\frac32}}\,\mathrm du=\int_{-1-x}^{1-x}\frac u{(1-2ux-x^2)^{\frac32}}\,\mathrm du$$
Then
$$v=1-2ux-x^2\implies\mathrm dv=-2\,\mathrm du$$
$$\implies f(x)=\frac1{4x}\int_{x^2+2x+1}^{-3x^2+2x+1}\frac{v+x^2-1}{v^{\frac32}}\,\mathrm dv$$
</s>