$\int{ {\sin\left({x}\right)}^{2}+2\sin\left({x}\right)\cos\left({x}\right)+{\cos\left({x}\right)}^{2} } \mathrm{d} x$
Use ${\sin\left({t}\right)}^{2}+{\cos\left({t}\right)}^{2}=1$ to simplify the expression$\int{ 1+2\sin\left({x}\right)\cos\left({x}\right) } \mathrm{d} x$
Use $2\sin\left({t}\right)\cos\left({t}\right)=\sin\left({2t}\right)$ to simplify the expression$\int{ 1+\sin\left({2x}\right) } \mathrm{d} x$
Use the property of integral $\int{ f\left( x \right)\pmg\left( x \right) } \mathrm{d} x=\int{ f\left( x \right) } \mathrm{d} x\pm\int{ g\left( x \right) } \mathrm{d} x$$\int{ 1 } \mathrm{d} x+\int{ \sin\left({2x}\right) } \mathrm{d} x$
Use $\int{ 1 } \mathrm{d} x=x$ to evaluate the integral$x+\int{ \sin\left({2x}\right) } \mathrm{d} x$
Evaluate the indefinite integral$x-\frac{ \cos\left({2x}\right) }{ 2 }$
Add the constant of integration $C \in ℝ$$\begin{array} { l }x-\frac{ \cos\left({2x}\right) }{ 2 }+C,& C \in ℝ\end{array}$