<s>[INST] Calculus 2: Integration by Parts Stuck on Integral of Product With ArcTan Inside I'm stuck on the following problem: 
$$\int_0^{1/3} y \tan^{-1}(3y)\,dy$$
I think my last line in my work below is correct but I don't know what to do beyond that.  
A step through of the problem would be appreciated.  

 [/INST] Integrate by parts $\left(f = \tan^{-1}3y, g' = y \Rightarrow f' = \frac{3}{9y^2 + 1}, g = \frac{y^2}{2}\right)$:
$$\int y \tan^{-1}(3y) dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \int \frac{3y^2}{2(9y^2 + 1)} dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{3}{2} \int \frac{y^2}{9y^2 + 1} dy$$
Write $y^2$ as $\frac{1}{9}(9y^2+1) - \frac{1}{9}$ then we get:
$$\frac{y^2 \tan^{-1}(3y)}{2} - \frac{3}{2} \int \frac{\frac{1}{9}(9y^2+1) - \frac{1}{9}}{9y^2 + 1} dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{3}{2} \int \frac{\frac{1}{9}(9y^2+1)}{9y^2 + 1} - \frac{\frac{1}{9}}{9y^2 + 1}dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{3}{2} \int \frac{1}{9} - \frac{1}{9} \frac{1}{9y^2 + 1}dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{1}{6} \int 1 - \frac{1}{9y^2 + 1}dy$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{1}{6} \left(\int 1\,dy - \int \frac{1}{9y^2 + 1}dy\right)$$
Using substitution $u=3y$, we get:
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{1}{6} \left(\int 1\,dy - \frac{1}{3} \int \frac{1}{u^2 + 1}du\right)$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{1}{6} \left(y - \frac{1}{3} \tan^{-1}u + C\right)$$
$$= \frac{y^2 \tan^{-1}(3y)}{2} - \frac{1}{6} y + \frac{1}{18} \tan^{-1}3y + C$$
$$= \frac{(9y^2 + 1) \tan^{-1}(3y) - 3y}{18} + C$$
Now you can evaluate the integral: 
$$\int_{0}^{\frac{1}{3}} y \tan^{-1}(3y) \, dy = \frac{\pi - 2}{36}$$
</s>