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

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

Optimal result

Integrand size = 41, antiderivative size = 144 \[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{3/2} (3 A+2 B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{d}-\frac {a^2 (3 A-6 B-8 C) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}-\frac {a (3 A-2 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d} \] Output:

a^(3/2)*(3*A+2*B)*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d+A*(a 
+a*sec(d*x+c))^(3/2)*sin(d*x+c)/d-1/3*a^2*(3*A-6*B-8*C)*tan(d*x+c)/d/(a+a* 
sec(d*x+c))^(1/2)-1/3*a*(3*A-2*C)*(a+a*sec(d*x+c))^(1/2)*tan(d*x+c)/d
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 2.79 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.80 \[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a \sqrt {a (1+\sec (c+d x))} \left (6 (3 A+2 B) \arctan \left (\sqrt {-1+\sec (c+d x)}\right )+\sqrt {-1+\sec (c+d x)} (4 (3 B+5 C)+(3 A+4 C+3 A \cos (2 (c+d x))) \sec (c+d x))\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{6 d \sqrt {-1+\sec (c+d x)}} \] Input:

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

Output:

(a*Sqrt[a*(1 + Sec[c + d*x])]*(6*(3*A + 2*B)*ArcTan[Sqrt[-1 + Sec[c + d*x] 
]] + Sqrt[-1 + Sec[c + d*x]]*(4*(3*B + 5*C) + (3*A + 4*C + 3*A*Cos[2*(c + 
d*x)])*Sec[c + d*x]))*Tan[(c + d*x)/2])/(6*d*Sqrt[-1 + Sec[c + d*x]])
 

Rubi [A] (verified)

Time = 0.93 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.10, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.293, Rules used = {3042, 4574, 27, 3042, 4405, 27, 3042, 4403, 3042, 4261, 216, 4279}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4574

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4405

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4403

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4261

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

\(\Big \downarrow \) 216

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

\(\Big \downarrow \) 4279

\(\displaystyle \frac {\frac {1}{3} \left (\frac {6 a^{5/2} (3 A+2 B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}-\frac {2 a^3 (3 A-6 B-8 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}\right )-\frac {2 a^2 (3 A-2 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{2 a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^{3/2}}{d}\)

Input:

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

Output:

(A*(a + a*Sec[c + d*x])^(3/2)*Sin[c + d*x])/d + ((-2*a^2*(3*A - 2*C)*Sqrt[ 
a + a*Sec[c + d*x]]*Tan[c + d*x])/(3*d) + ((6*a^(5/2)*(3*A + 2*B)*ArcTan[( 
Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d - (2*a^3*(3*A - 6*B - 8 
*C)*Tan[c + d*x])/(d*Sqrt[a + a*Sec[c + d*x]]))/3)/(2*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 4261
Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*(b/d) 
  Subst[Int[1/(a + x^2), x], x, b*(Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], 
 x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
 

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

rule 4403
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_ 
.) + (c_)), x_Symbol] :> Simp[c   Int[Sqrt[a + b*Csc[e + f*x]], x], x] + Si 
mp[d   Int[Sqrt[a + b*Csc[e + f*x]]*Csc[e + f*x], x], x] /; FreeQ[{a, b, c, 
 d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
 

rule 4405
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d 
_.) + (c_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m 
 - 1)/(f*m)), x] + Simp[1/m   Int[(a + b*Csc[e + f*x])^(m - 1)*Simp[a*c*m + 
 (b*c*m + a*d*(2*m - 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, 
f}, x] && NeQ[b*c - a*d, 0] && GtQ[m, 1] && EqQ[a^2 - b^2, 0] && IntegerQ[2 
*m]
 

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

Time = 10.12 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.70

method result size
default \(\frac {a \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\left (9 \cos \left (d x +c \right )+9\right ) A \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{\sqrt {\csc \left (d x +c \right )^{2}-2 \csc \left (d x +c \right ) \cot \left (d x +c \right )+\cot \left (d x +c \right )^{2}-1}}\right )+\left (6 \cos \left (d x +c \right )+6\right ) B \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{\sqrt {\csc \left (d x +c \right )^{2}-2 \csc \left (d x +c \right ) \cot \left (d x +c \right )+\cot \left (d x +c \right )^{2}-1}}\right )+3 A \sin \left (d x +c \right ) \cos \left (d x +c \right )+6 B \sin \left (d x +c \right )+C \left (10 \sin \left (d x +c \right )+2 \tan \left (d x +c \right )\right )\right )}{3 d \left (\cos \left (d x +c \right )+1\right )}\) \(245\)

Input:

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

Output:

1/3/d*a*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1)*((9*cos(d*x+c)+9)*A*(-cos( 
d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(2^(1/2)/(csc(d*x+c)^2-2*csc(d*x+c)*co 
t(d*x+c)+cot(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c)))+(6*cos(d*x+c)+6)*B 
*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(2^(1/2)/(csc(d*x+c)^2-2*csc(d* 
x+c)*cot(d*x+c)+cot(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c)))+3*A*sin(d*x 
+c)*cos(d*x+c)+6*B*sin(d*x+c)+C*(10*sin(d*x+c)+2*tan(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 366, normalized size of antiderivative = 2.54 \[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\left [\frac {3 \, {\left ({\left (3 \, A + 2 \, B\right )} a \cos \left (d x + c\right )^{2} + {\left (3 \, A + 2 \, B\right )} a \cos \left (d x + c\right )\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (3 \, A a \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, B + 5 \, C\right )} a \cos \left (d x + c\right ) + 2 \, C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}, -\frac {3 \, {\left ({\left (3 \, A + 2 \, B\right )} a \cos \left (d x + c\right )^{2} + {\left (3 \, A + 2 \, B\right )} a \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\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 ) - {\left (3 \, A a \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, B + 5 \, C\right )} a \cos \left (d x + c\right ) + 2 \, C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}\right ] \] Input:

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

Output:

[1/6*(3*((3*A + 2*B)*a*cos(d*x + c)^2 + (3*A + 2*B)*a*cos(d*x + c))*sqrt(- 
a)*log((2*a*cos(d*x + c)^2 - 2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x 
+ c))*cos(d*x + c)*sin(d*x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)) 
+ 2*(3*A*a*cos(d*x + c)^2 + 2*(3*B + 5*C)*a*cos(d*x + c) + 2*C*a)*sqrt((a* 
cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2 + d*cos(d* 
x + c)), -1/3*(3*((3*A + 2*B)*a*cos(d*x + c)^2 + (3*A + 2*B)*a*cos(d*x + c 
))*sqrt(a)*arctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sq 
rt(a)*sin(d*x + c))) - (3*A*a*cos(d*x + c)^2 + 2*(3*B + 5*C)*a*cos(d*x + c 
) + 2*C*a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d* 
x + c)^2 + d*cos(d*x + c))]
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1801 vs. \(2 (128) = 256\).

Time = 0.30 (sec) , antiderivative size = 1801, normalized size of antiderivative = 12.51 \[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*((2*(a*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(d* 
x + c) - (a*cos(d*x + c) - a)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x 
+ 2*c) + 1)))*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c 
) + 1)^(1/4)*sqrt(a) + 3*(a*arctan2(-(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c 
)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos 
(2*d*x + 2*c) + 1))*sin(d*x + c) - cos(d*x + c)*sin(1/2*arctan2(sin(2*d*x 
+ 2*c), cos(2*d*x + 2*c) + 1))), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 
+ 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(d*x + c)*cos(1/2*arctan2(sin(2*d*x + 
2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c)*sin(1/2*arctan2(sin(2*d*x + 2* 
c), cos(2*d*x + 2*c) + 1))) + 1) - a*arctan2(-(cos(2*d*x + 2*c)^2 + sin(2* 
d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 
2*c), cos(2*d*x + 2*c) + 1))*sin(d*x + c) - cos(d*x + c)*sin(1/2*arctan2(s 
in(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))), (cos(2*d*x + 2*c)^2 + sin(2*d*x 
+ 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(d*x + c)*cos(1/2*arctan2(sin 
(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c)*sin(1/2*arctan2(sin(2 
*d*x + 2*c), cos(2*d*x + 2*c) + 1))) - 1) - a*arctan2((cos(2*d*x + 2*c)^2 
+ sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2 
*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c 
)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos( 
2*d*x + 2*c) + 1)) + 1) + a*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 472 vs. \(2 (128) = 256\).

Time = 0.96 (sec) , antiderivative size = 472, normalized size of antiderivative = 3.28 \[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \] Input:

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

Output:

-1/6*(3*(3*A*sqrt(-a)*a*sgn(cos(d*x + c)) + 2*B*sqrt(-a)*a*sgn(cos(d*x + 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))^2 - a*(2*sqrt(2) + 3))) - 3*(3*A*sqrt(-a)*a*sgn(cos(d*x + c)) + 2* 
B*sqrt(-a)*a*sgn(cos(d*x + c)))*log(abs((sqrt(-a)*tan(1/2*d*x + 1/2*c) - s 
qrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 + a*(2*sqrt(2) - 3))) + 4*(3*sqrt(2) 
*B*a^3*sgn(cos(d*x + c)) + 6*sqrt(2)*C*a^3*sgn(cos(d*x + c)) - (3*sqrt(2)* 
B*a^3*sgn(cos(d*x + c)) + 4*sqrt(2)*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)*sqrt(-a*ta 
n(1/2*d*x + 1/2*c)^2 + a)) + 12*(3*sqrt(2)*(sqrt(-a)*tan(1/2*d*x + 1/2*c) 
- sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*A*sqrt(-a)*a^2*sgn(cos(d*x + c)) 
- sqrt(2)*A*sqrt(-a)*a^3*sgn(cos(d*x + c)))/((sqrt(-a)*tan(1/2*d*x + 1/2*c 
) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4 - 6*(sqrt(-a)*tan(1/2*d*x + 1/2 
*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*a + a^2))/d
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\sqrt {a}\, a \left (\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \cos \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 )+1}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}d x \right ) b +\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}d x \right ) c +\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )d x \right ) a +\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )d x \right ) b +\left (\int \sqrt {\sec \left (d x +c \right )+1}\, \cos \left (d x +c \right )d x \right ) a \right ) \] Input:

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

Output:

sqrt(a)*a*(int(sqrt(sec(c + d*x) + 1)*cos(c + d*x)*sec(c + d*x)**3,x)*c + 
int(sqrt(sec(c + d*x) + 1)*cos(c + d*x)*sec(c + d*x)**2,x)*b + int(sqrt(se 
c(c + d*x) + 1)*cos(c + d*x)*sec(c + d*x)**2,x)*c + int(sqrt(sec(c + d*x) 
+ 1)*cos(c + d*x)*sec(c + d*x),x)*a + int(sqrt(sec(c + d*x) + 1)*cos(c + d 
*x)*sec(c + d*x),x)*b + int(sqrt(sec(c + d*x) + 1)*cos(c + d*x),x)*a)