Answer
$$\ln \left| {{\theta ^2} + 2\theta + 1} \right| - {\tan ^{ - 1}}\left( {\theta + 1} \right) - \frac{1}{{{\theta ^2} + 2\theta + 2}} + C$$
Work Step by Step
$$\eqalign{
& \int {\frac{{2{\theta ^3} + 5{\theta ^2} + 8\theta + 4}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}} d\theta \cr
& {\text{Decompose the integrand }}\frac{{2{\theta ^3} + 5{\theta ^2} + 8\theta + 4}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}{\text{ into partial fractions}} \cr
& \frac{{2{\theta ^3} + 5{\theta ^2} + 8\theta + 4}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}} = \frac{{A\theta + B}}{{{\theta ^2} + 2\theta + 2}} + \frac{{C\theta + D}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}} \cr
& {\text{Multiply by }}\left( {x + 2} \right)\left( {x - 2} \right)\left( {{x^2} + 1} \right){\text{ and simplify}} \cr
& 2{\theta ^3} + 5{\theta ^2} + 8\theta + 4 = \left( {A\theta + B} \right)\left( {{\theta ^2} + 2\theta + 2} \right) + C\theta + D \cr
& 2{\theta ^3} + 5{\theta ^2} + 8\theta + 4 = A{\theta ^3} + 2A{\theta ^2} + 2A\theta + B{\theta ^2} + 2B\theta + 2B + C\theta + D \cr
& {\text{Group terms}} \cr
& 2{\theta ^3} + 5{\theta ^2} + 8\theta + 4 = A{\theta ^3} + \left( {2A{\theta ^2} + B{\theta ^2}} \right) + \left( {2A\theta + 2B\theta + C\theta } \right) + 2B + D \cr
& {\text{Equate coefficients}} \cr
& A = 2 \cr
& 2A + B = 5 \cr
& 2A + 2B + C = 8 \cr
& 2B + D = 4\,\, \cr
& {\text{Solve the system of equations}} \cr
& A = 2,\,\,\,\,B = 1,\,\,\,C = 2,\,\,\,D = 2 \cr
& {\text{Replace the coefficients}} \cr
& \frac{{2{\theta ^3} + 5{\theta ^2} + 8\theta + 4}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}} = \frac{{2\theta + 1}}{{{\theta ^2} + 2\theta + 2}} + \frac{{2\theta + 2}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}} \cr
& \int {\frac{{2{\theta ^3} + 5{\theta ^2} + 8\theta + 4}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}} d\theta = \int {\frac{{2\theta + 1}}{{{\theta ^2} + 2\theta + 2}}d\theta } + \int {\frac{{2\theta + 2}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}d\theta } \cr
& = \int {\frac{{2\theta + 2 - 1}}{{{\theta ^2} + 2\theta + 2}}d\theta } + \int {\frac{{2\theta + 2}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}d\theta } \cr
& = \int {\frac{{2\theta + 2}}{{{\theta ^2} + 2\theta + 2}}d\theta } - \int {\frac{1}{{{\theta ^2} + 2\theta + 2}}d\theta } + \int {\frac{{2\theta + 2}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}d\theta } \cr
& = \int {\frac{{2\theta + 2}}{{{\theta ^2} + 2\theta + 2}}d\theta } - \int {\frac{1}{{{{\left( {\theta + 1} \right)}^2} + 1}}d\theta } + \int {\frac{{2\theta + 2}}{{{{\left( {{\theta ^2} + 2\theta + 2} \right)}^2}}}d\theta } \cr
& {\text{Integrate}} \cr
& = \ln \left| {{\theta ^2} + 2\theta + 1} \right| - {\tan ^{ - 1}}\left( {\theta + 1} \right) - \frac{1}{{{\theta ^2} + 2\theta + 2}} + C \cr} $$