Homework Help

I'm confused about when we make the integral of 1/(1+y^2) be tan^-1 y and when we make the integral as ln(y^2+1)?