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

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

Optimal result

Integrand size = 34, antiderivative size = 100 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{3/2} \, dx=-\frac {8 c^2 (a+a \sec (e+f x))^m \tan (e+f x)}{f \left (3+8 m+4 m^2\right ) \sqrt {c-c \sec (e+f x)}}-\frac {2 c (a+a \sec (e+f x))^m \sqrt {c-c \sec (e+f x)} \tan (e+f x)}{f (3+2 m)} \] Output:

-8*c^2*(a+a*sec(f*x+e))^m*tan(f*x+e)/f/(4*m^2+8*m+3)/(c-c*sec(f*x+e))^(1/2 
)-2*c*(a+a*sec(f*x+e))^m*(c-c*sec(f*x+e))^(1/2)*tan(f*x+e)/f/(3+2*m)
 

Mathematica [A] (verified)

Time = 0.47 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.72 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{3/2} \, dx=\frac {2 c^2 (a (1+\sec (e+f x)))^m (-5-2 m+(1+2 m) \sec (e+f x)) \tan (e+f x)}{f (1+2 m) (3+2 m) \sqrt {c-c \sec (e+f x)}} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.02, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, 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) (c-c \sec (e+f x))^{3/2} (a \sec (e+f x)+a)^m \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4443

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4441

\(\displaystyle -\frac {8 c^2 \tan (e+f x) (a \sec (e+f x)+a)^m}{f (2 m+1) (2 m+3) \sqrt {c-c \sec (e+f x)}}-\frac {2 c \tan (e+f x) \sqrt {c-c \sec (e+f x)} (a \sec (e+f x)+a)^m}{f (2 m+3)}\)

Input:

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

Output:

(-8*c^2*(a + a*Sec[e + f*x])^m*Tan[e + f*x])/(f*(1 + 2*m)*(3 + 2*m)*Sqrt[c 
 - c*Sec[e + f*x]]) - (2*c*(a + a*Sec[e + f*x])^m*Sqrt[c - c*Sec[e + f*x]] 
*Tan[e + f*x])/(f*(3 + 2*m))
 

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

\[\int \sec \left (f x +e \right ) \left (a +a \sec \left (f x +e \right )\right )^{m} \left (c -c \sec \left (f x +e \right )\right )^{\frac {3}{2}}d x\]

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

2*((2*c*m + 5*c)*cos(f*x + e)^2 - 2*c*m + 4*c*cos(f*x + e) - c)*((a*cos(f* 
x + e) + a)/cos(f*x + e))^m*sqrt((c*cos(f*x + e) - c)/cos(f*x + e))/((4*f* 
m^2 + 8*f*m + 3*f)*cos(f*x + e)*sin(f*x + e))
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.71 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{3/2} \, dx=-\frac {2 \, {\left (\sqrt {2} 2^{m + 2} \left (-a\right )^{m} c^{\frac {3}{2}} - \frac {\sqrt {2} {\left (2^{m + 2} m + 3 \cdot 2^{m + 1}\right )} \left (-a\right )^{m} c^{\frac {3}{2}} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} e^{\left (-m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )\right )}}{{\left (4 \, m^{2} + 8 \, m + 3\right )} f {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}^{\frac {3}{2}} {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}^{\frac {3}{2}}} \] Input:

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

Output:

-2*(sqrt(2)*2^(m + 2)*(-a)^m*c^(3/2) - sqrt(2)*(2^(m + 2)*m + 3*2^(m + 1)) 
*(-a)^m*c^(3/2)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)*e^(-m*log(sin(f*x + e 
)/(cos(f*x + e) + 1) + 1) - m*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1))/(( 
4*m^2 + 8*m + 3)*f*(sin(f*x + e)/(cos(f*x + e) + 1) + 1)^(3/2)*(sin(f*x + 
e)/(cos(f*x + e) + 1) - 1)^(3/2))
 

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 12.18 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.54 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{3/2} \, dx=-\frac {2\,c\,{\left (\frac {a\,\left (\cos \left (e+f\,x\right )+1\right )}{\cos \left (e+f\,x\right )}\right )}^m\,\sqrt {\frac {c\,\left (\cos \left (e+f\,x\right )-1\right )}{\cos \left (e+f\,x\right )}}\,\left (5\,\sin \left (e+f\,x\right )-2\,\sin \left (2\,e+2\,f\,x\right )+5\,\sin \left (3\,e+3\,f\,x\right )+2\,m\,\sin \left (e+f\,x\right )-4\,m\,\sin \left (2\,e+2\,f\,x\right )+2\,m\,\sin \left (3\,e+3\,f\,x\right )\right )}{f\,\left (4\,m^2+8\,m+3\right )\,\left (3\,\cos \left (e+f\,x\right )-2\,\cos \left (2\,e+2\,f\,x\right )+\cos \left (3\,e+3\,f\,x\right )-2\right )} \] Input:

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

Output:

-(2*c*((a*(cos(e + f*x) + 1))/cos(e + f*x))^m*((c*(cos(e + f*x) - 1))/cos( 
e + f*x))^(1/2)*(5*sin(e + f*x) - 2*sin(2*e + 2*f*x) + 5*sin(3*e + 3*f*x) 
+ 2*m*sin(e + f*x) - 4*m*sin(2*e + 2*f*x) + 2*m*sin(3*e + 3*f*x)))/(f*(8*m 
 + 4*m^2 + 3)*(3*cos(e + f*x) - 2*cos(2*e + 2*f*x) + cos(3*e + 3*f*x) - 2) 
)
 

Reduce [F]

\[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{3/2} \, dx=\sqrt {c}\, c \left (-\left (\int \left (\sec \left (f x +e \right ) a +a \right )^{m} \sqrt {-\sec \left (f x +e \right )+1}\, \sec \left (f x +e \right )^{2}d x \right )+\int \left (\sec \left (f x +e \right ) a +a \right )^{m} \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))^m*(c-c*sec(f*x+e))^(3/2),x)
 

Output:

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