Integrand size = 21, antiderivative size = 127 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {4 \sec ^5(c+d x)}{5 a^4 d}+\frac {12 \sec ^7(c+d x)}{7 a^4 d}-\frac {8 \sec ^9(c+d x)}{9 a^4 d}+\frac {\tan ^3(c+d x)}{3 a^4 d}+\frac {9 \tan ^5(c+d x)}{5 a^4 d}+\frac {16 \tan ^7(c+d x)}{7 a^4 d}+\frac {8 \tan ^9(c+d x)}{9 a^4 d} \] Output:
-4/5*sec(d*x+c)^5/a^4/d+12/7*sec(d*x+c)^7/a^4/d-8/9*sec(d*x+c)^9/a^4/d+1/3 *tan(d*x+c)^3/a^4/d+9/5*tan(d*x+c)^5/a^4/d+16/7*tan(d*x+c)^7/a^4/d+8/9*tan (d*x+c)^9/a^4/d
Time = 1.42 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.98 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\sec (c+d x) (16128+1554 \cos (c+d x)-16896 \cos (2 (c+d x))-999 \cos (3 (c+d x))+2816 \cos (4 (c+d x))+37 \cos (5 (c+d x))+34944 \sin (c+d x)+1776 \sin (2 (c+d x))-9504 \sin (3 (c+d x))-296 \sin (4 (c+d x))+352 \sin (5 (c+d x)))}{80640 a^4 d (1+\sin (c+d x))^4} \] Input:
Integrate[Tan[c + d*x]^2/(a + a*Sin[c + d*x])^4,x]
Output:
(Sec[c + d*x]*(16128 + 1554*Cos[c + d*x] - 16896*Cos[2*(c + d*x)] - 999*Co s[3*(c + d*x)] + 2816*Cos[4*(c + d*x)] + 37*Cos[5*(c + d*x)] + 34944*Sin[c + d*x] + 1776*Sin[2*(c + d*x)] - 9504*Sin[3*(c + d*x)] - 296*Sin[4*(c + d *x)] + 352*Sin[5*(c + d*x)]))/(80640*a^4*d*(1 + Sin[c + d*x])^4)
Time = 0.52 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3190, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^2(c+d x)}{(a \sin (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^2}{(a \sin (c+d x)+a)^4}dx\) |
\(\Big \downarrow \) 3190 |
\(\displaystyle \frac {\int \left (a^4 \tan ^2(c+d x) \sec ^8(c+d x)-4 a^4 \tan ^3(c+d x) \sec ^7(c+d x)+6 a^4 \tan ^4(c+d x) \sec ^6(c+d x)-4 a^4 \tan ^5(c+d x) \sec ^5(c+d x)+a^4 \tan ^6(c+d x) \sec ^4(c+d x)\right )dx}{a^8}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {8 a^4 \tan ^9(c+d x)}{9 d}+\frac {16 a^4 \tan ^7(c+d x)}{7 d}+\frac {9 a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {8 a^4 \sec ^9(c+d x)}{9 d}+\frac {12 a^4 \sec ^7(c+d x)}{7 d}-\frac {4 a^4 \sec ^5(c+d x)}{5 d}}{a^8}\) |
Input:
Int[Tan[c + d*x]^2/(a + a*Sin[c + d*x])^4,x]
Output:
((-4*a^4*Sec[c + d*x]^5)/(5*d) + (12*a^4*Sec[c + d*x]^7)/(7*d) - (8*a^4*Se c[c + d*x]^9)/(9*d) + (a^4*Tan[c + d*x]^3)/(3*d) + (9*a^4*Tan[c + d*x]^5)/ (5*d) + (16*a^4*Tan[c + d*x]^7)/(7*d) + (8*a^4*Tan[c + d*x]^9)/(9*d))/a^8
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x _)])^(p_.), x_Symbol] :> Simp[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] /; F reeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]
Result contains complex when optimal does not.
Time = 5.33 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.86
method | result | size |
risch | \(-\frac {4 i \left (504 i {\mathrm e}^{5 i \left (d x +c \right )}+315 \,{\mathrm e}^{6 i \left (d x +c \right )}-528 i {\mathrm e}^{3 i \left (d x +c \right )}-777 \,{\mathrm e}^{4 i \left (d x +c \right )}+88 i {\mathrm e}^{i \left (d x +c \right )}+297 \,{\mathrm e}^{2 i \left (d x +c \right )}-11\right )}{315 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{9} d \,a^{4}}\) | \(109\) |
derivativedivides | \(\frac {-\frac {16}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {116}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {62}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {83}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {17}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {29}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {8}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+128}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{a^{4} d}\) | \(158\) |
default | \(\frac {-\frac {16}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {116}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {62}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {83}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {17}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {29}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {8}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+128}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{a^{4} d}\) | \(158\) |
Input:
int(tan(d*x+c)^2/(a+a*sin(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
-4/315*I*(504*I*exp(5*I*(d*x+c))+315*exp(6*I*(d*x+c))-528*I*exp(3*I*(d*x+c ))-777*exp(4*I*(d*x+c))+88*I*exp(I*(d*x+c))+297*exp(2*I*(d*x+c))-11)/(exp( I*(d*x+c))-I)/(exp(I*(d*x+c))+I)^9/d/a^4
Time = 0.08 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.02 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {88 \, \cos \left (d x + c\right )^{4} - 220 \, \cos \left (d x + c\right )^{2} + {\left (22 \, \cos \left (d x + c\right )^{4} - 165 \, \cos \left (d x + c\right )^{2} + 175\right )} \sin \left (d x + c\right ) + 140}{315 \, {\left (a^{4} d \cos \left (d x + c\right )^{5} - 8 \, a^{4} d \cos \left (d x + c\right )^{3} + 8 \, a^{4} d \cos \left (d x + c\right ) - 4 \, {\left (a^{4} d \cos \left (d x + c\right )^{3} - 2 \, a^{4} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \] Input:
integrate(tan(d*x+c)^2/(a+a*sin(d*x+c))^4,x, algorithm="fricas")
Output:
1/315*(88*cos(d*x + c)^4 - 220*cos(d*x + c)^2 + (22*cos(d*x + c)^4 - 165*c os(d*x + c)^2 + 175)*sin(d*x + c) + 140)/(a^4*d*cos(d*x + c)^5 - 8*a^4*d*c os(d*x + c)^3 + 8*a^4*d*cos(d*x + c) - 4*(a^4*d*cos(d*x + c)^3 - 2*a^4*d*c os(d*x + c))*sin(d*x + c))
\[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\int \frac {\tan ^{2}{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} + 4 \sin ^{3}{\left (c + d x \right )} + 6 \sin ^{2}{\left (c + d x \right )} + 4 \sin {\left (c + d x \right )} + 1}\, dx}{a^{4}} \] Input:
integrate(tan(d*x+c)**2/(a+a*sin(d*x+c))**4,x)
Output:
Integral(tan(c + d*x)**2/(sin(c + d*x)**4 + 4*sin(c + d*x)**3 + 6*sin(c + d*x)**2 + 4*sin(c + d*x) + 1), x)/a**4
Leaf count of result is larger than twice the leaf count of optimal. 356 vs. \(2 (113) = 226\).
Time = 0.05 (sec) , antiderivative size = 356, normalized size of antiderivative = 2.80 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {8 \, {\left (\frac {16 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {54 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {201 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {294 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {378 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {210 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {105 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + 2\right )}}{315 \, {\left (a^{4} + \frac {8 \, a^{4} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {27 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {48 \, a^{4} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {42 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {42 \, a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {48 \, a^{4} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {27 \, a^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {8 \, a^{4} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {a^{4} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}\right )} d} \] Input:
integrate(tan(d*x+c)^2/(a+a*sin(d*x+c))^4,x, algorithm="maxima")
Output:
8/315*(16*sin(d*x + c)/(cos(d*x + c) + 1) + 54*sin(d*x + c)^2/(cos(d*x + c ) + 1)^2 + 201*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 294*sin(d*x + c)^4/(c os(d*x + c) + 1)^4 + 378*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 210*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 105*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 2 )/((a^4 + 8*a^4*sin(d*x + c)/(cos(d*x + c) + 1) + 27*a^4*sin(d*x + c)^2/(c os(d*x + c) + 1)^2 + 48*a^4*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 42*a^4*s in(d*x + c)^4/(cos(d*x + c) + 1)^4 - 42*a^4*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 48*a^4*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 27*a^4*sin(d*x + c)^8 /(cos(d*x + c) + 1)^8 - 8*a^4*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - a^4*si n(d*x + c)^10/(cos(d*x + c) + 1)^10)*d)
Time = 0.29 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.15 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {\frac {315}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} - \frac {315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 3150 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 1050 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 630 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 8064 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 6006 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5274 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 846 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 59}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{9}}}{5040 \, d} \] Input:
integrate(tan(d*x+c)^2/(a+a*sin(d*x+c))^4,x, algorithm="giac")
Output:
-1/5040*(315/(a^4*(tan(1/2*d*x + 1/2*c) - 1)) - (315*tan(1/2*d*x + 1/2*c)^ 8 + 3150*tan(1/2*d*x + 1/2*c)^7 + 1050*tan(1/2*d*x + 1/2*c)^6 + 630*tan(1/ 2*d*x + 1/2*c)^5 - 8064*tan(1/2*d*x + 1/2*c)^4 - 6006*tan(1/2*d*x + 1/2*c) ^3 - 5274*tan(1/2*d*x + 1/2*c)^2 - 846*tan(1/2*d*x + 1/2*c) - 59)/(a^4*(ta n(1/2*d*x + 1/2*c) + 1)^9))/d
Time = 18.35 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.82 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{315}+\frac {128\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{315}+\frac {48\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}+\frac {536\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{105}+\frac {112\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{15}+\frac {48\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{5}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{3}+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3}}{a^4\,d\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^9} \] Input:
int(tan(c + d*x)^2/(a + a*sin(c + d*x))^4,x)
Output:
((16*cos(c/2 + (d*x)/2)^10)/315 + (128*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d*x )/2))/315 + (8*cos(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2)^7)/3 + (16*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^6)/3 + (48*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^5)/5 + (112*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^4)/15 + (536* cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^3)/105 + (48*cos(c/2 + (d*x)/2)^8* sin(c/2 + (d*x)/2)^2)/35)/(a^4*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2)) *(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^9)
Time = 0.23 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.39 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+32 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+48 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+32 \cos \left (d x +c \right ) \sin \left (d x +c \right )+8 \cos \left (d x +c \right )+22 \sin \left (d x +c \right )^{5}+88 \sin \left (d x +c \right )^{4}+121 \sin \left (d x +c \right )^{3}+44 \sin \left (d x +c \right )^{2}+32 \sin \left (d x +c \right )+8}{315 \cos \left (d x +c \right ) a^{4} d \left (\sin \left (d x +c \right )^{4}+4 \sin \left (d x +c \right )^{3}+6 \sin \left (d x +c \right )^{2}+4 \sin \left (d x +c \right )+1\right )} \] Input:
int(tan(d*x+c)^2/(a+a*sin(d*x+c))^4,x)
Output:
(8*cos(c + d*x)*sin(c + d*x)**4 + 32*cos(c + d*x)*sin(c + d*x)**3 + 48*cos (c + d*x)*sin(c + d*x)**2 + 32*cos(c + d*x)*sin(c + d*x) + 8*cos(c + d*x) + 22*sin(c + d*x)**5 + 88*sin(c + d*x)**4 + 121*sin(c + d*x)**3 + 44*sin(c + d*x)**2 + 32*sin(c + d*x) + 8)/(315*cos(c + d*x)*a**4*d*(sin(c + d*x)** 4 + 4*sin(c + d*x)**3 + 6*sin(c + d*x)**2 + 4*sin(c + d*x) + 1))