\(\int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx\) [125]

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 [F]

Optimal result

Integrand size = 36, antiderivative size = 89 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=-\frac {c^2 (a+a \sec (e+f x))^{5/2} \tan (e+f x)}{6 f \sqrt {c-c \sec (e+f x)}}-\frac {c (a+a \sec (e+f x))^{5/2} \sqrt {c-c \sec (e+f x)} \tan (e+f x)}{4 f} \] Output:

-1/6*c^2*(a+a*sec(f*x+e))^(5/2)*tan(f*x+e)/f/(c-c*sec(f*x+e))^(1/2)-1/4*c* 
(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(1/2)*tan(f*x+e)/f
 

Mathematica [A] (verified)

Time = 0.75 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.99 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=-\frac {a^2 c^2 (5 \cos (e+f x)+3 (\cos (2 (e+f x))+\cos (3 (e+f x)))) \sec ^4(e+f x) \sqrt {a (1+\sec (e+f x))} \tan \left (\frac {1}{2} (e+f x)\right )}{12 f \sqrt {c-c \sec (e+f x)}} \] Input:

Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^(3/ 
2),x]
 

Output:

-1/12*(a^2*c^2*(5*Cos[e + f*x] + 3*(Cos[2*(e + f*x)] + Cos[3*(e + f*x)]))* 
Sec[e + f*x]^4*Sqrt[a*(1 + Sec[e + f*x])]*Tan[(e + f*x)/2])/(f*Sqrt[c - c* 
Sec[e + f*x]])
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 4443, 3042, 4441}

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 (e+f x) (a \sec (e+f x)+a)^{5/2} (c-c \sec (e+f x))^{3/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{5/2} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{3/2}dx\)

\(\Big \downarrow \) 4443

\(\displaystyle \frac {1}{2} c \int \sec (e+f x) (\sec (e+f x) a+a)^{5/2} \sqrt {c-c \sec (e+f x)}dx-\frac {c \tan (e+f x) (a \sec (e+f x)+a)^{5/2} \sqrt {c-c \sec (e+f x)}}{4 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} c \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{5/2} \sqrt {c-c \csc \left (e+f x+\frac {\pi }{2}\right )}dx-\frac {c \tan (e+f x) (a \sec (e+f x)+a)^{5/2} \sqrt {c-c \sec (e+f x)}}{4 f}\)

\(\Big \downarrow \) 4441

\(\displaystyle -\frac {c^2 \tan (e+f x) (a \sec (e+f x)+a)^{5/2}}{6 f \sqrt {c-c \sec (e+f x)}}-\frac {c \tan (e+f x) (a \sec (e+f x)+a)^{5/2} \sqrt {c-c \sec (e+f x)}}{4 f}\)

Input:

Int[Sec[e + f*x]*(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^(3/2),x]
 

Output:

-1/6*(c^2*(a + a*Sec[e + f*x])^(5/2)*Tan[e + f*x])/(f*Sqrt[c - c*Sec[e + f 
*x]]) - (c*(a + a*Sec[e + f*x])^(5/2)*Sqrt[c - c*Sec[e + f*x]]*Tan[e + f*x 
])/(4*f)
 

Defintions of rubi rules used

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

rule 4441
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*Sq 
rt[csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)], x_Symbol] :> Simp[2*a*c*Cot[e + f 
*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1)*Sqrt[c + d*Csc[e + f*x]])), x] / 
; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] 
 && NeQ[m, -2^(-1)]
 

rule 4443
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(c 
sc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[(-d)*Cot[e + f 
*x]*(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^(n - 1)/(f*(m + n))), x] + 
 Simp[c*((2*n - 1)/(m + n))   Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*(c + 
d*Csc[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[b 
*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[n - 1/2, 0] &&  !LtQ[m, -2^(-1)] 
&&  !(IGtQ[m - 1/2, 0] && LtQ[m, n])
 
Maple [A] (verified)

Time = 2.26 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.57

method result size
default \(-\frac {4 \sqrt {\frac {a \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1}}\, \sqrt {-\frac {c \sin \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1}}\, \left (11 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-6 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) a^{2} c \sin \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{3 f \left (2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}\) \(140\)
risch \(\frac {2 i a^{2} c \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left (3 \,{\mathrm e}^{7 i \left (f x +e \right )}+3 \,{\mathrm e}^{6 i \left (f x +e \right )}+5 \,{\mathrm e}^{5 i \left (f x +e \right )}+5 \,{\mathrm e}^{3 i \left (f x +e \right )}+3 \,{\mathrm e}^{2 i \left (f x +e \right )}+3 \,{\mathrm e}^{i \left (f x +e \right )}\right )}{3 \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) f}\) \(177\)

Input:

int(sec(f*x+e)*(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(3/2),x,method=_RET 
URNVERBOSE)
 

Output:

-4/3/f*(a/(2*cos(1/2*f*x+1/2*e)^2-1)*cos(1/2*f*x+1/2*e)^2)^(1/2)*(-c/(2*co 
s(1/2*f*x+1/2*e)^2-1)*sin(1/2*f*x+1/2*e)^2)^(1/2)*(11*cos(1/2*f*x+1/2*e)^4 
-6*cos(1/2*f*x+1/2*e)^2+1)*a^2*c/(2*cos(1/2*f*x+1/2*e)^2-1)^3*sin(1/2*f*x+ 
1/2*e)^2*tan(1/2*f*x+1/2*e)
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.26 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=\frac {{\left (12 \, a^{2} c \cos \left (f x + e\right )^{3} + 6 \, a^{2} c \cos \left (f x + e\right )^{2} - 4 \, a^{2} c \cos \left (f x + e\right ) - 3 \, a^{2} c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{12 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \] Input:

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(3/2),x, algo 
rithm="fricas")
 

Output:

1/12*(12*a^2*c*cos(f*x + e)^3 + 6*a^2*c*cos(f*x + e)^2 - 4*a^2*c*cos(f*x + 
 e) - 3*a^2*c)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt((c*cos(f*x + e 
) - c)/cos(f*x + e))/(f*cos(f*x + e)^3*sin(f*x + e))
 

Sympy [F(-1)]

Timed out. \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=\text {Timed out} \] Input:

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**(5/2)*(c-c*sec(f*x+e))**(3/2),x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1106 vs. \(2 (77) = 154\).

Time = 0.20 (sec) , antiderivative size = 1106, normalized size of antiderivative = 12.43 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=\text {Too large to display} \] Input:

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(3/2),x, algo 
rithm="maxima")
 

Output:

2/3*(20*a^2*c*cos(3*f*x + 3*e)*sin(2*f*x + 2*e) - 12*a^2*c*cos(2*f*x + 2*e 
)*sin(f*x + e) - 3*a^2*c*sin(f*x + e) - (3*a^2*c*sin(7*f*x + 7*e) + 3*a^2* 
c*sin(6*f*x + 6*e) + 5*a^2*c*sin(5*f*x + 5*e) + 5*a^2*c*sin(3*f*x + 3*e) + 
 3*a^2*c*sin(2*f*x + 2*e) + 3*a^2*c*sin(f*x + e))*cos(8*f*x + 8*e) + 6*(2* 
a^2*c*sin(6*f*x + 6*e) + 3*a^2*c*sin(4*f*x + 4*e) + 2*a^2*c*sin(2*f*x + 2* 
e))*cos(7*f*x + 7*e) - 2*(10*a^2*c*sin(5*f*x + 5*e) - 9*a^2*c*sin(4*f*x + 
4*e) + 10*a^2*c*sin(3*f*x + 3*e) + 6*a^2*c*sin(f*x + e))*cos(6*f*x + 6*e) 
+ 10*(3*a^2*c*sin(4*f*x + 4*e) + 2*a^2*c*sin(2*f*x + 2*e))*cos(5*f*x + 5*e 
) - 6*(5*a^2*c*sin(3*f*x + 3*e) + 3*a^2*c*sin(2*f*x + 2*e) + 3*a^2*c*sin(f 
*x + e))*cos(4*f*x + 4*e) + (3*a^2*c*cos(7*f*x + 7*e) + 3*a^2*c*cos(6*f*x 
+ 6*e) + 5*a^2*c*cos(5*f*x + 5*e) + 5*a^2*c*cos(3*f*x + 3*e) + 3*a^2*c*cos 
(2*f*x + 2*e) + 3*a^2*c*cos(f*x + e))*sin(8*f*x + 8*e) - 3*(4*a^2*c*cos(6* 
f*x + 6*e) + 6*a^2*c*cos(4*f*x + 4*e) + 4*a^2*c*cos(2*f*x + 2*e) + a^2*c)* 
sin(7*f*x + 7*e) + (20*a^2*c*cos(5*f*x + 5*e) - 18*a^2*c*cos(4*f*x + 4*e) 
+ 20*a^2*c*cos(3*f*x + 3*e) + 12*a^2*c*cos(f*x + e) - 3*a^2*c)*sin(6*f*x + 
 6*e) - 5*(6*a^2*c*cos(4*f*x + 4*e) + 4*a^2*c*cos(2*f*x + 2*e) + a^2*c)*si 
n(5*f*x + 5*e) + 6*(5*a^2*c*cos(3*f*x + 3*e) + 3*a^2*c*cos(2*f*x + 2*e) + 
3*a^2*c*cos(f*x + e))*sin(4*f*x + 4*e) - 5*(4*a^2*c*cos(2*f*x + 2*e) + a^2 
*c)*sin(3*f*x + 3*e) + 3*(4*a^2*c*cos(f*x + e) - a^2*c)*sin(2*f*x + 2*e))* 
sqrt(a)*sqrt(c)/((2*(4*cos(6*f*x + 6*e) + 6*cos(4*f*x + 4*e) + 4*cos(2*...
 

Giac [A] (verification not implemented)

Time = 0.80 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.99 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=\frac {4 \, {\left (4 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )} c^{5} + 3 \, c^{6}\right )} \sqrt {-a c} a^{2} {\left | c \right |} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{3 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )}^{4} c^{2} f} \] Input:

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(3/2),x, algo 
rithm="giac")
 

Output:

4/3*(4*(c*tan(1/2*f*x + 1/2*e)^2 - c)*c^5 + 3*c^6)*sqrt(-a*c)*a^2*abs(c)*s 
gn(tan(1/2*f*x + 1/2*e)^3 + tan(1/2*f*x + 1/2*e))/((c*tan(1/2*f*x + 1/2*e) 
^2 - c)^4*c^2*f)
 

Mupad [B] (verification not implemented)

Time = 14.83 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.19 \[ \int \sec (e+f x) (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{3/2} \, dx=\frac {\sqrt {c-\frac {c}{\cos \left (e+f\,x\right )}}\,\left (\frac {a^2\,c\,\cos \left (e+f\,x\right )\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,20{}\mathrm {i}}{3\,f}+\frac {a^2\,c\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,\cos \left (2\,e+2\,f\,x\right )\,\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,4{}\mathrm {i}}{f}+\frac {a^2\,c\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,\cos \left (3\,e+3\,f\,x\right )\,\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,4{}\mathrm {i}}{f}\right )}{{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,\sin \left (2\,e+2\,f\,x\right )\,4{}\mathrm {i}+{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,\sin \left (4\,e+4\,f\,x\right )\,2{}\mathrm {i}} \] Input:

int(((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^(3/2))/cos(e + f*x),x 
)
 

Output:

((c - c/cos(e + f*x))^(1/2)*((a^2*c*cos(e + f*x)*exp(e*4i + f*x*4i)*(a + a 
/cos(e + f*x))^(1/2)*20i)/(3*f) + (a^2*c*exp(e*4i + f*x*4i)*cos(2*e + 2*f* 
x)*(a + a/cos(e + f*x))^(1/2)*4i)/f + (a^2*c*exp(e*4i + f*x*4i)*cos(3*e + 
3*f*x)*(a + a/cos(e + f*x))^(1/2)*4i)/f))/(exp(e*4i + f*x*4i)*sin(2*e + 2* 
f*x)*4i + exp(e*4i + f*x*4i)*sin(4*e + 4*f*x)*2i)
 

Reduce [F]

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

int(sec(f*x+e)*(a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^(3/2),x)
 

Output:

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