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

Optimal result
Mathematica [B] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 34, antiderivative size = 226 \[ \int (a+b \sec (c+d x))^{2/3} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\sqrt {2} C \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {5}{3},\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^{5/3} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)} \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{5/3}}+\frac {\sqrt {2} (b B-a C) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {2}{3},\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^{2/3} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)} \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{2/3}} \] Output:

2^(1/2)*C*AppellF1(1/2,-5/3,1/2,3/2,b*(1-sec(d*x+c))/(a+b),1/2-1/2*sec(d*x 
+c))*(a+b*sec(d*x+c))^(5/3)*tan(d*x+c)/b/d/(1+sec(d*x+c))^(1/2)/((a+b*sec( 
d*x+c))/(a+b))^(5/3)+2^(1/2)*(B*b-C*a)*AppellF1(1/2,-2/3,1/2,3/2,b*(1-sec( 
d*x+c))/(a+b),1/2-1/2*sec(d*x+c))*(a+b*sec(d*x+c))^(2/3)*tan(d*x+c)/b/d/(1 
+sec(d*x+c))^(1/2)/((a+b*sec(d*x+c))/(a+b))^(2/3)
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(21744\) vs. \(2(226)=452\).

Time = 29.52 (sec) , antiderivative size = 21744, normalized size of antiderivative = 96.21 \[ \int (a+b \sec (c+d x))^{2/3} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Result too large to show} \] Input:

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

Output:

Result too large to show
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.01, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3042, 4550, 27, 3042, 4321, 156, 155}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4550

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4321

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

\(\Big \downarrow \) 156

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

\(\Big \downarrow \) 155

\(\displaystyle \frac {\sqrt {2} (b B-a C) \tan (c+d x) (a+b \sec (c+d x))^{2/3} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {2}{3},\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1} \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{2/3}}+\frac {\sqrt {2} C (a+b) \tan (c+d x) (a+b \sec (c+d x))^{2/3} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {5}{3},\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1} \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{2/3}}\)

Input:

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

Output:

(Sqrt[2]*(a + b)*C*AppellF1[1/2, 1/2, -5/3, 3/2, (1 - Sec[c + d*x])/2, (b* 
(1 - Sec[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^(2/3)*Tan[c + d*x])/(b*d 
*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^(2/3)) + (Sqrt[2]*( 
b*B - a*C)*AppellF1[1/2, 1/2, -2/3, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec 
[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^(2/3)*Tan[c + d*x])/(b*d*Sqrt[1 
+ Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^(2/3))
 

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 155
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* 
Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ 
(b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, 
 m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] && GtQ[Sim 
plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] &&  !(GtQ[Simpl 
ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d 
*x, a + b*x]) &&  !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c 
- e*d)], 0] && SimplerQ[e + f*x, a + b*x])
 

rule 156
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p 
]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p])   Int[(a + b*x)^m*(c + d*x)^n*Si 
mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, 
 d, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] & 
& GtQ[Simplify[b/(b*c - a*d)], 0] &&  !GtQ[Simplify[b/(b*e - a*f)], 0]
 

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

rule 4321
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_ 
Symbol] :> Simp[Cot[e + f*x]/(f*Sqrt[1 + Csc[e + f*x]]*Sqrt[1 - Csc[e + f*x 
]])   Subst[Int[(a + b*x)^m/(Sqrt[1 + x]*Sqrt[1 - x]), x], x, Csc[e + f*x]] 
, x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b^2, 0] &&  !IntegerQ[2*m]
 

rule 4550
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. 
))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[1/b   Int 
[(a + b*Csc[e + f*x])^m*(A*b + (b*B - a*C)*Csc[e + f*x]), x], x] + Simp[C/b 
   Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, 
 f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] &&  !IntegerQ[2*m]
 
Maple [F]

\[\int \left (a +b \sec \left (d x +c \right )\right )^{\frac {2}{3}} \left (B \sec \left (d x +c \right )+C \sec \left (d x +c \right )^{2}\right )d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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