$\displaystyle \int \frac{(4+x^3)}{(4+x^2)} dx
$
For the integrand $\displaystyle \frac{(x^3+4)}{(x^2+4)}$, do long division:
$\displaystyle = \int (x-(4 \frac{(x-1))}{(x^2+4)}) dx$
Integrate the sum term by term and factor out constants:
$\displaystyle = \int x dx-4 \int \frac{(x-1)}{(x^2+4)} dx
$
Expanding the integrand $\displaystyle \frac{(x-1)}{(x^2+4)}$ gives
$\displaystyle \frac{x}{(x^2+4)}-\frac{1}{(x^2+4)}$:
$\displaystyle = \int x dx-4 \int \frac{(x}{(x^2+4)}-\frac{1}{(x^2+4)} dx
$
Integrate the sum term by term and factor out constants:
$\displaystyle = 4 \int \frac{1}{(x^2+4)} dx-4 \int \frac{x}{(x^2+4)} dx+ \int x dx
$
For the integrand $\displaystyle \frac{x}{(x^2+4)}$}, substitute $\displaystyle u = x^2+4$ and $\displaystyle du = 2 x dx$:
$\displaystyle = -2 \int \frac{1}{u} du+4 \int \frac{1}{(x^2+4)} dx+ \int x dx
$
The integral of $\displaystyle \frac{1}{(x^2+4)}$ is $\displaystyle \frac{1}{2} arctan(\frac{x}{2})$:
$\displaystyle = -2 \int \frac{1}{u} du+2 arctan(\frac{x}{2})+ \int x dx
$
The integral of $\displaystyle \frac{1}{u}$ is $\displaystyle ln(u)$:
$\displaystyle = -2 ln(u)+2 arctan(\frac{x}{2})+ \int x dx
$
The integral of $\displaystyle x$ is $\displaystyle \frac{x^2}{2}$:
$\displaystyle = -2 ln(u)+\frac{x^2}{2}+2arctan(\frac{x}{2})+C
$
Substitute back for $\displaystyle u = x^2+4$:
$\displaystyle =\frac {x^2}{2}-2 ln(x^2+4)+2 arctan(\frac{x}{2})+C$