int(2 sec^2 (v) dv / [ (tan^2 (v) + 1)^2 ], v) = 2 int( dv/sec^2 (v), v)
= 2 int( cos^2 (v), v)
= int( 1 + cos(2v), v)
= v + 1/2 * sin(2v) + C
= arctan(x) + x / [1 + x^2] + C
Putting these two together, we have
int( [ x^3 + x + 2] / [ x^4 + 2 x^2 + 1] dx, x) = 1/2 ln(x^2+1) + arctan(x) + x / [1 + x^2] + C
There were several smaller steps I've excluded in the above calculation, if you need help or clarifications please post a comment and I'll address them. I hope this helps.