\(\int \frac {\sec ^3(c+d x) (B \sec (c+d x)+C \sec ^2(c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx\) [385]

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

Optimal result

Integrand size = 42, antiderivative size = 202 \[ \int \frac {\sec ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} (B-C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {4 (49 B-37 C) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (7 B-C) \sec ^2(c+d x) \tan (c+d x)}{35 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{7 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (7 B-31 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{105 a d} \] Output:

-2^(1/2)*(B-C)*arctan(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2 
))/a^(1/2)/d+4/105*(49*B-37*C)*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/35*(7 
*B-C)*sec(d*x+c)^2*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/7*C*sec(d*x+c)^3* 
tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)-2/105*(7*B-31*C)*(a+a*sec(d*x+c))^(1/2 
)*tan(d*x+c)/a/d
 

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.69 \[ \int \frac {\sec ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (-105 \sqrt {2} (B-C) \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )+2 \sqrt {1-\sec (c+d x)} \left (91 B-43 C+(-7 B+31 C) \sec (c+d x)+3 (7 B-C) \sec ^2(c+d x)+15 C \sec ^3(c+d x)\right )\right ) \tan (c+d x)}{105 d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \] Input:

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

Output:

((-105*Sqrt[2]*(B - C)*ArcTanh[Sqrt[1 - Sec[c + d*x]]/Sqrt[2]] + 2*Sqrt[1 
- Sec[c + d*x]]*(91*B - 43*C + (-7*B + 31*C)*Sec[c + d*x] + 3*(7*B - C)*Se 
c[c + d*x]^2 + 15*C*Sec[c + d*x]^3))*Tan[c + d*x])/(105*d*Sqrt[1 - Sec[c + 
 d*x]]*Sqrt[a*(1 + Sec[c + d*x])])
 

Rubi [A] (verified)

Time = 1.47 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.12, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4560, 3042, 4509, 27, 3042, 4509, 27, 3042, 4498, 27, 3042, 4489, 3042, 4282, 216}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4560

\(\displaystyle \int \frac {\sec ^4(c+d x) (B+C \sec (c+d x))}{\sqrt {a \sec (c+d x)+a}}dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4509

\(\displaystyle \frac {2 \int \frac {\sec ^3(c+d x) (6 a C+a (7 B-C) \sec (c+d x))}{2 \sqrt {\sec (c+d x) a+a}}dx}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\sec ^3(c+d x) (6 a C+a (7 B-C) \sec (c+d x))}{\sqrt {\sec (c+d x) a+a}}dx}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (6 a C+a (7 B-C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 4509

\(\displaystyle \frac {\frac {2 \int \frac {\sec ^2(c+d x) \left (4 a^2 (7 B-C)-a^2 (7 B-31 C) \sec (c+d x)\right )}{2 \sqrt {\sec (c+d x) a+a}}dx}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\int \frac {\sec ^2(c+d x) \left (4 a^2 (7 B-C)-a^2 (7 B-31 C) \sec (c+d x)\right )}{\sqrt {\sec (c+d x) a+a}}dx}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (4 a^2 (7 B-C)-a^2 (7 B-31 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 4498

\(\displaystyle \frac {\frac {\frac {2 \int -\frac {\sec (c+d x) \left (a^3 (7 B-31 C)-2 a^3 (49 B-37 C) \sec (c+d x)\right )}{2 \sqrt {\sec (c+d x) a+a}}dx}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {-\frac {\int \frac {\sec (c+d x) \left (a^3 (7 B-31 C)-2 a^3 (49 B-37 C) \sec (c+d x)\right )}{\sqrt {\sec (c+d x) a+a}}dx}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {-\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a^3 (7 B-31 C)-2 a^3 (49 B-37 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 4489

\(\displaystyle \frac {\frac {-\frac {105 a^3 (B-C) \int \frac {\sec (c+d x)}{\sqrt {\sec (c+d x) a+a}}dx-\frac {4 a^3 (49 B-37 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {-\frac {105 a^3 (B-C) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx-\frac {4 a^3 (49 B-37 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 4282

\(\displaystyle \frac {\frac {-\frac {-\frac {210 a^3 (B-C) \int \frac {1}{\frac {a^2 \tan ^2(c+d x)}{\sec (c+d x) a+a}+2 a}d\left (-\frac {a \tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{d}-\frac {4 a^3 (49 B-37 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {-\frac {\frac {105 \sqrt {2} a^{5/2} (B-C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{d}-\frac {4 a^3 (49 B-37 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 B-31 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 B-C) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\)

Input:

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

Output:

(2*C*Sec[c + d*x]^3*Tan[c + d*x])/(7*d*Sqrt[a + a*Sec[c + d*x]]) + ((2*a*( 
7*B - C)*Sec[c + d*x]^2*Tan[c + d*x])/(5*d*Sqrt[a + a*Sec[c + d*x]]) + ((- 
2*a*(7*B - 31*C)*Sqrt[a + a*Sec[c + d*x]]*Tan[c + d*x])/(3*d) - ((105*Sqrt 
[2]*a^(5/2)*(B - C)*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[ 
c + d*x]])])/d - (4*a^3*(49*B - 37*C)*Tan[c + d*x])/(d*Sqrt[a + a*Sec[c + 
d*x]]))/(3*a))/(5*a))/(7*a)
 

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 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

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

rule 4282
Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S 
ymbol] :> Simp[-2/f   Subst[Int[1/(2*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[ 
a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]
 

rule 4489
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs 
c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( 
a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[(a*B*m + A*b*(m + 1))/(b*(m + 
 1))   Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B 
, e, f, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b 
*(m + 1), 0] &&  !LtQ[m, -2^(-1)]
 

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

rule 4509
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*d* 
Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(f*(m + n))), 
 x] + Simp[d/(b*(m + n))   Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 
 1)*Simp[b*B*(n - 1) + (A*b*(m + n) + a*B*m)*Csc[e + f*x], x], x], x] /; Fr 
eeQ[{a, b, d, e, f, A, B, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] 
&& GtQ[n, 1]
 

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

Time = 1.17 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.24

method result size
default \(-\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\left (86 \cos \left (d x +c \right )^{3}-62 \cos \left (d x +c \right )^{2}+6 \cos \left (d x +c \right )-30\right ) C \tan \left (d x +c \right ) \sec \left (d x +c \right )^{2}+B \left (-182 \sin \left (d x +c \right )+14 \tan \left (d x +c \right )-42 \sec \left (d x +c \right ) \tan \left (d x +c \right )\right )+105 \sqrt {2}\, \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ) B -105 \sqrt {2}\, \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ) C \right )}{105 d a \left (\cos \left (d x +c \right )+1\right )}\) \(251\)
parts \(-\frac {B \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (-26 \sin \left (d x +c \right )+2 \tan \left (d x +c \right )-6 \sec \left (d x +c \right ) \tan \left (d x +c \right )+15 \sqrt {2}\, \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{15 d a \left (\cos \left (d x +c \right )+1\right )}+\frac {C \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\left (-86 \cos \left (d x +c \right )^{3}+62 \cos \left (d x +c \right )^{2}-6 \cos \left (d x +c \right )+30\right ) \tan \left (d x +c \right ) \sec \left (d x +c \right )^{2}+105 \sqrt {2}\, \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{105 d a \left (\cos \left (d x +c \right )+1\right )}\) \(279\)

Input:

int(sec(d*x+c)^3*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^(1/2),x,me 
thod=_RETURNVERBOSE)
 

Output:

-1/105/d/a*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1)*((86*cos(d*x+c)^3-62*co 
s(d*x+c)^2+6*cos(d*x+c)-30)*C*tan(d*x+c)*sec(d*x+c)^2+B*(-182*sin(d*x+c)+1 
4*tan(d*x+c)-42*sec(d*x+c)*tan(d*x+c))+105*2^(1/2)*(cos(d*x+c)+1)*(-cos(d* 
x+c)/(cos(d*x+c)+1))^(1/2)*ln((-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-cot(d*x 
+c)+csc(d*x+c))*B-105*2^(1/2)*(cos(d*x+c)+1)*(-cos(d*x+c)/(cos(d*x+c)+1))^ 
(1/2)*ln((-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-cot(d*x+c)+csc(d*x+c))*C)
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 432, normalized size of antiderivative = 2.14 \[ \int \frac {\sec ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {105 \, \sqrt {2} {\left ({\left (B - C\right )} a \cos \left (d x + c\right )^{4} + {\left (B - C\right )} a \cos \left (d x + c\right )^{3}\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left ({\left (91 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{3} - {\left (7 \, B - 31 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, B - C\right )} \cos \left (d x + c\right ) + 15 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{210 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}}, \frac {2 \, {\left ({\left (91 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{3} - {\left (7 \, B - 31 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, B - C\right )} \cos \left (d x + c\right ) + 15 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {105 \, \sqrt {2} {\left ({\left (B - C\right )} a \cos \left (d x + c\right )^{4} + {\left (B - C\right )} a \cos \left (d x + c\right )^{3}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{105 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}}\right ] \] Input:

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

Output:

[-1/210*(105*sqrt(2)*((B - C)*a*cos(d*x + c)^4 + (B - C)*a*cos(d*x + c)^3) 
*sqrt(-1/a)*log(-(2*sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(- 
1/a)*cos(d*x + c)*sin(d*x + c) - 3*cos(d*x + c)^2 - 2*cos(d*x + c) + 1)/(c 
os(d*x + c)^2 + 2*cos(d*x + c) + 1)) - 4*((91*B - 43*C)*cos(d*x + c)^3 - ( 
7*B - 31*C)*cos(d*x + c)^2 + 3*(7*B - C)*cos(d*x + c) + 15*C)*sqrt((a*cos( 
d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(a*d*cos(d*x + c)^4 + a*d*cos(d* 
x + c)^3), 1/105*(2*((91*B - 43*C)*cos(d*x + c)^3 - (7*B - 31*C)*cos(d*x + 
 c)^2 + 3*(7*B - C)*cos(d*x + c) + 15*C)*sqrt((a*cos(d*x + c) + a)/cos(d*x 
 + c))*sin(d*x + c) + 105*sqrt(2)*((B - C)*a*cos(d*x + c)^4 + (B - C)*a*co 
s(d*x + c)^3)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d 
*x + c)/(sqrt(a)*sin(d*x + c)))/sqrt(a))/(a*d*cos(d*x + c)^4 + a*d*cos(d*x 
 + c)^3)]
 

Sympy [F]

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

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

Output:

Integral((B + C*sec(c + d*x))*sec(c + d*x)**4/sqrt(a*(sec(c + d*x) + 1)), 
x)
 

Maxima [F]

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.87 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.25 \[ \int \frac {\sec ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\frac {105 \, \sqrt {2} {\left (B - C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {2 \, {\left (\frac {105 \, \sqrt {2} B a^{3}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - {\left ({\left (\frac {\sqrt {2} {\left (119 \, B a^{3} - 92 \, C a^{3}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {7 \, \sqrt {2} {\left (37 \, B a^{3} - 16 \, C a^{3}\right )}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {35 \, \sqrt {2} {\left (7 \, B a^{3} - 4 \, C a^{3}\right )}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{3} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{105 \, d} \] Input:

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

Output:

1/105*(105*sqrt(2)*(B - C)*log(abs(-sqrt(-a)*tan(1/2*d*x + 1/2*c) + sqrt(- 
a*tan(1/2*d*x + 1/2*c)^2 + a)))/(sqrt(-a)*sgn(cos(d*x + c))) - 2*(105*sqrt 
(2)*B*a^3/sgn(cos(d*x + c)) - ((sqrt(2)*(119*B*a^3 - 92*C*a^3)*tan(1/2*d*x 
 + 1/2*c)^2/sgn(cos(d*x + c)) - 7*sqrt(2)*(37*B*a^3 - 16*C*a^3)/sgn(cos(d* 
x + c)))*tan(1/2*d*x + 1/2*c)^2 + 35*sqrt(2)*(7*B*a^3 - 4*C*a^3)/sgn(cos(d 
*x + c)))*tan(1/2*d*x + 1/2*c)^2)*tan(1/2*d*x + 1/2*c)/((a*tan(1/2*d*x + 1 
/2*c)^2 - a)^3*sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)))/d
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(a)*(int((sqrt(sec(c + d*x) + 1)*sec(c + d*x)**5)/(sec(c + d*x) + 1), 
x)*c + int((sqrt(sec(c + d*x) + 1)*sec(c + d*x)**4)/(sec(c + d*x) + 1),x)* 
b))/a