<s>[INST] Calculus, Finding Integral of a quotient Seems I have forgotten some basic integrating rules, but how do I go about finding the primitive function of $f(R) = \frac {R^2}{B+R^2}$?
 [/INST] You have to consider three cases: $B=0$, $B<0$ and $B>0$.
If $B=0$, then for $R\ne 0$, the function becomes $f(R)=1$, and anti-derivative is given by
$$
F(R)=R+C,
$$
where $C$ is a constant.
If $B\ne 0$, you have to write
$$
f(R)=\frac{R^2}{B+R^2}=\frac{B+R^2-B}{B+R^2}=1-\frac{B}{B+R^2}.
$$
If $B<0$, then $B=-A^2$, and 
$$
f(R)=1+\frac{A^2}{R^2-A^2}=1-\frac{A^2}{2A}\left(\frac{1}{R-A}-\frac{1}{R+A}\right)=1-\frac{A}{2}\left(\frac{1}{R-A}-\frac{1}{R+A}\right).
$$
An anti-derivative of $f$ is then given by
$$
F(R)=R-\frac{A}{2}\ln\left|\frac{R-A}{R+A}\right|+C=R+\sqrt{-B}\ln\sqrt{\left|\frac{R+\sqrt{-B}}{R-\sqrt{-B}}\right|}+C.
$$
If $B>0$, then an anti-derivative of $f$ is given by
$$
F(R)=R-\sqrt{B}\arctan\left(\frac{R}{\sqrt{B}}\right)+C
$$
</s>