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

Optimal result
Mathematica [C] (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 = 25, antiderivative size = 110 \[ \int (b \sec (c+d x))^{3/2} \left (A+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 b^2 (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 b (5 A+3 C) \sqrt {b \sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 C (b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d} \] Output:

-2/5*b^2*(5*A+3*C)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d/cos(d*x+c)^(1/2 
)/(b*sec(d*x+c))^(1/2)+2/5*b*(5*A+3*C)*(b*sec(d*x+c))^(1/2)*sin(d*x+c)/d+2 
/5*C*(b*sec(d*x+c))^(3/2)*tan(d*x+c)/d
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 1.19 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.67 \[ \int (b \sec (c+d x))^{3/2} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 i e^{i (c+d x)} \cos ^3(c+d x) \left (-3 \left (5 A \left (1+e^{2 i (c+d x)}\right )^2+C \left (1+8 e^{2 i (c+d x)}+3 e^{4 i (c+d x)}\right )\right )+(5 A+3 C) \left (1+e^{2 i (c+d x)}\right )^{5/2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},-e^{2 i (c+d x)}\right )\right ) (b \sec (c+d x))^{3/2} \left (A+C \sec ^2(c+d x)\right )}{15 d \left (1+e^{2 i (c+d x)}\right )^2 (A+2 C+A \cos (2 (c+d x)))} \] Input:

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

Output:

(((4*I)/15)*E^(I*(c + d*x))*Cos[c + d*x]^3*(-3*(5*A*(1 + E^((2*I)*(c + d*x 
)))^2 + C*(1 + 8*E^((2*I)*(c + d*x)) + 3*E^((4*I)*(c + d*x)))) + (5*A + 3* 
C)*(1 + E^((2*I)*(c + d*x)))^(5/2)*Hypergeometric2F1[1/2, 3/4, 7/4, -E^((2 
*I)*(c + d*x))])*(b*Sec[c + d*x])^(3/2)*(A + C*Sec[c + d*x]^2))/(d*(1 + E^ 
((2*I)*(c + d*x)))^2*(A + 2*C + A*Cos[2*(c + d*x)]))
 

Rubi [A] (verified)

Time = 0.49 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.95, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3042, 4534, 3042, 4255, 3042, 4258, 3042, 3119}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4534

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

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} (5 A+3 C) \int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}dx+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {1}{5} (5 A+3 C) \left (\frac {2 b \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-b^2 \int \frac {1}{\sqrt {b \sec (c+d x)}}dx\right )+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} (5 A+3 C) \left (\frac {2 b \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-b^2 \int \frac {1}{\sqrt {b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx\right )+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

\(\Big \downarrow \) 4258

\(\displaystyle \frac {1}{5} (5 A+3 C) \left (\frac {2 b \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {b^2 \int \sqrt {\cos (c+d x)}dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\right )+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} (5 A+3 C) \left (\frac {2 b \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {b^2 \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\right )+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

\(\Big \downarrow \) 3119

\(\displaystyle \frac {1}{5} (5 A+3 C) \left (\frac {2 b \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {2 b^2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\right )+\frac {2 C \tan (c+d x) (b \sec (c+d x))^{3/2}}{5 d}\)

Input:

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

Output:

((5*A + 3*C)*((-2*b^2*EllipticE[(c + d*x)/2, 2])/(d*Sqrt[Cos[c + d*x]]*Sqr 
t[b*Sec[c + d*x]]) + (2*b*Sqrt[b*Sec[c + d*x]]*Sin[c + d*x])/d))/5 + (2*C* 
(b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)
 

Defintions of rubi rules used

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 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

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 4534
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) 
+ (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) 
)), x] + Simp[(C*m + A*(m + 1))/(m + 1)   Int[(b*Csc[e + f*x])^m, x], x] /; 
 FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 6.43 (sec) , antiderivative size = 370, normalized size of antiderivative = 3.36

method result size
default \(-\frac {2 b \left (5 i \left (\cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right )+1\right ) A \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 )+3 i \left (\cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right )+1\right ) 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 {EllipticE}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )+5 i \left (-\cos \left (d x +c \right )^{2}-2 \cos \left (d x +c \right )-1\right ) A \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 )+3 i \left (-\cos \left (d x +c \right )^{2}-2 \cos \left (d x +c \right )-1\right ) 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 )-5 A \sin \left (d x +c \right )+C \left (-3 \sin \left (d x +c \right )-\tan \left (d x +c \right )-\sec \left (d x +c \right ) \tan \left (d x +c \right )\right )\right ) \sqrt {b \sec \left (d x +c \right )}}{5 d \left (\cos \left (d x +c \right )+1\right )}\) \(370\)
parts \(\frac {2 A \left (i \left (\cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right )+1\right ) \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 )+i \left (-\cos \left (d x +c \right )^{2}-2 \cos \left (d x +c \right )-1\right ) \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 )+\sin \left (d x +c \right )\right ) \sqrt {b \sec \left (d x +c \right )}\, b}{d \left (\cos \left (d x +c \right )+1\right )}+\frac {2 C \sqrt {b \sec \left (d x +c \right )}\, b \left (3 \sin \left (d x +c \right )+\tan \left (d x +c \right )+\sec \left (d x +c \right ) \tan \left (d x +c \right )+i \left (3 \cos \left (d x +c \right )^{2}+6 \cos \left (d x +c \right )+3\right ) \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 )+i \left (-3 \cos \left (d x +c \right )^{2}-6 \cos \left (d x +c \right )-3\right ) \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 )\right )}{5 d \left (\cos \left (d x +c \right )+1\right )}\) \(389\)

Input:

int((b*sec(d*x+c))^(3/2)*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
 

Output:

-2/5/d*b*(5*I*(cos(d*x+c)^2+2*cos(d*x+c)+1)*A*(1/(cos(d*x+c)+1))^(1/2)*(co 
s(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticE(I*(csc(d*x+c)-cot(d*x+c)),I)+3*I* 
(cos(d*x+c)^2+2*cos(d*x+c)+1)*C*(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)+5*I*(-cos(d*x+c)^2 
-2*cos(d*x+c)-1)*A*(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)+3*I*(-cos(d*x+c)^2-2*cos(d*x+c) 
-1)*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)-5*A*sin(d*x+c)+C*(-3*sin(d*x+c)-tan(d*x+c)-s 
ec(d*x+c)*tan(d*x+c)))*(b*sec(d*x+c))^(1/2)/(cos(d*x+c)+1)
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.30 \[ \int (b \sec (c+d x))^{3/2} \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {-i \, \sqrt {2} {\left (5 \, A + 3 \, C\right )} b^{\frac {3}{2}} \cos \left (d x + c\right )^{2} {\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} {\left (5 \, A + 3 \, C\right )} b^{\frac {3}{2}} \cos \left (d x + c\right )^{2} {\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 ) + 2 \, {\left ({\left (5 \, A + 3 \, C\right )} b \cos \left (d x + c\right )^{2} + C b\right )} \sqrt {\frac {b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{5 \, d \cos \left (d x + c\right )^{2}} \] Input:

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

Output:

1/5*(-I*sqrt(2)*(5*A + 3*C)*b^(3/2)*cos(d*x + c)^2*weierstrassZeta(-4, 0, 
weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + I*sqrt(2)*(5* 
A + 3*C)*b^(3/2)*cos(d*x + c)^2*weierstrassZeta(-4, 0, weierstrassPInverse 
(-4, 0, cos(d*x + c) - I*sin(d*x + c))) + 2*((5*A + 3*C)*b*cos(d*x + c)^2 
+ C*b)*sqrt(b/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

sqrt(b)*b*(int(sqrt(sec(c + d*x))*sec(c + d*x)**3,x)*c + int(sqrt(sec(c + 
d*x))*sec(c + d*x),x)*a)