3.5 \(\int \frac{1}{(\cos (x)+\sin (x))^6} \, dx\)

Optimal. Leaf size=50 \[ -\frac{\cos (x)-\sin (x)}{15 (\sin (x)+\cos (x))^3}-\frac{\cos (x)-\sin (x)}{10 (\sin (x)+\cos (x))^5}+\frac{2 \sin (x)}{15 (\sin (x)+\cos (x))} \]

[Out]

-(Cos[x] - Sin[x])/(10*(Cos[x] + Sin[x])^5) - (Cos[x] - Sin[x])/(15*(Cos[x] + Sin[x])^3) + (2*Sin[x])/(15*(Cos
[x] + Sin[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.026043, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3076, 3075} \[ -\frac{\cos (x)-\sin (x)}{15 (\sin (x)+\cos (x))^3}-\frac{\cos (x)-\sin (x)}{10 (\sin (x)+\cos (x))^5}+\frac{2 \sin (x)}{15 (\sin (x)+\cos (x))} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[x] + Sin[x])^(-6),x]

[Out]

-(Cos[x] - Sin[x])/(10*(Cos[x] + Sin[x])^5) - (Cos[x] - Sin[x])/(15*(Cos[x] + Sin[x])^3) + (2*Sin[x])/(15*(Cos
[x] + Sin[x]))

Rule 3076

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[((b*Cos[c + d*x] -
 a*Sin[c + d*x])*(a*Cos[c + d*x] + b*Sin[c + d*x])^(n + 1))/(d*(n + 1)*(a^2 + b^2)), x] + Dist[(n + 2)/((n + 1
)*(a^2 + b^2)), Int[(a*Cos[c + d*x] + b*Sin[c + d*x])^(n + 2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b
^2, 0] && LtQ[n, -1] && NeQ[n, -2]

Rule 3075

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-2), x_Symbol] :> Simp[Sin[c + d*x]/(a*d*
(a*Cos[c + d*x] + b*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin{align*} \int \frac{1}{(\cos (x)+\sin (x))^6} \, dx &=-\frac{\cos (x)-\sin (x)}{10 (\cos (x)+\sin (x))^5}+\frac{2}{5} \int \frac{1}{(\cos (x)+\sin (x))^4} \, dx\\ &=-\frac{\cos (x)-\sin (x)}{10 (\cos (x)+\sin (x))^5}-\frac{\cos (x)-\sin (x)}{15 (\cos (x)+\sin (x))^3}+\frac{2}{15} \int \frac{1}{(\cos (x)+\sin (x))^2} \, dx\\ &=-\frac{\cos (x)-\sin (x)}{10 (\cos (x)+\sin (x))^5}-\frac{\cos (x)-\sin (x)}{15 (\cos (x)+\sin (x))^3}+\frac{2 \sin (x)}{15 (\cos (x)+\sin (x))}\\ \end{align*}

Mathematica [A]  time = 0.0327017, size = 26, normalized size = 0.52 \[ -\frac{-10 \sin (x)+\sin (5 x)+5 \cos (3 x)}{30 (\sin (x)+\cos (x))^5} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x] + Sin[x])^(-6),x]

[Out]

-(5*Cos[3*x] - 10*Sin[x] + Sin[5*x])/(30*(Cos[x] + Sin[x])^5)

________________________________________________________________________________________

Maple [A]  time = 0.063, size = 42, normalized size = 0.8 \begin{align*} 2\, \left ( 1+\tan \left ( x \right ) \right ) ^{-4}- \left ( 1+\tan \left ( x \right ) \right ) ^{-1}-{\frac{8}{3\, \left ( 1+\tan \left ( x \right ) \right ) ^{3}}}+2\, \left ( 1+\tan \left ( x \right ) \right ) ^{-2}-{\frac{4}{5\, \left ( 1+\tan \left ( x \right ) \right ) ^{5}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)+sin(x))^6,x)

[Out]

2/(1+tan(x))^4-1/(1+tan(x))-8/3/(1+tan(x))^3+2/(1+tan(x))^2-4/5/(1+tan(x))^5

________________________________________________________________________________________

Maxima [A]  time = 0.979376, size = 76, normalized size = 1.52 \begin{align*} -\frac{15 \, \tan \left (x\right )^{4} + 30 \, \tan \left (x\right )^{3} + 40 \, \tan \left (x\right )^{2} + 20 \, \tan \left (x\right ) + 7}{15 \,{\left (\tan \left (x\right )^{5} + 5 \, \tan \left (x\right )^{4} + 10 \, \tan \left (x\right )^{3} + 10 \, \tan \left (x\right )^{2} + 5 \, \tan \left (x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cos(x)+sin(x))^6,x, algorithm="maxima")

[Out]

-1/15*(15*tan(x)^4 + 30*tan(x)^3 + 40*tan(x)^2 + 20*tan(x) + 7)/(tan(x)^5 + 5*tan(x)^4 + 10*tan(x)^3 + 10*tan(
x)^2 + 5*tan(x) + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.12067, size = 198, normalized size = 3.96 \begin{align*} -\frac{8 \, \cos \left (x\right )^{5} - 20 \, \cos \left (x\right )^{3} -{\left (8 \, \cos \left (x\right )^{4} + 4 \, \cos \left (x\right )^{2} - 7\right )} \sin \left (x\right ) + 5 \, \cos \left (x\right )}{30 \,{\left (4 \, \cos \left (x\right )^{5} +{\left (4 \, \cos \left (x\right )^{4} - 8 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) - 5 \, \cos \left (x\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cos(x)+sin(x))^6,x, algorithm="fricas")

[Out]

-1/30*(8*cos(x)^5 - 20*cos(x)^3 - (8*cos(x)^4 + 4*cos(x)^2 - 7)*sin(x) + 5*cos(x))/(4*cos(x)^5 + (4*cos(x)^4 -
 8*cos(x)^2 - 1)*sin(x) - 5*cos(x))

________________________________________________________________________________________

Sympy [B]  time = 11.3954, size = 925, normalized size = 18.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cos(x)+sin(x))**6,x)

[Out]

-59*tan(x/2)**10/(255*tan(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**
6 + 17340*tan(x/2)**5 + 7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) + 80*ta
n(x/2)**9/(255*tan(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 173
40*tan(x/2)**5 + 7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) - 25*tan(x/2)*
*8/(255*tan(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(
x/2)**5 + 7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) - 1040*tan(x/2)**7/(2
55*tan(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)*
*5 + 7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) + 1090*tan(x/2)**6/(255*ta
n(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 +
7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) - 1090*tan(x/2)**4/(255*tan(x/2
)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 + 7650*
tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) - 1040*tan(x/2)**3/(255*tan(x/2)**10
 - 2550*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 + 7650*tan(x
/2)**4 - 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) + 25*tan(x/2)**2/(255*tan(x/2)**10 - 2550
*tan(x/2)**9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 + 7650*tan(x/2)**4
- 10200*tan(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) + 80*tan(x/2)/(255*tan(x/2)**10 - 2550*tan(x/2)*
*9 + 8925*tan(x/2)**8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 + 7650*tan(x/2)**4 - 10200*ta
n(x/2)**3 - 8925*tan(x/2)**2 - 2550*tan(x/2) - 255) + 59/(255*tan(x/2)**10 - 2550*tan(x/2)**9 + 8925*tan(x/2)*
*8 - 10200*tan(x/2)**7 - 7650*tan(x/2)**6 + 17340*tan(x/2)**5 + 7650*tan(x/2)**4 - 10200*tan(x/2)**3 - 8925*ta
n(x/2)**2 - 2550*tan(x/2) - 255)

________________________________________________________________________________________

Giac [A]  time = 1.10987, size = 43, normalized size = 0.86 \begin{align*} -\frac{15 \, \tan \left (x\right )^{4} + 30 \, \tan \left (x\right )^{3} + 40 \, \tan \left (x\right )^{2} + 20 \, \tan \left (x\right ) + 7}{15 \,{\left (\tan \left (x\right ) + 1\right )}^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cos(x)+sin(x))^6,x, algorithm="giac")

[Out]

-1/15*(15*tan(x)^4 + 30*tan(x)^3 + 40*tan(x)^2 + 20*tan(x) + 7)/(tan(x) + 1)^5