= Solution
Place the wire on the $y$ axis, its endpoints at $-a$ and $b$, and the observation point at $(-d,0)$. With current along $+y$, $d\boldsymbol\ell'\times\mathbf r$ points out of the page. Its magnitude gives
$$
B=\frac{\mu_0I}{4\pi}\int_{-a}^b\frac{d\,dy}{(d^2+y^2)^{3/2}}=\frac{\mu_0I}{4\pi d}\left[\frac y{\sqrt{d^2+y^2}}\right]_{-a}^{b}.
$$
In the question's <angle> convention, $\cos\beta=b/\sqrt{d^2+b^2}$ and $\cos\alpha=-a/\sqrt{d^2+a^2}$. Therefore
$$
\boxed{B=\frac{\mu_0I}{4\pi d}(\cos\beta-\cos\alpha).}
$$
The minus sign in $\cos\alpha$ matters because $\alpha$ is the exterior obtuse <angle>.
Back to article page