The integral is
#intsin^5x(1+cos^2x)dx=intsin^5xdx+intsin^5xcos^2xdx#
Perform this integral by substitution
First calculate #intsin^5xdx#
#intsin^5xdx=intsin^4xsinxdx#
#=int(sin^2x)^2sinxdx#
#=int(1-cos^2x)^2sinxdx#
Let #u=cosx#, #=>#, #du=-sinxdx#
Therefore,
#intsin^5xdx=-int(1-u^2)^2du=-int(1-2u^2+u^4)du#
#=-u+2/3u^3-1/5u^5#
#=-cosx+2/3cos^3x-1/5cos^5x#
Second calculate #intsin^5xcos^2xdx#
#intsin^5xcos^2xdx=intsin^4xsinxcos^2xdx#
#=int(1-cos^2x)^2cos^2xsinxdx#
Let #v=cosx#, #=>#, #dv=-sinxdx#
Therefore,
#intsin^5xcos^2xdx=-int(1-u^2)^2u^2du#
#=-int(1-2u^2+u^4)u^2du#
#=-int(u^2-2u^4+u^6)du#
#=-(1/3u^3-2/5u^5+1/7u^7)#
#=-1/3cos^3x+2/5cos^5x-1/7cos^7x#
Putting the #2# parts together
#intsin^5x(1+cos^2x)dx=-cosx+2/3cos^3x-1/5cos^5x-1/3cos^3x+2/5cos^5x-1/7cos^7x#
#=-cosx+1/3cos^3x+1/5cos^5x-1/7cos^7x+C#