\(\int (a-a \sec ^2(c+d x))^{7/2} \, dx\) [220]

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

Optimal result

Integrand size = 17, antiderivative size = 134 \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=-\frac {a^3 \cot (c+d x) \log (\cos (c+d x)) \sqrt {-a \tan ^2(c+d x)}}{d}-\frac {a^3 \tan (c+d x) \sqrt {-a \tan ^2(c+d x)}}{2 d}+\frac {a^3 \tan ^3(c+d x) \sqrt {-a \tan ^2(c+d x)}}{4 d}-\frac {a^3 \tan ^5(c+d x) \sqrt {-a \tan ^2(c+d x)}}{6 d} \] Output:

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

Mathematica [A] (verified)

Time = 1.05 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.52 \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=\frac {\cot ^7(c+d x) \left (12 \log (\cos (c+d x))+18 \sec ^2(c+d x)-9 \sec ^4(c+d x)+2 \sec ^6(c+d x)\right ) \left (-a \tan ^2(c+d x)\right )^{7/2}}{12 d} \] Input:

Integrate[(a - a*Sec[c + d*x]^2)^(7/2),x]
 

Output:

(Cot[c + d*x]^7*(12*Log[Cos[c + d*x]] + 18*Sec[c + d*x]^2 - 9*Sec[c + d*x] 
^4 + 2*Sec[c + d*x]^6)*(-(a*Tan[c + d*x]^2))^(7/2))/(12*d)
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.62, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.706, Rules used = {3042, 4609, 3042, 4141, 3042, 3954, 3042, 3954, 3042, 3954, 3042, 3956}

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 \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a-a \sec (c+d x)^2\right )^{7/2}dx\)

\(\Big \downarrow \) 4609

\(\displaystyle \int \left (-a \tan ^2(c+d x)\right )^{7/2}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (-a \tan (c+d x)^2\right )^{7/2}dx\)

\(\Big \downarrow \) 4141

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \int \tan ^7(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \int \tan (c+d x)^7dx\)

\(\Big \downarrow \) 3954

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (\frac {\tan ^6(c+d x)}{6 d}-\int \tan ^5(c+d x)dx\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (\frac {\tan ^6(c+d x)}{6 d}-\int \tan (c+d x)^5dx\right )\)

\(\Big \downarrow \) 3954

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (\int \tan ^3(c+d x)dx+\frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (\int \tan (c+d x)^3dx+\frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}\right )\)

\(\Big \downarrow \) 3954

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (-\int \tan (c+d x)dx+\frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^2(c+d x)}{2 d}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (-\int \tan (c+d x)dx+\frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^2(c+d x)}{2 d}\right )\)

\(\Big \downarrow \) 3956

\(\displaystyle -a^3 \cot (c+d x) \sqrt {-a \tan ^2(c+d x)} \left (\frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^2(c+d x)}{2 d}+\frac {\log (\cos (c+d x))}{d}\right )\)

Input:

Int[(a - a*Sec[c + d*x]^2)^(7/2),x]
 

Output:

-(a^3*Cot[c + d*x]*Sqrt[-(a*Tan[c + d*x]^2)]*(Log[Cos[c + d*x]]/d + Tan[c 
+ d*x]^2/(2*d) - Tan[c + d*x]^4/(4*d) + Tan[c + d*x]^6/(6*d)))
 

Defintions of rubi rules used

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

rule 3954
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d 
*x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2   Int[(b*Tan[c + d*x])^(n - 2), x] 
, x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4141
Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff 
= FreeFactors[Tan[e + f*x], x]}, Simp[(b*ff^n)^IntPart[p]*((b*Tan[e + f*x]^ 
n)^FracPart[p]/(Tan[e + f*x]/ff)^(n*FracPart[p]))   Int[ActivateTrig[u]*(Ta 
n[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] 
 && IntegerQ[n] && (EqQ[u, 1] || MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) / 
; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])
 

rule 4609
Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[A 
ctivateTrig[u*(b*tan[e + f*x]^2)^p], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ 
[a + b, 0]
 
Maple [A] (verified)

Time = 4.09 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.07

method result size
default \(\frac {\left (-\cos \left (d x +c \right )^{6} \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )+1\right )+\cos \left (d x +c \right )^{6} \ln \left (\frac {2}{\cos \left (d x +c \right )+1}\right )-\cos \left (d x +c \right )^{6} \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )-1\right )+\frac {11 \cos \left (d x +c \right )^{6}}{12}-\frac {3 \cos \left (d x +c \right )^{4}}{2}+\frac {3 \cos \left (d x +c \right )^{2}}{4}-\frac {1}{6}\right ) a^{3} \sqrt {-a \tan \left (d x +c \right )^{2}}\, \sec \left (d x +c \right )^{5} \csc \left (d x +c \right )}{d}\) \(143\)
risch \(\frac {a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, x}{{\mathrm e}^{2 i \left (d x +c \right )}-1}-\frac {2 a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left (d x +c \right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) d}-\frac {2 i a^{3} \sqrt {\frac {a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left (9 \,{\mathrm e}^{10 i \left (d x +c \right )}+18 \,{\mathrm e}^{8 i \left (d x +c \right )}+34 \,{\mathrm e}^{6 i \left (d x +c \right )}+18 \,{\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5} d}-\frac {i a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) d}\) \(324\)

Input:

int((a-sec(d*x+c)^2*a)^(7/2),x,method=_RETURNVERBOSE)
 

Output:

1/d*(-cos(d*x+c)^6*ln(-cot(d*x+c)+csc(d*x+c)+1)+cos(d*x+c)^6*ln(2/(cos(d*x 
+c)+1))-cos(d*x+c)^6*ln(-cot(d*x+c)+csc(d*x+c)-1)+11/12*cos(d*x+c)^6-3/2*c 
os(d*x+c)^4+3/4*cos(d*x+c)^2-1/6)*a^3*(-a*tan(d*x+c)^2)^(1/2)*sec(d*x+c)^5 
*csc(d*x+c)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.75 \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=-\frac {{\left (12 \, a^{3} \cos \left (d x + c\right )^{6} \log \left (-\cos \left (d x + c\right )\right ) + 18 \, a^{3} \cos \left (d x + c\right )^{4} - 9 \, a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3}\right )} \sqrt {\frac {a \cos \left (d x + c\right )^{2} - a}{\cos \left (d x + c\right )^{2}}}}{12 \, d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )} \] Input:

integrate((a-a*sec(d*x+c)^2)^(7/2),x, algorithm="fricas")
 

Output:

-1/12*(12*a^3*cos(d*x + c)^6*log(-cos(d*x + c)) + 18*a^3*cos(d*x + c)^4 - 
9*a^3*cos(d*x + c)^2 + 2*a^3)*sqrt((a*cos(d*x + c)^2 - a)/cos(d*x + c)^2)/ 
(d*cos(d*x + c)^5*sin(d*x + c))
 

Sympy [F(-1)]

Timed out. \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=\text {Timed out} \] Input:

integrate((a-a*sec(d*x+c)**2)**(7/2),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.60 \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=-\frac {2 \, \sqrt {-a} a^{3} \tan \left (d x + c\right )^{6} - 3 \, \sqrt {-a} a^{3} \tan \left (d x + c\right )^{4} + 6 \, \sqrt {-a} a^{3} \tan \left (d x + c\right )^{2} - 6 \, \sqrt {-a} a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{12 \, d} \] Input:

integrate((a-a*sec(d*x+c)^2)^(7/2),x, algorithm="maxima")
 

Output:

-1/12*(2*sqrt(-a)*a^3*tan(d*x + c)^6 - 3*sqrt(-a)*a^3*tan(d*x + c)^4 + 6*s 
qrt(-a)*a^3*tan(d*x + c)^2 - 6*sqrt(-a)*a^3*log(tan(d*x + c)^2 + 1))/d
 

Giac [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.62 \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=-\frac {6 \, \sqrt {-a} a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} + 2\right ) - 6 \, \sqrt {-a} a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - 2\right ) + \frac {11 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}\right )}^{3} \sqrt {-a} a^{3} - 90 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}\right )}^{2} \sqrt {-a} a^{3} + 276 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}\right )} \sqrt {-a} a^{3} - 408 \, \sqrt {-a} a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - 2\right )}^{3}}}{12 \, d} \] Input:

integrate((a-a*sec(d*x+c)^2)^(7/2),x, algorithm="giac")
 

Output:

-1/12*(6*sqrt(-a)*a^3*log(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^ 
2 + 2) - 6*sqrt(-a)*a^3*log(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c 
)^2 - 2) + (11*(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2)^3*sqrt( 
-a)*a^3 - 90*(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2)^2*sqrt(-a 
)*a^3 + 276*(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2)*sqrt(-a)*a 
^3 - 408*sqrt(-a)*a^3)/(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2 
- 2)^3)/d
 

Mupad [F(-1)]

Timed out. \[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=\int {\left (a-\frac {a}{{\cos \left (c+d\,x\right )}^2}\right )}^{7/2} \,d x \] Input:

int((a - a/cos(c + d*x)^2)^(7/2),x)
 

Output:

int((a - a/cos(c + d*x)^2)^(7/2), x)
 

Reduce [F]

\[ \int \left (a-a \sec ^2(c+d x)\right )^{7/2} \, dx=\sqrt {a}\, a^{3} \left (\int \sqrt {-\sec \left (d x +c \right )^{2}+1}d x -\left (\int \sqrt {-\sec \left (d x +c \right )^{2}+1}\, \sec \left (d x +c \right )^{6}d x \right )+3 \left (\int \sqrt {-\sec \left (d x +c \right )^{2}+1}\, \sec \left (d x +c \right )^{4}d x \right )-3 \left (\int \sqrt {-\sec \left (d x +c \right )^{2}+1}\, \sec \left (d x +c \right )^{2}d x \right )\right ) \] Input:

int((a-a*sec(d*x+c)^2)^(7/2),x)
 

Output:

sqrt(a)*a**3*(int(sqrt( - sec(c + d*x)**2 + 1),x) - int(sqrt( - sec(c + d* 
x)**2 + 1)*sec(c + d*x)**6,x) + 3*int(sqrt( - sec(c + d*x)**2 + 1)*sec(c + 
 d*x)**4,x) - 3*int(sqrt( - sec(c + d*x)**2 + 1)*sec(c + d*x)**2,x))