\(\int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx\) [32]

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

Optimal result

Integrand size = 21, antiderivative size = 114 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {13 a^3 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {4 a^3 \tan (c+d x)}{d}+\frac {13 a^3 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {3 a^3 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {5 a^3 \tan ^3(c+d x)}{3 d}+\frac {a^3 \tan ^5(c+d x)}{5 d} \] Output:

13/8*a^3*arctanh(sin(d*x+c))/d+4*a^3*tan(d*x+c)/d+13/8*a^3*sec(d*x+c)*tan( 
d*x+c)/d+3/4*a^3*sec(d*x+c)^3*tan(d*x+c)/d+5/3*a^3*tan(d*x+c)^3/d+1/5*a^3* 
tan(d*x+c)^5/d
 

Mathematica [A] (verified)

Time = 0.77 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {13 a^3 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {4 a^3 \tan (c+d x)}{d}+\frac {13 a^3 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {3 a^3 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {5 a^3 \tan ^3(c+d x)}{3 d}+\frac {a^3 \tan ^5(c+d x)}{5 d} \] Input:

Integrate[(a + a*Cos[c + d*x])^3*Sec[c + d*x]^6,x]
 

Output:

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

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3236, 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 \sec ^6(c+d x) (a \cos (c+d x)+a)^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}{\sin \left (c+d x+\frac {\pi }{2}\right )^6}dx\)

\(\Big \downarrow \) 3236

\(\displaystyle \int \left (a^3 \sec ^6(c+d x)+3 a^3 \sec ^5(c+d x)+3 a^3 \sec ^4(c+d x)+a^3 \sec ^3(c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {13 a^3 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^3 \tan ^5(c+d x)}{5 d}+\frac {5 a^3 \tan ^3(c+d x)}{3 d}+\frac {4 a^3 \tan (c+d x)}{d}+\frac {3 a^3 \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {13 a^3 \tan (c+d x) \sec (c+d x)}{8 d}\)

Input:

Int[(a + a*Cos[c + d*x])^3*Sec[c + d*x]^6,x]
 

Output:

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

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 3236
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*( 
x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(a + b*sin[e + f*x])^m*(d*sin[e + 
f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && IGt 
Q[m, 0] && RationalQ[n]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 6.11 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.27

method result size
risch \(-\frac {i a^{3} \left (195 \,{\mathrm e}^{9 i \left (d x +c \right )}+750 \,{\mathrm e}^{7 i \left (d x +c \right )}-720 \,{\mathrm e}^{6 i \left (d x +c \right )}-2320 \,{\mathrm e}^{4 i \left (d x +c \right )}-750 \,{\mathrm e}^{3 i \left (d x +c \right )}-1520 \,{\mathrm e}^{2 i \left (d x +c \right )}-195 \,{\mathrm e}^{i \left (d x +c \right )}-304\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) \(145\)
derivativedivides \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) \(146\)
default \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) \(146\)
parts \(-\frac {a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}+\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {3 a^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {3 a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}\) \(154\)
norman \(\frac {-\frac {51 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {193 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}+\frac {31 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{60 d}-\frac {857 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{60 d}-\frac {1127 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{60 d}+\frac {481 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{60 d}+\frac {65 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{12 d}-\frac {13 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{15}}{4 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5}}-\frac {13 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {13 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(224\)
parallelrisch \(\frac {a^{3} \left (-1950 \cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+1950 \cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-975 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (3 d x +3 c \right )+975 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (3 d x +3 c \right )-195 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (5 d x +5 c \right )+195 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (5 d x +5 c \right )+1600 \sin \left (d x +c \right )+304 \sin \left (5 d x +5 c \right )+390 \sin \left (4 d x +4 c \right )+1520 \sin \left (3 d x +3 c \right )+1500 \sin \left (2 d x +2 c \right )\right )}{120 d \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right )}\) \(225\)

Input:

int((a+a*cos(d*x+c))^3*sec(d*x+c)^6,x,method=_RETURNVERBOSE)
 

Output:

-1/60*I*a^3*(195*exp(9*I*(d*x+c))+750*exp(7*I*(d*x+c))-720*exp(6*I*(d*x+c) 
)-2320*exp(4*I*(d*x+c))-750*exp(3*I*(d*x+c))-1520*exp(2*I*(d*x+c))-195*exp 
(I*(d*x+c))-304)/d/(exp(2*I*(d*x+c))+1)^5-13/8*a^3/d*ln(exp(I*(d*x+c))-I)+ 
13/8*a^3/d*ln(exp(I*(d*x+c))+I)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.09 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {195 \, a^{3} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 195 \, a^{3} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (304 \, a^{3} \cos \left (d x + c\right )^{4} + 195 \, a^{3} \cos \left (d x + c\right )^{3} + 152 \, a^{3} \cos \left (d x + c\right )^{2} + 90 \, a^{3} \cos \left (d x + c\right ) + 24 \, a^{3}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \] Input:

integrate((a+a*cos(d*x+c))^3*sec(d*x+c)^6,x, algorithm="fricas")
 

Output:

1/240*(195*a^3*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 195*a^3*cos(d*x + c) 
^5*log(-sin(d*x + c) + 1) + 2*(304*a^3*cos(d*x + c)^4 + 195*a^3*cos(d*x + 
c)^3 + 152*a^3*cos(d*x + c)^2 + 90*a^3*cos(d*x + c) + 24*a^3)*sin(d*x + c) 
)/(d*cos(d*x + c)^5)
 

Sympy [F(-1)]

Timed out. \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\text {Timed out} \] Input:

integrate((a+a*cos(d*x+c))**3*sec(d*x+c)**6,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.57 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{3} + 240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3} - 45 \, a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \] Input:

integrate((a+a*cos(d*x+c))^3*sec(d*x+c)^6,x, algorithm="maxima")
 

Output:

1/240*(16*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^3 + 2 
40*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^3 - 45*a^3*(2*(3*sin(d*x + c)^3 - 5 
*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c 
) + 1) + 3*log(sin(d*x + c) - 1)) - 60*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 
 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)))/d
 

Giac [A] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.21 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {195 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 195 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (195 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 910 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 1664 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1330 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 765 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \] Input:

integrate((a+a*cos(d*x+c))^3*sec(d*x+c)^6,x, algorithm="giac")
 

Output:

1/120*(195*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 195*a^3*log(abs(tan(1/ 
2*d*x + 1/2*c) - 1)) - 2*(195*a^3*tan(1/2*d*x + 1/2*c)^9 - 910*a^3*tan(1/2 
*d*x + 1/2*c)^7 + 1664*a^3*tan(1/2*d*x + 1/2*c)^5 - 1330*a^3*tan(1/2*d*x + 
 1/2*c)^3 + 765*a^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^5)/ 
d
 

Mupad [B] (verification not implemented)

Time = 49.16 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.49 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {13\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}-\frac {91\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{6}+\frac {416\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15}-\frac {133\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+\frac {51\,a^3\,\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 )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:

int((a + a*cos(c + d*x))^3/cos(c + d*x)^6,x)
 

Output:

(13*a^3*atanh(tan(c/2 + (d*x)/2)))/(4*d) - ((416*a^3*tan(c/2 + (d*x)/2)^5) 
/15 - (133*a^3*tan(c/2 + (d*x)/2)^3)/6 - (91*a^3*tan(c/2 + (d*x)/2)^7)/6 + 
 (13*a^3*tan(c/2 + (d*x)/2)^9)/4 + (51*a^3*tan(c/2 + (d*x)/2))/4)/(d*(5*ta 
n(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5 
*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 249, normalized size of antiderivative = 2.18 \[ \int (a+a \cos (c+d x))^3 \sec ^6(c+d x) \, dx=\frac {a^{3} \left (-195 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4}+390 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}-195 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+195 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4}-390 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}+195 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-195 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+285 \cos \left (d x +c \right ) \sin \left (d x +c \right )+304 \sin \left (d x +c \right )^{5}-760 \sin \left (d x +c \right )^{3}+480 \sin \left (d x +c \right )\right )}{120 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{2}+1\right )} \] Input:

int((a+a*cos(d*x+c))^3*sec(d*x+c)^6,x)
 

Output:

(a**3*( - 195*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4 + 390 
*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 - 195*cos(c + d*x) 
*log(tan((c + d*x)/2) - 1) + 195*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*si 
n(c + d*x)**4 - 390*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 
 + 195*cos(c + d*x)*log(tan((c + d*x)/2) + 1) - 195*cos(c + d*x)*sin(c + d 
*x)**3 + 285*cos(c + d*x)*sin(c + d*x) + 304*sin(c + d*x)**5 - 760*sin(c + 
 d*x)**3 + 480*sin(c + d*x)))/(120*cos(c + d*x)*d*(sin(c + d*x)**4 - 2*sin 
(c + d*x)**2 + 1))