Answer
$$ - \cot \theta + \frac{2}{3}{\theta ^3} - \frac{3}{2}{\theta ^2} + C$$
Work Step by Step
$$\eqalign{
& \int {\left( {{{\csc }^2}\theta + 1} \right)d\theta } \cr
& {\text{split the integrand}} \cr
& = \int {{{\csc }^2}\theta d\theta } + \int {2{\theta ^2}d\theta } - \int {3\theta d\theta } \cr
& {\text{integrate}} \cr
& = - \cot \theta + \frac{2}{3}{\theta ^3} - \frac{3}{2}{\theta ^2} + C \cr
& {\text{check by differentiation}} \cr
& {\text{ = }}\frac{d}{{d\theta }}\left( { - \cot \theta + \frac{2}{3}{\theta ^3} - \frac{3}{2}{\theta ^2} + C} \right) \cr
& {\text{ = }}\frac{d}{{d\theta }}\left( { - \cot \theta } \right) + \frac{d}{{d\theta }}\left( {\frac{2}{3}{\theta ^3}} \right) + \frac{d}{{d\theta }}\left( { - \frac{3}{2}{\theta ^2}} \right) + \frac{d}{{d\theta }}\left( C \right) \cr
& {\text{ = }} - \left( { - {{\csc }^2}\theta } \right) + \frac{2}{3}\left( {3{\theta ^2}} \right) - \frac{3}{2}\left( {2\theta } \right) + 0 \cr
& {\text{simplify}} \cr
& {\text{ = }}{\csc ^2}\theta + 2{\theta ^2} - 3\theta \cr} $$