Deflection of light by star 
I have to calculate the deflection of light by a star (using a given metric, not Schwarzschild) and have produced the equation:
$$ \frac{d\phi}{dr} = \frac{1}{r^2} \left( \frac{1}{b^2} - \frac{1}{r^2} \right)^{-\frac{1}{2}} $$ where $b$ is the impact parameter.

I can't seem to find a way to solve this for $\phi$, for a photon approaching from infinity. I have my thoughts about what the result should be but I'm trying to do the maths without bias.
Any insights or tips on how to solve this would be appreciated!
 A: We can directly integrate the differential equation
$$ \frac{d\phi}{dr} = \frac{1}{r^{2} \sqrt{\frac{1}{b^2} - \frac{1}{r^2}}} $$
and seek the following antiderivative:
$$ \int \frac{dr}{r^{2} \sqrt{\frac{1}{b^2} - \frac{1}{r^2}}}$$
Substitute $u=\frac{b}{r}$ and obtain $du = - \frac{b}{r^{2}}dr$, so that $dr=-\frac{r^{2}}{b}du = -\frac{b}{u^{2}}du$.
Plug it into the integral:
$$ \int \frac{dr}{r^{2} \sqrt{\frac{1}{b^2} - \frac{1}{r^2}}} = \int \frac{-b}{u^{2}}\frac{u^{2}}{b^{2}} \frac{1}{\sqrt{ \frac{1}{b^{2}}(1 - u^{2})}}du = \int -\frac{1}{b} \frac{1}{\frac{1}{b}}\frac{1}{\sqrt{1 - u^{2}}}du= \\[3em]
- \int \frac{1}{\sqrt{1-u^{2}}}du = -\arcsin(u) + C = -\arcsin(\frac{b}{r}) + C . $$
Now to extract the angle of deflection I think we can use the notion of distance of closest approach $r_{0}$. This is not the same as the impact parameter $b$, see answer by Rennie.
The closest-approach distance $r_{0}$ and its relation to $b$ can be perhaps determined if you provided the metric. I suppose that it has two Killing vector fields $\xi^{t}$ and $\xi^{\phi}$ that correspond to time-translation and rotation. This serve as two constants of motion for your null geodesic $\mathbf{k}$ and:
$$-E = g(\xi^{t},\mathbf{k}) \\
L= g(\xi^{\phi},\mathbf{k})
$$
Pairing that with the $g(\mathbf{k}, \mathbf{k}) = 0 $ gives a set of equations that can be inspected for the closest approach $r_{0}$ at which $\frac{dr}{dt}=0$, as in this answer.
I am inclined to say that we need to assume axisymmetry and time-independence of the metric here - in the stronger form, i.e. that the metric is static, not only stationary. This I believe is reflected in the very fact that you could write your equation like this, without any time or free angular dependence on the RHS.
Then, with respect to this $r_{0}$, the photon's trajectory is symmetric and we can simply take twice the integral from infinity to $r_{0}$.
The total deflection angle is thus:
$$ \Delta \phi = -2 \cdot \arcsin(\frac{b}{r})\vert^{r=r_{0}}_{r=\infty}$$
