\(\int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [779]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 120 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2 x}{a^2}+\frac {\cos (c+d x)}{a^2 d}+\frac {4 \sec (c+d x)}{a^2 d}-\frac {5 \sec ^3(c+d x)}{3 a^2 d}+\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {2 \tan (c+d x)}{a^2 d}+\frac {2 \tan ^3(c+d x)}{3 a^2 d}-\frac {2 \tan ^5(c+d x)}{5 a^2 d} \] Output:

2*x/a^2+cos(d*x+c)/a^2/d+4*sec(d*x+c)/a^2/d-5/3*sec(d*x+c)^3/a^2/d+2/5*sec 
(d*x+c)^5/a^2/d-2*tan(d*x+c)/a^2/d+2/3*tan(d*x+c)^3/a^2/d-2/5*tan(d*x+c)^5 
/a^2/d
 

Mathematica [A] (verified)

Time = 1.89 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.23 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\sec (c+d x) (550+(-995+600 c+600 d x) \cos (c+d x)+376 \cos (2 (c+d x))+199 \cos (3 (c+d x))-120 c \cos (3 (c+d x))-120 d x \cos (3 (c+d x))-30 \cos (4 (c+d x))+400 \sin (c+d x)-796 \sin (2 (c+d x))+480 c \sin (2 (c+d x))+480 d x \sin (2 (c+d x))+304 \sin (3 (c+d x)))}{240 a^2 d (1+\sin (c+d x))^2} \] Input:

Integrate[(Sin[c + d*x]^3*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]
 

Output:

(Sec[c + d*x]*(550 + (-995 + 600*c + 600*d*x)*Cos[c + d*x] + 376*Cos[2*(c 
+ d*x)] + 199*Cos[3*(c + d*x)] - 120*c*Cos[3*(c + d*x)] - 120*d*x*Cos[3*(c 
 + d*x)] - 30*Cos[4*(c + d*x)] + 400*Sin[c + d*x] - 796*Sin[2*(c + d*x)] + 
 480*c*Sin[2*(c + d*x)] + 480*d*x*Sin[2*(c + d*x)] + 304*Sin[3*(c + d*x)]) 
)/(240*a^2*d*(1 + Sin[c + d*x])^2)
 

Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3354, 3042, 3352, 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 {\sin ^3(c+d x) \tan ^2(c+d x)}{(a \sin (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^5}{\cos (c+d x)^2 (a \sin (c+d x)+a)^2}dx\)

\(\Big \downarrow \) 3354

\(\displaystyle \frac {\int \sec (c+d x) (a-a \sin (c+d x))^2 \tan ^5(c+d x)dx}{a^4}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\sin (c+d x)^5 (a-a \sin (c+d x))^2}{\cos (c+d x)^6}dx}{a^4}\)

\(\Big \downarrow \) 3352

\(\displaystyle \frac {\int \left (-2 a^2 \tan ^6(c+d x)+a^2 \sin (c+d x) \tan ^6(c+d x)+a^2 \sec (c+d x) \tan ^5(c+d x)\right )dx}{a^4}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {a^2 \cos (c+d x)}{d}-\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \tan ^3(c+d x)}{3 d}-\frac {2 a^2 \tan (c+d x)}{d}+\frac {2 a^2 \sec ^5(c+d x)}{5 d}-\frac {5 a^2 \sec ^3(c+d x)}{3 d}+\frac {4 a^2 \sec (c+d x)}{d}+2 a^2 x}{a^4}\)

Input:

Int[(Sin[c + d*x]^3*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]
 

Output:

(2*a^2*x + (a^2*Cos[c + d*x])/d + (4*a^2*Sec[c + d*x])/d - (5*a^2*Sec[c + 
d*x]^3)/(3*d) + (2*a^2*Sec[c + d*x]^5)/(5*d) - (2*a^2*Tan[c + d*x])/d + (2 
*a^2*Tan[c + d*x]^3)/(3*d) - (2*a^2*Tan[c + d*x]^5)/(5*d))/a^4
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3352
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig 
[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F 
reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 3354
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(a/g)^(2* 
m)   Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e + f*x] 
)^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && 
ILtQ[m, 0]
 
Maple [A] (verified)

Time = 2.50 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {\frac {4}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {17}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {64}{32+32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d \,a^{2}}\) \(129\)
default \(\frac {\frac {4}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {17}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {64}{32+32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d \,a^{2}}\) \(129\)
risch \(\frac {2 x}{a^{2}}+\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 d \,a^{2}}+\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 d \,a^{2}}+\frac {20 i {\mathrm e}^{4 i \left (d x +c \right )}+8 \,{\mathrm e}^{5 i \left (d x +c \right )}+\frac {32 i {\mathrm e}^{2 i \left (d x +c \right )}}{3}-\frac {40 \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}-\frac {92 i}{15}-\frac {248 \,{\mathrm e}^{i \left (d x +c \right )}}{15}}{\left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{5} d \,a^{2}}\) \(138\)

Input:

int(sin(d*x+c)^3*tan(d*x+c)^2/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

64/d/a^2*(1/80/(tan(1/2*d*x+1/2*c)+1)^5-1/32/(tan(1/2*d*x+1/2*c)+1)^4-1/19 
2/(tan(1/2*d*x+1/2*c)+1)^3+5/128/(tan(1/2*d*x+1/2*c)+1)^2+17/256/(tan(1/2* 
d*x+1/2*c)+1)+1/32/(1+tan(1/2*d*x+1/2*c)^2)+1/16*arctan(tan(1/2*d*x+1/2*c) 
)-1/256/(tan(1/2*d*x+1/2*c)-1))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.02 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {30 \, d x \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )^{4} - 60 \, d x \cos \left (d x + c\right ) - 62 \, \cos \left (d x + c\right )^{2} - 2 \, {\left (30 \, d x \cos \left (d x + c\right ) + 38 \, \cos \left (d x + c\right )^{2} + 3\right )} \sin \left (d x + c\right ) - 9}{15 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} - 2 \, a^{2} d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )\right )}} \] Input:

integrate(sin(d*x+c)^3*tan(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="frica 
s")
 

Output:

1/15*(30*d*x*cos(d*x + c)^3 + 15*cos(d*x + c)^4 - 60*d*x*cos(d*x + c) - 62 
*cos(d*x + c)^2 - 2*(30*d*x*cos(d*x + c) + 38*cos(d*x + c)^2 + 3)*sin(d*x 
+ c) - 9)/(a^2*d*cos(d*x + c)^3 - 2*a^2*d*cos(d*x + c)*sin(d*x + c) - 2*a^ 
2*d*cos(d*x + c))
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \] Input:

integrate(sin(d*x+c)**3*tan(d*x+c)**2/(a+a*sin(d*x+c))**2,x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 335 vs. \(2 (112) = 224\).

Time = 0.12 (sec) , antiderivative size = 335, normalized size of antiderivative = 2.79 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {4 \, {\left (\frac {\frac {97 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {108 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {27 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {40 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {85 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {60 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + 28}{a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {6 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {4 \, a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {6 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} + \frac {15 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )}}{15 \, d} \] Input:

integrate(sin(d*x+c)^3*tan(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="maxim 
a")
 

Output:

4/15*((97*sin(d*x + c)/(cos(d*x + c) + 1) + 108*sin(d*x + c)^2/(cos(d*x + 
c) + 1)^2 + 27*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 40*sin(d*x + c)^4/(co 
s(d*x + c) + 1)^4 - 85*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 60*sin(d*x + 
c)^6/(cos(d*x + c) + 1)^6 - 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 28)/( 
a^2 + 4*a^2*sin(d*x + c)/(cos(d*x + c) + 1) + 6*a^2*sin(d*x + c)^2/(cos(d* 
x + c) + 1)^2 + 4*a^2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 4*a^2*sin(d*x 
+ c)^5/(cos(d*x + c) + 1)^5 - 6*a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 
4*a^2*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - a^2*sin(d*x + c)^8/(cos(d*x + 
c) + 1)^8) + 15*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2)/d
 

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.26 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {120 \, {\left (d x + c\right )}}{a^{2}} - \frac {15 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )} a^{2}} + \frac {255 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1170 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1960 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1310 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 313}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{60 \, d} \] Input:

integrate(sin(d*x+c)^3*tan(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="giac" 
)
 

Output:

1/60*(120*(d*x + c)/a^2 - 15*(tan(1/2*d*x + 1/2*c)^2 - 8*tan(1/2*d*x + 1/2 
*c) + 9)/((tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)^2 + tan(1/2*d*x + 
 1/2*c) - 1)*a^2) + (255*tan(1/2*d*x + 1/2*c)^4 + 1170*tan(1/2*d*x + 1/2*c 
)^3 + 1960*tan(1/2*d*x + 1/2*c)^2 + 1310*tan(1/2*d*x + 1/2*c) + 313)/(a^2* 
(tan(1/2*d*x + 1/2*c) + 1)^5))/d
 

Mupad [B] (verification not implemented)

Time = 34.12 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.30 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2\,x}{a^2}-\frac {-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {68\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}-\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}+\frac {36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{5}+\frac {144\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\frac {388\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{15}+\frac {112}{15}}{a^2\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^5\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \] Input:

int((sin(c + d*x)^3*tan(c + d*x)^2)/(a + a*sin(c + d*x))^2,x)
 

Output:

(2*x)/a^2 - ((388*tan(c/2 + (d*x)/2))/15 + (144*tan(c/2 + (d*x)/2)^2)/5 + 
(36*tan(c/2 + (d*x)/2)^3)/5 - (32*tan(c/2 + (d*x)/2)^4)/3 - (68*tan(c/2 + 
(d*x)/2)^5)/3 - 16*tan(c/2 + (d*x)/2)^6 - 4*tan(c/2 + (d*x)/2)^7 + 112/15) 
/(a^2*d*(tan(c/2 + (d*x)/2) + 1)^5*(tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2 
)^2 + tan(c/2 + (d*x)/2)^3 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.66 \[ \int \frac {\sin ^3(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} c +30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d x +41 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+60 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c +60 \cos \left (d x +c \right ) \sin \left (d x +c \right ) d x +82 \cos \left (d x +c \right ) \sin \left (d x +c \right )+30 \cos \left (d x +c \right ) c +30 \cos \left (d x +c \right ) d x +41 \cos \left (d x +c \right )-15 \sin \left (d x +c \right )^{4}-76 \sin \left (d x +c \right )^{3}-32 \sin \left (d x +c \right )^{2}+82 \sin \left (d x +c \right )+56}{15 \cos \left (d x +c \right ) a^{2} d \left (\sin \left (d x +c \right )^{2}+2 \sin \left (d x +c \right )+1\right )} \] Input:

int(sin(d*x+c)^3*tan(d*x+c)^2/(a+a*sin(d*x+c))^2,x)
 

Output:

(30*cos(c + d*x)*sin(c + d*x)**2*c + 30*cos(c + d*x)*sin(c + d*x)**2*d*x + 
 41*cos(c + d*x)*sin(c + d*x)**2 + 60*cos(c + d*x)*sin(c + d*x)*c + 60*cos 
(c + d*x)*sin(c + d*x)*d*x + 82*cos(c + d*x)*sin(c + d*x) + 30*cos(c + d*x 
)*c + 30*cos(c + d*x)*d*x + 41*cos(c + d*x) - 15*sin(c + d*x)**4 - 76*sin( 
c + d*x)**3 - 32*sin(c + d*x)**2 + 82*sin(c + d*x) + 56)/(15*cos(c + d*x)* 
a**2*d*(sin(c + d*x)**2 + 2*sin(c + d*x) + 1))