Answer
$\theta + {\sin ^2}\theta + C$
Work Step by Step
$$\eqalign{
& \int {{{\left( {\sin \theta + \cos \theta } \right)}^2}} d\theta \cr
& {\text{Expand}}{\text{, recall that }}{\left( {a + b} \right)^2} = {a^2} + 2ab + {b^2} \cr
& = \int {\left( {{{\sin }^2}\theta + 2\sin \theta \cos \theta + {{\cos }^2}\theta } \right)} d\theta \cr
& = \int {\left( {1 + 2\sin \theta \cos \theta } \right)} d\theta \cr
& {\text{Distribute the integrand}} \cr
& = \int {d\theta } + \int {2\sin \theta \cos \theta } d\theta \cr
& = \int {d\theta } + 2\int {\sin \theta \cos \theta } d\theta \cr
& {\text{Integrate}} \cr
& {\text{ = }}\theta + 2\left( {\frac{{{{\sin }^2}\theta }}{2}} \right) + C \cr
& {\text{ = }}\theta + {\sin ^2}\theta + C \cr} $$