3.348 \(\int \frac {1}{(\sin (x)+\tan (x))^4} \, dx\)

Optimal. Leaf size=65 \[ -\frac {8}{11} \cot ^{11}(x)-\frac {16 \cot ^9(x)}{9}-\frac {9 \cot ^7(x)}{7}-\frac {\cot ^5(x)}{5}+\frac {8 \csc ^{11}(x)}{11}-\frac {20 \csc ^9(x)}{9}+\frac {16 \csc ^7(x)}{7}-\frac {4 \csc ^5(x)}{5} \]

[Out]

-1/5*cot(x)^5-9/7*cot(x)^7-16/9*cot(x)^9-8/11*cot(x)^11-4/5*csc(x)^5+16/7*csc(x)^7-20/9*csc(x)^9+8/11*csc(x)^1
1

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {4397, 2711, 2607, 14, 2606, 270} \[ -\frac {8}{11} \cot ^{11}(x)-\frac {16 \cot ^9(x)}{9}-\frac {9 \cot ^7(x)}{7}-\frac {\cot ^5(x)}{5}+\frac {8 \csc ^{11}(x)}{11}-\frac {20 \csc ^9(x)}{9}+\frac {16 \csc ^7(x)}{7}-\frac {4 \csc ^5(x)}{5} \]

Antiderivative was successfully verified.

[In]

Int[(Sin[x] + Tan[x])^(-4),x]

[Out]

-Cot[x]^5/5 - (9*Cot[x]^7)/7 - (16*Cot[x]^9)/9 - (8*Cot[x]^11)/11 - (4*Csc[x]^5)/5 + (16*Csc[x]^7)/7 - (20*Csc
[x]^9)/9 + (8*Csc[x]^11)/11

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2711

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Dist[a^(2*
m), Int[ExpandIntegrand[(g*Tan[e + f*x])^p/Sec[e + f*x]^m, (a*Sec[e + f*x] - b*Tan[e + f*x])^(-m), x], x], x]
/; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \frac {1}{(\sin (x)+\tan (x))^4} \, dx &=\int \frac {\cot ^4(x)}{(1+\cos (x))^4} \, dx\\ &=\int \left (\cot ^8(x) \csc ^4(x)-4 \cot ^7(x) \csc ^5(x)+6 \cot ^6(x) \csc ^6(x)-4 \cot ^5(x) \csc ^7(x)+\cot ^4(x) \csc ^8(x)\right ) \, dx\\ &=-\left (4 \int \cot ^7(x) \csc ^5(x) \, dx\right )-4 \int \cot ^5(x) \csc ^7(x) \, dx+6 \int \cot ^6(x) \csc ^6(x) \, dx+\int \cot ^8(x) \csc ^4(x) \, dx+\int \cot ^4(x) \csc ^8(x) \, dx\\ &=4 \operatorname {Subst}\left (\int x^6 \left (-1+x^2\right )^2 \, dx,x,\csc (x)\right )+4 \operatorname {Subst}\left (\int x^4 \left (-1+x^2\right )^3 \, dx,x,\csc (x)\right )+6 \operatorname {Subst}\left (\int x^6 \left (1+x^2\right )^2 \, dx,x,-\cot (x)\right )+\operatorname {Subst}\left (\int x^8 \left (1+x^2\right ) \, dx,x,-\cot (x)\right )+\operatorname {Subst}\left (\int x^4 \left (1+x^2\right )^3 \, dx,x,-\cot (x)\right )\\ &=4 \operatorname {Subst}\left (\int \left (-x^4+3 x^6-3 x^8+x^{10}\right ) \, dx,x,\csc (x)\right )+4 \operatorname {Subst}\left (\int \left (x^6-2 x^8+x^{10}\right ) \, dx,x,\csc (x)\right )+6 \operatorname {Subst}\left (\int \left (x^6+2 x^8+x^{10}\right ) \, dx,x,-\cot (x)\right )+\operatorname {Subst}\left (\int \left (x^8+x^{10}\right ) \, dx,x,-\cot (x)\right )+\operatorname {Subst}\left (\int \left (x^4+3 x^6+3 x^8+x^{10}\right ) \, dx,x,-\cot (x)\right )\\ &=-\frac {1}{5} \cot ^5(x)-\frac {9 \cot ^7(x)}{7}-\frac {16 \cot ^9(x)}{9}-\frac {8 \cot ^{11}(x)}{11}-\frac {4 \csc ^5(x)}{5}+\frac {16 \csc ^7(x)}{7}-\frac {20 \csc ^9(x)}{9}+\frac {8 \csc ^{11}(x)}{11}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 129, normalized size = 1.98 \[ -\frac {2749 \tan \left (\frac {x}{2}\right )}{110880}+\frac {1}{96} \cot \left (\frac {x}{2}\right )-\frac {1}{384} \cot \left (\frac {x}{2}\right ) \csc ^2\left (\frac {x}{2}\right )+\frac {\tan \left (\frac {x}{2}\right ) \sec ^{10}\left (\frac {x}{2}\right )}{1408}-\frac {7 \tan \left (\frac {x}{2}\right ) \sec ^8\left (\frac {x}{2}\right )}{1584}+\frac {641 \tan \left (\frac {x}{2}\right ) \sec ^6\left (\frac {x}{2}\right )}{88704}+\frac {179 \tan \left (\frac {x}{2}\right ) \sec ^4\left (\frac {x}{2}\right )}{73920}-\frac {2033 \tan \left (\frac {x}{2}\right ) \sec ^2\left (\frac {x}{2}\right )}{443520} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sin[x] + Tan[x])^(-4),x]

[Out]

Cot[x/2]/96 - (Cot[x/2]*Csc[x/2]^2)/384 - (2749*Tan[x/2])/110880 - (2033*Sec[x/2]^2*Tan[x/2])/443520 + (179*Se
c[x/2]^4*Tan[x/2])/73920 + (641*Sec[x/2]^6*Tan[x/2])/88704 - (7*Sec[x/2]^8*Tan[x/2])/1584 + (Sec[x/2]^10*Tan[x
/2])/1408

________________________________________________________________________________________

fricas [A]  time = 1.06, size = 78, normalized size = 1.20 \[ \frac {122 \, \cos \relax (x)^{7} + 488 \, \cos \relax (x)^{6} + 549 \, \cos \relax (x)^{5} - 244 \, \cos \relax (x)^{4} - 64 \, \cos \relax (x)^{3} + 144 \, \cos \relax (x)^{2} + 128 \, \cos \relax (x) + 32}{3465 \, {\left (\cos \relax (x)^{6} + 4 \, \cos \relax (x)^{5} + 5 \, \cos \relax (x)^{4} - 5 \, \cos \relax (x)^{2} - 4 \, \cos \relax (x) - 1\right )} \sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sin(x)+tan(x))^4,x, algorithm="fricas")

[Out]

1/3465*(122*cos(x)^7 + 488*cos(x)^6 + 549*cos(x)^5 - 244*cos(x)^4 - 64*cos(x)^3 + 144*cos(x)^2 + 128*cos(x) +
32)/((cos(x)^6 + 4*cos(x)^5 + 5*cos(x)^4 - 5*cos(x)^2 - 4*cos(x) - 1)*sin(x))

________________________________________________________________________________________

giac [A]  time = 0.15, size = 65, normalized size = 1.00 \[ \frac {1}{1408} \, \tan \left (\frac {1}{2} \, x\right )^{11} - \frac {1}{1152} \, \tan \left (\frac {1}{2} \, x\right )^{9} - \frac {3}{896} \, \tan \left (\frac {1}{2} \, x\right )^{7} + \frac {3}{640} \, \tan \left (\frac {1}{2} \, x\right )^{5} + \frac {1}{128} \, \tan \left (\frac {1}{2} \, x\right )^{3} + \frac {3 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}{384 \, \tan \left (\frac {1}{2} \, x\right )^{3}} - \frac {3}{128} \, \tan \left (\frac {1}{2} \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sin(x)+tan(x))^4,x, algorithm="giac")

[Out]

1/1408*tan(1/2*x)^11 - 1/1152*tan(1/2*x)^9 - 3/896*tan(1/2*x)^7 + 3/640*tan(1/2*x)^5 + 1/128*tan(1/2*x)^3 + 1/
384*(3*tan(1/2*x)^2 - 1)/tan(1/2*x)^3 - 3/128*tan(1/2*x)

________________________________________________________________________________________

maple [A]  time = 0.13, size = 64, normalized size = 0.98 \[ \frac {\left (\tan ^{11}\left (\frac {x}{2}\right )\right )}{1408}-\frac {\left (\tan ^{9}\left (\frac {x}{2}\right )\right )}{1152}-\frac {3 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{896}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{640}+\frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{128}-\frac {3 \tan \left (\frac {x}{2}\right )}{128}+\frac {1}{128 \tan \left (\frac {x}{2}\right )}-\frac {1}{384 \tan \left (\frac {x}{2}\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)+tan(x))^4,x)

[Out]

1/1408*tan(1/2*x)^11-1/1152*tan(1/2*x)^9-3/896*tan(1/2*x)^7+3/640*tan(1/2*x)^5+1/128*tan(1/2*x)^3-3/128*tan(1/
2*x)+1/128/tan(1/2*x)-1/384/tan(1/2*x)^3

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 97, normalized size = 1.49 \[ \frac {{\left (\frac {3 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1\right )} {\left (\cos \relax (x) + 1\right )}^{3}}{384 \, \sin \relax (x)^{3}} - \frac {3 \, \sin \relax (x)}{128 \, {\left (\cos \relax (x) + 1\right )}} + \frac {\sin \relax (x)^{3}}{128 \, {\left (\cos \relax (x) + 1\right )}^{3}} + \frac {3 \, \sin \relax (x)^{5}}{640 \, {\left (\cos \relax (x) + 1\right )}^{5}} - \frac {3 \, \sin \relax (x)^{7}}{896 \, {\left (\cos \relax (x) + 1\right )}^{7}} - \frac {\sin \relax (x)^{9}}{1152 \, {\left (\cos \relax (x) + 1\right )}^{9}} + \frac {\sin \relax (x)^{11}}{1408 \, {\left (\cos \relax (x) + 1\right )}^{11}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sin(x)+tan(x))^4,x, algorithm="maxima")

[Out]

1/384*(3*sin(x)^2/(cos(x) + 1)^2 - 1)*(cos(x) + 1)^3/sin(x)^3 - 3/128*sin(x)/(cos(x) + 1) + 1/128*sin(x)^3/(co
s(x) + 1)^3 + 3/640*sin(x)^5/(cos(x) + 1)^5 - 3/896*sin(x)^7/(cos(x) + 1)^7 - 1/1152*sin(x)^9/(cos(x) + 1)^9 +
 1/1408*sin(x)^11/(cos(x) + 1)^11

________________________________________________________________________________________

mupad [B]  time = 2.45, size = 87, normalized size = 1.34 \[ -\frac {15616\,{\cos \left (\frac {x}{2}\right )}^{14}-23424\,{\cos \left (\frac {x}{2}\right )}^{12}+5856\,{\cos \left (\frac {x}{2}\right )}^{10}+976\,{\cos \left (\frac {x}{2}\right )}^8+7296\,{\cos \left (\frac {x}{2}\right )}^6-7440\,{\cos \left (\frac {x}{2}\right )}^4+2590\,{\cos \left (\frac {x}{2}\right )}^2-315}{443520\,\left ({\cos \left (\frac {x}{2}\right )}^{11}\,\sin \left (\frac {x}{2}\right )-{\cos \left (\frac {x}{2}\right )}^{13}\,\sin \left (\frac {x}{2}\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x) + tan(x))^4,x)

[Out]

-(2590*cos(x/2)^2 - 7440*cos(x/2)^4 + 7296*cos(x/2)^6 + 976*cos(x/2)^8 + 5856*cos(x/2)^10 - 23424*cos(x/2)^12
+ 15616*cos(x/2)^14 - 315)/(443520*(cos(x/2)^11*sin(x/2) - cos(x/2)^13*sin(x/2)))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (\sin {\relax (x )} + \tan {\relax (x )}\right )^{4}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sin(x)+tan(x))**4,x)

[Out]

Integral((sin(x) + tan(x))**(-4), x)

________________________________________________________________________________________