3.1.5 \(\int \frac {1}{(\cos (x)+\sin (x))^6} \, dx\) [5]

Optimal. Leaf size=50 \[ -\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))} \]

[Out]

1/10*(-cos(x)+sin(x))/(cos(x)+sin(x))^5+1/15*(-cos(x)+sin(x))/(cos(x)+sin(x))^3+2/15*sin(x)/(cos(x)+sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, 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 = {3155, 3154} \begin {gather*} -\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))} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3154

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]

Rule 3155

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]

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.02, size = 26, normalized size = 0.52 \begin {gather*} -\frac {5 \cos (3 x)-10 \sin (x)+\sin (5 x)}{30 (\cos (x)+\sin (x))^5} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(110\) vs. \(2(50)=100\).
time = 15.13, size = 86, normalized size = 1.72 \begin {gather*} \frac {2 \left (-15-100 \text {Tan}\left [\frac {x}{2}\right ]^2-100 \text {Tan}\left [\frac {x}{2}\right ]^6-60 \text {Tan}\left [\frac {x}{2}\right ]-20 \text {Tan}\left [\frac {x}{2}\right ]^5-15 \text {Tan}\left [\frac {x}{2}\right ]^8+20 \text {Tan}\left [\frac {x}{2}\right ]^3+60 \text {Tan}\left [\frac {x}{2}\right ]^7+118 \text {Tan}\left [\frac {x}{2}\right ]^4\right ) \text {Tan}\left [\frac {x}{2}\right ]}{15 {\left (-1+\text {Tan}\left [\frac {x}{2}\right ]^2-2 \text {Tan}\left [\frac {x}{2}\right ]\right )}^5} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/(Cos[x] + Sin[x])^6,x]')

[Out]

2 (-15 - 100 Tan[x / 2] ^ 2 - 100 Tan[x / 2] ^ 6 - 60 Tan[x / 2] - 20 Tan[x / 2] ^ 5 - 15 Tan[x / 2] ^ 8 + 20
Tan[x / 2] ^ 3 + 60 Tan[x / 2] ^ 7 + 118 Tan[x / 2] ^ 4) Tan[x / 2] / (15 (-1 + Tan[x / 2] ^ 2 - 2 Tan[x / 2])
 ^ 5)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 42, normalized size = 0.84

method result size
risch \(\frac {-\frac {2}{15}+\frac {4 \,{\mathrm e}^{4 i x}}{3}+\frac {2 i {\mathrm e}^{2 i x}}{3}}{\left ({\mathrm e}^{2 i x}+i\right )^{5}}\) \(30\)
default \(\frac {2}{\left (\tan \left (x \right )+1\right )^{2}}-\frac {8}{3 \left (\tan \left (x \right )+1\right )^{3}}-\frac {1}{\tan \left (x \right )+1}+\frac {2}{\left (\tan \left (x \right )+1\right )^{4}}-\frac {4}{5 \left (\tan \left (x \right )+1\right )^{5}}\) \(42\)
norman \(\frac {-8 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 \tan \left (\frac {x}{2}\right )-2 \left (\tan ^{9}\left (\frac {x}{2}\right )\right )+8 \left (\tan ^{8}\left (\frac {x}{2}\right )\right )-\frac {40 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3}-\frac {40 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{3}-\frac {8 \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{3}+\frac {8 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{3}+\frac {236 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{15}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-2 \tan \left (\frac {x}{2}\right )-1\right )^{5}}\) \(89\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 56, normalized size = 1.12 \begin {gather*} -\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 {gather*}

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 = 0.34, size = 67, normalized size = 1.34 \begin {gather*} -\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 {gather*}

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] Leaf count of result is larger than twice the leaf count of optimal. 838 vs. \(2 (51) = 102\)
time = 3.53, size = 838, normalized size = 16.76

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-30*tan(x/2)**9/(15*tan(x/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 102
0*tan(x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) + 120*tan(x/2)**8/(15
*tan(x/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450
*tan(x/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) - 200*tan(x/2)**7/(15*tan(x/2)**10 - 150
*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x/2)**4 - 600*
tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) - 40*tan(x/2)**6/(15*tan(x/2)**10 - 150*tan(x/2)**9 + 525*t
an(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**3 - 525*ta
n(x/2)**2 - 150*tan(x/2) - 15) + 236*tan(x/2)**5/(15*tan(x/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*ta
n(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan
(x/2) - 15) + 40*tan(x/2)**4/(15*tan(x/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(
x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) - 200*ta
n(x/2)**3/(15*tan(x/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(
x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) - 120*tan(x/2)**2/(15*tan(x
/2)**10 - 150*tan(x/2)**9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x
/2)**4 - 600*tan(x/2)**3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15) - 30*tan(x/2)/(15*tan(x/2)**10 - 150*tan(x/2)*
*9 + 525*tan(x/2)**8 - 600*tan(x/2)**7 - 450*tan(x/2)**6 + 1020*tan(x/2)**5 + 450*tan(x/2)**4 - 600*tan(x/2)**
3 - 525*tan(x/2)**2 - 150*tan(x/2) - 15)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.27, size = 88, normalized size = 1.76 \begin {gather*} \frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (15\,{\mathrm {tan}\left (\frac {x}{2}\right )}^8-60\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7+100\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5-118\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4-20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+100\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+60\,\mathrm {tan}\left (\frac {x}{2}\right )+15\right )}{15\,{\left (-{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*tan(x/2)*(60*tan(x/2) + 100*tan(x/2)^2 - 20*tan(x/2)^3 - 118*tan(x/2)^4 + 20*tan(x/2)^5 + 100*tan(x/2)^6 -
60*tan(x/2)^7 + 15*tan(x/2)^8 + 15))/(15*(2*tan(x/2) - tan(x/2)^2 + 1)^5)

________________________________________________________________________________________