\(\int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx\) [854]

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

Optimal result

Integrand size = 27, antiderivative size = 96 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 a \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^5}{8 d \left (a^2-a^2 \sin (c+d x)\right )^2}-\frac {a^5}{2 d \left (a^4-a^4 \sin (c+d x)\right )}+\frac {a^5}{8 d \left (a^4+a^4 \sin (c+d x)\right )} \] Output:

3/8*a*arctanh(sin(d*x+c))/d+1/8*a^5/d/(a^2-a^2*sin(d*x+c))^2-1/2*a^5/d/(a^ 
4-a^4*sin(d*x+c))+1/8*a^5/d/(a^4+a^4*sin(d*x+c))
 

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.97 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 a \text {arctanh}(\sin (c+d x))}{8 d}+\frac {3 a \sec (c+d x) \tan (c+d x)}{8 d}-\frac {3 a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a \tan ^4(c+d x)}{4 d} \] Input:

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

Output:

(3*a*ArcTanh[Sin[c + d*x]])/(8*d) + (3*a*Sec[c + d*x]*Tan[c + d*x])/(8*d) 
- (3*a*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (a*Sec[c + d*x]*Tan[c + d*x]^3 
)/d + (a*Tan[c + d*x]^4)/(4*d)
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.76, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3315, 27, 99, 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 \tan ^3(c+d x) \sec ^2(c+d x) (a \sin (c+d x)+a) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3315

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

\(\Big \downarrow \) 27

\(\displaystyle \frac {a^2 \int \frac {a^3 \sin ^3(c+d x)}{(a-a \sin (c+d x))^3 (\sin (c+d x) a+a)^2}d(a \sin (c+d x))}{d}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {a^2 \int \left (\frac {a}{4 (a-a \sin (c+d x))^3}+\frac {3}{8 \left (a^2-a^2 \sin ^2(c+d x)\right )}-\frac {1}{2 (a-a \sin (c+d x))^2}-\frac {1}{8 (\sin (c+d x) a+a)^2}\right )d(a \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 \left (\frac {3 \text {arctanh}(\sin (c+d x))}{8 a}+\frac {a}{8 (a-a \sin (c+d x))^2}-\frac {1}{2 (a-a \sin (c+d x))}+\frac {1}{8 (a \sin (c+d x)+a)}\right )}{d}\)

Input:

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

Output:

(a^2*((3*ArcTanh[Sin[c + d*x]])/(8*a) + a/(8*(a - a*Sin[c + d*x])^2) - 1/( 
2*(a - a*Sin[c + d*x])) + 1/(8*(a + a*Sin[c + d*x]))))/d
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

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 3315
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, 
 x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege 
rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.02

method result size
derivativedivides \(\frac {a \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a \sin \left (d x +c \right )^{4}}{4 \cos \left (d x +c \right )^{4}}}{d}\) \(98\)
default \(\frac {a \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a \sin \left (d x +c \right )^{4}}{4 \cos \left (d x +c \right )^{4}}}{d}\) \(98\)
risch \(\frac {i \left (-2 i a \,{\mathrm e}^{4 i \left (d x +c \right )}-2 a \,{\mathrm e}^{3 i \left (d x +c \right )}+2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+5 a \,{\mathrm e}^{5 i \left (d x +c \right )}+5 a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) \(137\)

Input:

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

Output:

1/d*(a*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*si 
n(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))+1/4*a*sin(d*x+c)^ 
4/cos(d*x+c)^4)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.42 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {10 \, a \cos \left (d x + c\right )^{2} + 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, a \sin \left (d x + c\right ) - 6 \, a}{16 \, {\left (d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - d \cos \left (d x + c\right )^{2}\right )}} \] Input:

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

Output:

1/16*(10*a*cos(d*x + c)^2 + 3*(a*cos(d*x + c)^2*sin(d*x + c) - a*cos(d*x + 
 c)^2)*log(sin(d*x + c) + 1) - 3*(a*cos(d*x + c)^2*sin(d*x + c) - a*cos(d* 
x + c)^2)*log(-sin(d*x + c) + 1) + 2*a*sin(d*x + c) - 6*a)/(d*cos(d*x + c) 
^2*sin(d*x + c) - d*cos(d*x + c)^2)
                                                                                    
                                                                                    
 

Sympy [F]

\[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=a \left (\int \tan ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \tan ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:

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

Output:

a*(Integral(tan(c + d*x)**3*sec(c + d*x)**2, x) + Integral(sin(c + d*x)*ta 
n(c + d*x)**3*sec(c + d*x)**2, x))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.90 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 \, a \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, a \sin \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3} - \sin \left (d x + c\right )^{2} - \sin \left (d x + c\right ) + 1}}{16 \, d} \] Input:

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

Output:

1/16*(3*a*log(sin(d*x + c) + 1) - 3*a*log(sin(d*x + c) - 1) + 2*(5*a*sin(d 
*x + c)^2 - a*sin(d*x + c) - 2*a)/(sin(d*x + c)^3 - sin(d*x + c)^2 - sin(d 
*x + c) + 1))/d
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.82 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {1}{16} \, a {\left (\frac {3 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{d} - \frac {3 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{d} + \frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{2} - \sin \left (d x + c\right ) - 2\right )}}{d {\left (\sin \left (d x + c\right ) + 1\right )} {\left (\sin \left (d x + c\right ) - 1\right )}^{2}}\right )} \] Input:

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

Output:

1/16*a*(3*log(abs(sin(d*x + c) + 1))/d - 3*log(abs(sin(d*x + c) - 1))/d + 
2*(5*sin(d*x + c)^2 - sin(d*x + c) - 2)/(d*(sin(d*x + c) + 1)*(sin(d*x + c 
) - 1)^2))
 

Mupad [B] (verification not implemented)

Time = 35.23 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.74 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {-\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \] Input:

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

Output:

(3*a*atanh(tan(c/2 + (d*x)/2)))/(4*d) - ((3*a*tan(c/2 + (d*x)/2)^2)/2 - (3 
*a*tan(c/2 + (d*x)/2))/4 + (a*tan(c/2 + (d*x)/2)^3)/2 + (3*a*tan(c/2 + (d* 
x)/2)^4)/2 - (3*a*tan(c/2 + (d*x)/2)^5)/4)/(d*(2*tan(c/2 + (d*x)/2) + tan( 
c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4 + 2*tan(c 
/2 + (d*x)/2)^5 - tan(c/2 + (d*x)/2)^6 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 307, normalized size of antiderivative = 3.20 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {a \left (-2 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )^{2} \tan \left (d x +c \right )+2 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )-9 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}+9 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+9 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}-9 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+6 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )^{3} \tan \left (d x +c \right )^{2}+2 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )^{3}+6 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}-6 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )^{2}-6 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right ) \tan \left (d x +c \right )^{2}-2 \sec \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}+6 \sec \left (d x +c \right )^{2}+9 \sin \left (d x +c \right )\right )}{24 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

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

Output:

(a*( - 2*cos(c + d*x)*sec(c + d*x)**2*sin(c + d*x)**2*tan(c + d*x) + 2*cos 
(c + d*x)*sec(c + d*x)**2*tan(c + d*x) - 9*log(tan((c + d*x)/2) - 1)*sin(c 
 + d*x)**2 + 9*log(tan((c + d*x)/2) - 1) + 9*log(tan((c + d*x)/2) + 1)*sin 
(c + d*x)**2 - 9*log(tan((c + d*x)/2) + 1) + 6*sec(c + d*x)**2*sin(c + d*x 
)**3*tan(c + d*x)**2 + 2*sec(c + d*x)**2*sin(c + d*x)**3 + 6*sec(c + d*x)* 
*2*sin(c + d*x)**2*tan(c + d*x)**2 - 6*sec(c + d*x)**2*sin(c + d*x)**2 - 6 
*sec(c + d*x)**2*sin(c + d*x)*tan(c + d*x)**2 - 2*sec(c + d*x)**2*sin(c + 
d*x) - 6*sec(c + d*x)**2*tan(c + d*x)**2 + 6*sec(c + d*x)**2 + 9*sin(c + d 
*x)))/(24*d*(sin(c + d*x)**2 - 1))