Let, #I=int(cos^3x+cos^5x)/(sin^2x+sin^4x)dx#,
#=int{cos^3x(1+cos^2x)}/{sin^2x(1+sin^2x)}dx#,
#=int{cos^2x(1+cos^2x)}/{sin^2x(1+sin^2x)}cosxdx#,
#=int{(1-sin^2x)(1+ul(1-sin^2x))}/{sin^2x(1+sin^2x)}cosxdx#.
This shows that the substn. #sinx=t," so that, "cosxdx=dt,#
should work.
Hence, #I=int{(1-t^2)(2-t^2)}/{t^2(1+t^2)}dt=int(t^4-3t^2+2)/(t^4+t^2)dt#,
#=int{(t^4+t^2)-4t^2+2}/(t^4+t^2)dt#,
#=int{(t^4+t^2)/(t^4+t^2)-{2(2t^2-1)}/(t^4+t^2)}dt#,
#=int1dt-2int(2t^2-1)/{t^2(t^2+1)}dt#,
#=t-2int{(2t^2)/{t^2(t^2+1)}-1/{t^2(t^2+1)}}dt#,
#=t-2int{2/(t^2+1)-{(t^2+1)-t^2}/{t^2(t^2+1)}}dt#,
#=t-4int{1/(t^2+1)dt+2int{(t^2+1)/{t^2(t^2+1)}-t^2/{t^2(t^2+1)}}dt#,
#=2-4arctant+2int{1/t^2-1/(t^2+1)}dt#,
#=t-4arctant+2{-1/t-arctant}#,
#=t-2/t-6arctant#.
Since, #t=sinx#, we have,
#I=sinx-2cscx-6arctan sinx+C#, as desired!
Enjoy Maths.!