\(\int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx\) [50]

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

Optimal result

Integrand size = 32, antiderivative size = 85 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 C \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b^2 d} \] Output:

2*B*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/b/d/cos(d*x+c)^(1/2)/(b*sec(d*x+ 
c))^(1/2)+2*C*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2))*(b*s 
ec(d*x+c))^(1/2)/b^2/d
 

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.67 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {2 \left (B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+C \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}} \] Input:

Integrate[(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(b*Sec[c + d*x])^(3/2),x]
 

Output:

(2*(B*EllipticE[(c + d*x)/2, 2] + C*EllipticF[(c + d*x)/2, 2]))/(b*d*Sqrt[ 
Cos[c + d*x]]*Sqrt[b*Sec[c + d*x]])
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.281, Rules used = {3042, 4535, 27, 2030, 3042, 4258, 3042, 3119, 3120}

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 \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx\)

\(\Big \downarrow \) 4535

\(\displaystyle \frac {B \int \frac {1}{\sqrt {b \sec (c+d x)}}dx}{b}+\int \frac {C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {B \int \frac {1}{\sqrt {b \sec (c+d x)}}dx}{b}+C \int \frac {\sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}}dx\)

\(\Big \downarrow \) 2030

\(\displaystyle \frac {C \int \sqrt {b \sec (c+d x)}dx}{b^2}+\frac {B \int \frac {1}{\sqrt {b \sec (c+d x)}}dx}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {C \int \sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b^2}+\frac {B \int \frac {1}{\sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}\)

\(\Big \downarrow \) 4258

\(\displaystyle \frac {C \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx}{b^2}+\frac {B \int \sqrt {\cos (c+d x)}dx}{b \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {C \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b^2}+\frac {B \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3119

\(\displaystyle \frac {C \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b^2}+\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3120

\(\displaystyle \frac {2 C \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b^2 d}+\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

Input:

Int[(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(b*Sec[c + d*x])^(3/2),x]
 

Output:

(2*B*EllipticE[(c + d*x)/2, 2])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[b*Sec[c + d*x 
]]) + (2*C*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[b*Sec[c + d*x 
]])/(b^2*d)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2030
Int[(Fx_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Simp[1/b^m   Int[(b*v) 
^(m + n)*Fx, x], x] /; FreeQ[{b, n}, x] && IntegerQ[m]
 

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

rule 3119
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* 
(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 4258
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^n*Sin[c + d*x]^n   Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && 
 EqQ[n^2, 1/4]
 

rule 4535
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* 
(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b   Int[(b*Cs 
c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) 
, x] /; FreeQ[{b, e, f, A, B, C, m}, x]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 2.13 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.95

method result size
default \(\frac {2 \left (\left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}-\csc \left (d x +c \right )+\cot \left (d x +c \right )\right ) B +4 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )-4 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )+4 i C \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{b d \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right ) \sqrt {b \sec \left (d x +c \right )}}\) \(251\)
parts \(\frac {2 B \left (i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \left (-\cos \left (d x +c \right )-2-\sec \left (d x +c \right )\right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \left (\cos \left (d x +c \right )+2+\sec \left (d x +c \right )\right )+\sin \left (d x +c \right )\right )}{b d \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}}-\frac {2 i C \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{d b \sqrt {b \sec \left (d x +c \right )}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\) \(252\)
risch \(-\frac {i B \sqrt {2}}{d b \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (\frac {i C \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}+B \left (-\frac {2 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}{b \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \operatorname {EllipticE}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}\right )\right ) \sqrt {2}\, \sqrt {b \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d b \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}\) \(414\)

Input:

int((B*sec(d*x+c)+C*sec(d*x+c)^2)/(b*sec(d*x+c))^(3/2),x,method=_RETURNVER 
BOSE)
 

Output:

2/b/d*(((1-cos(d*x+c))^3*csc(d*x+c)^3-csc(d*x+c)+cot(d*x+c))*B+2*I*B*(1/(c 
os(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(csc(d*x 
+c)-cot(d*x+c)),I)-2*I*B*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+ 
1))^(1/2)*EllipticE(I*(csc(d*x+c)-cot(d*x+c)),I)+2*I*C*(1/(cos(d*x+c)+1))^ 
(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(csc(d*x+c)-cot(d*x+c) 
),I))/((1-cos(d*x+c))^2*csc(d*x+c)^2-1)/(b*sec(d*x+c))^(1/2)
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.44 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {-i \, \sqrt {2} C \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} C \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{b^{2} d} \] Input:

integrate((B*sec(d*x+c)+C*sec(d*x+c)^2)/(b*sec(d*x+c))^(3/2),x, algorithm= 
"fricas")
 

Output:

(-I*sqrt(2)*C*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x 
+ c)) + I*sqrt(2)*C*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*si 
n(d*x + c)) + I*sqrt(2)*B*sqrt(b)*weierstrassZeta(-4, 0, weierstrassPInver 
se(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - I*sqrt(2)*B*sqrt(b)*weierstras 
sZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/( 
b^2*d)
 

Sympy [F]

\[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}}{\left (b \sec {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \] Input:

integrate((B*sec(d*x+c)+C*sec(d*x+c)**2)/(b*sec(d*x+c))**(3/2),x)
 

Output:

Integral((B + C*sec(c + d*x))*sec(c + d*x)/(b*sec(c + d*x))**(3/2), x)
 

Maxima [F]

\[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )}{\left (b \sec \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \] Input:

integrate((B*sec(d*x+c)+C*sec(d*x+c)^2)/(b*sec(d*x+c))^(3/2),x, algorithm= 
"maxima")
 

Output:

integrate((C*sec(d*x + c)^2 + B*sec(d*x + c))/(b*sec(d*x + c))^(3/2), x)
 

Giac [F]

\[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )}{\left (b \sec \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \] Input:

integrate((B*sec(d*x+c)+C*sec(d*x+c)^2)/(b*sec(d*x+c))^(3/2),x, algorithm= 
"giac")
 

Output:

integrate((C*sec(d*x + c)^2 + B*sec(d*x + c))/(b*sec(d*x + c))^(3/2), x)
 

Mupad [F(-1)]

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

int((B/cos(c + d*x) + C/cos(c + d*x)^2)/(b/cos(c + d*x))^(3/2),x)
                                                                                    
                                                                                    
 

Output:

int((B/cos(c + d*x) + C/cos(c + d*x)^2)/(b/cos(c + d*x))^(3/2), x)
 

Reduce [F]

\[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{(b \sec (c+d x))^{3/2}} \, dx=\frac {\sqrt {b}\, \left (\left (\int \frac {\sqrt {\sec \left (d x +c \right )}}{\sec \left (d x +c \right )}d x \right ) b +\left (\int \sqrt {\sec \left (d x +c \right )}d x \right ) c \right )}{b^{2}} \] Input:

int((B*sec(d*x+c)+C*sec(d*x+c)^2)/(b*sec(d*x+c))^(3/2),x)
 

Output:

(sqrt(b)*(int(sqrt(sec(c + d*x))/sec(c + d*x),x)*b + int(sqrt(sec(c + d*x) 
),x)*c))/b**2