\(\int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx\) [40]

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 = 21, antiderivative size = 96 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {35 a^4 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {27 a^4 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d} \] Output:

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

Mathematica [A] (verified)

Time = 2.18 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.15 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {a^4 \coth ^{-1}(\sin (c+d x))}{d}+\frac {27 a^4 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {27 a^4 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d} \] Input:

Integrate[(a + a*Cos[c + d*x])^4*Sec[c + d*x]^5,x]
 

Output:

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

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 96, 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 ^5(c+d x) (a \cos (c+d x)+a)^4 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3236

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

\(\Big \downarrow \) 2009

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

Input:

Int[(a + a*Cos[c + d*x])^4*Sec[c + d*x]^5,x]
 

Output:

(35*a^4*ArcTanh[Sin[c + d*x]])/(8*d) + (8*a^4*Tan[c + d*x])/d + (27*a^4*Se 
c[c + d*x]*Tan[c + d*x])/(8*d) + (a^4*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + 
 (4*a^4*Tan[c + d*x]^3)/(3*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 [A] (verified)

Time = 14.70 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.41

method result size
parts \(\frac {a^{4} \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 {4 a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}-\frac {4 a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {3 a^{4} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{d}+\frac {4 a^{4} \tan \left (d x +c \right )}{d}\) \(135\)
derivativedivides \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 a^{4} \tan \left (d x +c \right )+6 a^{4} \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 )-4 a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{4} \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}\) \(142\)
default \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 a^{4} \tan \left (d x +c \right )+6 a^{4} \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 )-4 a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{4} \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}\) \(142\)
risch \(-\frac {i a^{4} \left (81 \,{\mathrm e}^{7 i \left (d x +c \right )}-96 \,{\mathrm e}^{6 i \left (d x +c \right )}+105 \,{\mathrm e}^{5 i \left (d x +c \right )}-480 \,{\mathrm e}^{4 i \left (d x +c \right )}-105 \,{\mathrm e}^{3 i \left (d x +c \right )}-544 \,{\mathrm e}^{2 i \left (d x +c \right )}-81 \,{\mathrm e}^{i \left (d x +c \right )}-160\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) \(145\)
parallelrisch \(\frac {a^{4} \left (105 \left (-\cos \left (4 d x +4 c \right )-4 \cos \left (2 d x +2 c \right )-3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+105 \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+160 \sin \left (4 d x +4 c \right )+210 \sin \left (d x +c \right )+448 \sin \left (2 d x +2 c \right )+162 \sin \left (3 d x +3 c \right )\right )}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(149\)
norman \(\frac {\frac {93 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {605 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}+\frac {5 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{4 d}-\frac {515 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{12 d}+\frac {125 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {133 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{4 d}-\frac {35 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{12 d}-\frac {35 a^{4} \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 )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {35 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {35 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(224\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.16 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {105 \, a^{4} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \, a^{4} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (160 \, a^{4} \cos \left (d x + c\right )^{3} + 81 \, a^{4} \cos \left (d x + c\right )^{2} + 32 \, a^{4} \cos \left (d x + c\right ) + 6 \, a^{4}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \] Input:

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

Output:

1/48*(105*a^4*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 105*a^4*cos(d*x + c)^ 
4*log(-sin(d*x + c) + 1) + 2*(160*a^4*cos(d*x + c)^3 + 81*a^4*cos(d*x + c) 
^2 + 32*a^4*cos(d*x + c) + 6*a^4)*sin(d*x + c))/(d*cos(d*x + c)^4)
 

Sympy [F(-1)]

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

integrate((a+a*cos(d*x+c))**4*sec(d*x+c)**5,x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (88) = 176\).

Time = 0.04 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.90 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {64 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4} - 3 \, a^{4} {\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 )} - 72 \, a^{4} {\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 )} + 24 \, a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 192 \, a^{4} \tan \left (d x + c\right )}{48 \, d} \] Input:

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

Output:

1/48*(64*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^4 - 3*a^4*(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)) - 72*a^4*(2*sin(d*x + c)/(sin(d*x + 
 c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 24*a^4*(log( 
sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 192*a^4*tan(d*x + c))/d
 

Giac [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.27 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {105 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 105 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (105 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 385 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 511 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 279 \, a^{4} \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 )}^{4}}}{24 \, d} \] Input:

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

Output:

1/24*(105*a^4*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 105*a^4*log(abs(tan(1/2 
*d*x + 1/2*c) - 1)) - 2*(105*a^4*tan(1/2*d*x + 1/2*c)^7 - 385*a^4*tan(1/2* 
d*x + 1/2*c)^5 + 511*a^4*tan(1/2*d*x + 1/2*c)^3 - 279*a^4*tan(1/2*d*x + 1/ 
2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
 

Mupad [B] (verification not implemented)

Time = 46.34 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.47 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {35\,a^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {\frac {35\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}-\frac {385\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {511\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}-\frac {93\,a^4\,\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 )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \] Input:

int((a + a*cos(c + d*x))^4/cos(c + d*x)^5,x)
 

Output:

(35*a^4*atanh(tan(c/2 + (d*x)/2)))/(4*d) - ((511*a^4*tan(c/2 + (d*x)/2)^3) 
/12 - (385*a^4*tan(c/2 + (d*x)/2)^5)/12 + (35*a^4*tan(c/2 + (d*x)/2)^7)/4 
- (93*a^4*tan(c/2 + (d*x)/2))/4)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + 
(d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 249, normalized size of antiderivative = 2.59 \[ \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx=\frac {a^{4} \left (-105 \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}+210 \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}-105 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+105 \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}-210 \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}+105 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-81 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+87 \cos \left (d x +c \right ) \sin \left (d x +c \right )+160 \sin \left (d x +c \right )^{5}-352 \sin \left (d x +c \right )^{3}+192 \sin \left (d x +c \right )\right )}{24 \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))^4*sec(d*x+c)^5,x)
 

Output:

(a**4*( - 105*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4 + 210 
*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 - 105*cos(c + d*x) 
*log(tan((c + d*x)/2) - 1) + 105*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*si 
n(c + d*x)**4 - 210*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 
 + 105*cos(c + d*x)*log(tan((c + d*x)/2) + 1) - 81*cos(c + d*x)*sin(c + d* 
x)**3 + 87*cos(c + d*x)*sin(c + d*x) + 160*sin(c + d*x)**5 - 352*sin(c + d 
*x)**3 + 192*sin(c + d*x)))/(24*cos(c + d*x)*d*(sin(c + d*x)**4 - 2*sin(c 
+ d*x)**2 + 1))