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}$?
 A: One may write
$$
\frac{R^2}{B+R^2}=\frac{B+R^2-B}{B+R^2}=1-\frac{B}{B+R^2}
$$ then, using the fact that
$$
\left( \sqrt{B}\:\arctan \left(\frac{R}{\sqrt{B}} \right)\right)'=\frac{B}{B+R^2},\quad B>0,
$$ one deduces

$$
\int\frac{R^2}{B+R^2}\:dR=R-\sqrt{B}\:\arctan \left(\frac{R}{\sqrt{B}} \right)+C,\quad B>0.
$$

Remark. Similarly the case $B<0$ leads, via a partial fraction decomposition, to

$$
\int\frac{R^2}{R^2-B}\:dR=R-\frac{\sqrt{B}}2\:\log\left(\frac{\sqrt{B}+R}{\sqrt{B}-R} \right)+C,\quad B>0.
$$

A: 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
$$
