Integrand size = 33, antiderivative size = 168 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} a \left (6 A b^2+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 A b (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {3 a b^2 (3 A-2 C) \tan (c+d x)}{2 d}-\frac {b^3 (4 A-C) \sec (c+d x) \tan (c+d x)}{2 d} \] Output:
1/2*a*(6*A*b^2+a^2*(A+2*C))*x+1/2*b*(2*A*b^2+(6*a^2+b^2)*C)*arctanh(sin(d* x+c))/d+3/2*A*b*(a+b*sec(d*x+c))^2*sin(d*x+c)/d+1/2*A*cos(d*x+c)*(a+b*sec( d*x+c))^3*sin(d*x+c)/d-3/2*a*b^2*(3*A-2*C)*tan(d*x+c)/d-1/2*b^3*(4*A-C)*se c(d*x+c)*tan(d*x+c)/d
Time = 3.21 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.71 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a \left (6 A b^2+a^2 (A+2 C)\right ) (c+d x)-2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b^3 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {12 a b^2 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}-\frac {b^3 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {12 a b^2 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )}+12 a^2 A b \sin (c+d x)+a^3 A \sin (2 (c+d x))}{4 d} \] Input:
Integrate[Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*(A + C*Sec[c + d*x]^2),x]
Output:
(2*a*(6*A*b^2 + a^2*(A + 2*C))*(c + d*x) - 2*b*(2*A*b^2 + (6*a^2 + b^2)*C) *Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 2*b*(2*A*b^2 + (6*a^2 + b^2)*C )*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (b^3*C)/(Cos[(c + d*x)/2] - S in[(c + d*x)/2])^2 + (12*a*b^2*C*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] - Sin [(c + d*x)/2]) - (b^3*C)/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2 + (12*a*b ^2*C*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 12*a^2*A*b* Sin[c + d*x] + a^3*A*Sin[2*(c + d*x)])/(4*d)
Time = 0.81 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3042, 4583, 3042, 4582, 3042, 4536, 2009}
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 ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4583 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x))^2 \left (-2 b (A-C) \sec ^2(c+d x)+a (A+2 C) \sec (c+d x)+3 A b\right )dx+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (-2 b (A-C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+a (A+2 C) \csc \left (c+d x+\frac {\pi }{2}\right )+3 A b\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 4582 |
\(\displaystyle \frac {1}{2} \left (\int (a+b \sec (c+d x)) \left ((A+2 C) a^2-b (A-4 C) \sec (c+d x) a+6 A b^2-2 b^2 (4 A-C) \sec ^2(c+d x)\right )dx+\frac {3 A b \sin (c+d x) (a+b \sec (c+d x))^2}{d}\right )+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left ((A+2 C) a^2-b (A-4 C) \csc \left (c+d x+\frac {\pi }{2}\right ) a+6 A b^2-2 b^2 (4 A-C) \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx+\frac {3 A b \sin (c+d x) (a+b \sec (c+d x))^2}{d}\right )+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 4536 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int \left (-6 a b^2 (3 A-2 C) \sec ^2(c+d x)+2 b \left (2 A b^2+\left (6 a^2+b^2\right ) C\right ) \sec (c+d x)+2 a \left ((A+2 C) a^2+6 A b^2\right )\right )dx+\frac {3 A b \sin (c+d x) (a+b \sec (c+d x))^2}{d}-\frac {b^3 (4 A-C) \tan (c+d x) \sec (c+d x)}{d}\right )+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (\frac {2 b \left (C \left (6 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{d}+2 a x \left (a^2 (A+2 C)+6 A b^2\right )-\frac {6 a b^2 (3 A-2 C) \tan (c+d x)}{d}\right )+\frac {3 A b \sin (c+d x) (a+b \sec (c+d x))^2}{d}-\frac {b^3 (4 A-C) \tan (c+d x) \sec (c+d x)}{d}\right )+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d}\) |
Input:
Int[Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*(A + C*Sec[c + d*x]^2),x]
Output:
(A*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(2*d) + ((3*A*b*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/d - (b^3*(4*A - C)*Sec[c + d*x]*Tan[c + d* x])/d + (2*a*(6*A*b^2 + a^2*(A + 2*C))*x + (2*b*(2*A*b^2 + (6*a^2 + b^2)*C )*ArcTanh[Sin[c + d*x]])/d - (6*a*b^2*(3*A - 2*C)*Tan[c + d*x])/d)/2)/2
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*(Cot[e + f*x]/(2*f)), x] + Simp[1/2 Int[Simp[2*A*a + (2*B*a + b*(2* A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a , b, e, f, A, B, C}, x]
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/(d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d* Csc[e + f*x])^(n + 1)*Simp[A*b*m - a*B*n - (b*B*n + a*(C*n + A*(n + 1)))*Cs c[e + f*x] - b*(C*n + A*(m + n + 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a , b, d, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && LeQ[n, -1]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[A*Co t[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/( d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Simp[A*b*m - a*(C*n + A*(n + 1))*Csc[e + f*x] - b*(C*n + A*(m + n + 1))*Csc[e + f*x]^ 2, x], x], x] /; FreeQ[{a, b, d, e, f, A, C}, x] && NeQ[a^2 - b^2, 0] && Gt Q[m, 0] && LeQ[n, -1]
Time = 1.37 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {a^{3} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{3} C \left (d x +c \right )+3 A \,a^{2} b \sin \left (d x +c \right )+3 a^{2} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a A \,b^{2} \left (d x +c \right )+3 C a \,b^{2} \tan \left (d x +c \right )+A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(157\) |
default | \(\frac {a^{3} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{3} C \left (d x +c \right )+3 A \,a^{2} b \sin \left (d x +c \right )+3 a^{2} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a A \,b^{2} \left (d x +c \right )+3 C a \,b^{2} \tan \left (d x +c \right )+A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \,b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(157\) |
parallelrisch | \(\frac {-8 \left (\left (A +\frac {C}{2}\right ) b^{2}+3 C \,a^{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+8 \left (\left (A +\frac {C}{2}\right ) b^{2}+3 C \,a^{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 a x d \left (6 A \,b^{2}+a^{2} \left (A +2 C \right )\right ) \cos \left (2 d x +2 c \right )+\left (2 a^{3} A +24 C a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+12 A \,a^{2} b \sin \left (3 d x +3 c \right )+a^{3} A \sin \left (4 d x +4 c \right )+\left (12 A \,a^{2} b +8 C \,b^{3}\right ) \sin \left (d x +c \right )+4 a x d \left (6 A \,b^{2}+a^{2} \left (A +2 C \right )\right )}{8 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(230\) |
risch | \(\frac {a^{3} A x}{2}+3 A a \,b^{2} x +a^{3} x C -\frac {i a^{3} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {3 i A \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i A \,a^{2} b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {i a^{3} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {i C \,b^{2} \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}-6 \,{\mathrm e}^{2 i \left (d x +c \right )} a -b \,{\mathrm e}^{i \left (d x +c \right )}-6 a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,a^{2}}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}\) | \(296\) |
norman | \(\frac {\left (\frac {1}{2} a^{3} A +3 a A \,b^{2}+a^{3} C \right ) x +\left (-\frac {1}{2} a^{3} A -3 a A \,b^{2}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {1}{2} a^{3} A -3 a A \,b^{2}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {1}{2} a^{3} A +3 a A \,b^{2}+a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (-a^{3} A -6 a A \,b^{2}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-a^{3} A -6 a A \,b^{2}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (2 a^{3} A +12 a A \,b^{2}+4 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (a^{3} A +6 A \,a^{2} b +6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (5 a^{3} A -18 A \,a^{2} b +6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {\left (a^{3} A -6 A \,a^{2} b +6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {2 \left (5 a^{3} A -6 A \,a^{2} b -6 C a \,b^{2}+C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {2 \left (5 a^{3} A +6 A \,a^{2} b -6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {\left (5 a^{3} A +18 A \,a^{2} b +6 C a \,b^{2}-C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {b \left (2 A \,b^{2}+6 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {b \left (2 A \,b^{2}+6 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(573\) |
Input:
int(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+C*sec(d*x+c)^2),x,method=_RETURNVER BOSE)
Output:
1/d*(a^3*A*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+a^3*C*(d*x+c)+3*A*a^2 *b*sin(d*x+c)+3*a^2*b*C*ln(sec(d*x+c)+tan(d*x+c))+3*a*A*b^2*(d*x+c)+3*C*a* b^2*tan(d*x+c)+A*b^3*ln(sec(d*x+c)+tan(d*x+c))+C*b^3*(1/2*sec(d*x+c)*tan(d *x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.10 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.02 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left ({\left (A + 2 \, C\right )} a^{3} + 6 \, A a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + {\left (6 \, C a^{2} b + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (6 \, C a^{2} b + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a^{3} \cos \left (d x + c\right )^{3} + 6 \, A a^{2} b \cos \left (d x + c\right )^{2} + 6 \, C a b^{2} \cos \left (d x + c\right ) + C b^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+C*sec(d*x+c)^2),x, algorithm= "fricas")
Output:
1/4*(2*((A + 2*C)*a^3 + 6*A*a*b^2)*d*x*cos(d*x + c)^2 + (6*C*a^2*b + (2*A + C)*b^3)*cos(d*x + c)^2*log(sin(d*x + c) + 1) - (6*C*a^2*b + (2*A + C)*b^ 3)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*(A*a^3*cos(d*x + c)^3 + 6*A*a ^2*b*cos(d*x + c)^2 + 6*C*a*b^2*cos(d*x + c) + C*b^3)*sin(d*x + c))/(d*cos (d*x + c)^2)
Timed out. \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**2*(a+b*sec(d*x+c))**3*(A+C*sec(d*x+c)**2),x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.07 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 4 \, {\left (d x + c\right )} C a^{3} + 12 \, {\left (d x + c\right )} A a b^{2} - C b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, C a^{2} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, A a^{2} b \sin \left (d x + c\right ) + 12 \, C a b^{2} \tan \left (d x + c\right )}{4 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+C*sec(d*x+c)^2),x, algorithm= "maxima")
Output:
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^3 + 4*(d*x + c)*C*a^3 + 12*(d*x + c)*A*a*b^2 - C*b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 6*C*a^2*b*(log(sin(d*x + c) + 1) - log( sin(d*x + c) - 1)) + 2*A*b^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1 )) + 12*A*a^2*b*sin(d*x + c) + 12*C*a*b^2*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 387 vs. \(2 (156) = 312\).
Time = 0.31 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.30 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (A a^{3} + 2 \, C a^{3} + 6 \, A a b^{2}\right )} {\left (d x + c\right )} + {\left (6 \, C a^{2} b + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (6 \, C a^{2} b + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1\right )}^{2}}}{2 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+C*sec(d*x+c)^2),x, algorithm= "giac")
Output:
1/2*((A*a^3 + 2*C*a^3 + 6*A*a*b^2)*(d*x + c) + (6*C*a^2*b + 2*A*b^3 + C*b^ 3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (6*C*a^2*b + 2*A*b^3 + C*b^3)*log( abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(A*a^3*tan(1/2*d*x + 1/2*c)^7 - 6*A*a^2 *b*tan(1/2*d*x + 1/2*c)^7 + 6*C*a*b^2*tan(1/2*d*x + 1/2*c)^7 - C*b^3*tan(1 /2*d*x + 1/2*c)^7 - 3*A*a^3*tan(1/2*d*x + 1/2*c)^5 + 6*A*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 6*C*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 3*C*b^3*tan(1/2*d*x + 1/2 *c)^5 + 3*A*a^3*tan(1/2*d*x + 1/2*c)^3 + 6*A*a^2*b*tan(1/2*d*x + 1/2*c)^3 - 6*C*a*b^2*tan(1/2*d*x + 1/2*c)^3 - 3*C*b^3*tan(1/2*d*x + 1/2*c)^3 - A*a^ 3*tan(1/2*d*x + 1/2*c) - 6*A*a^2*b*tan(1/2*d*x + 1/2*c) - 6*C*a*b^2*tan(1/ 2*d*x + 1/2*c) - C*b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^4 - 1)^ 2)/d
Time = 13.97 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.68 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,\left (\frac {A\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+A\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+C\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+\frac {C\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+3\,A\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+3\,C\,a^2\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\right )}{d}+\frac {\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {A\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{16}+\frac {C\,b^3\,\sin \left (c+d\,x\right )}{2}+\frac {3\,A\,a^2\,b\,\sin \left (c+d\,x\right )}{4}+\frac {3\,A\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4}+\frac {3\,C\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \] Input:
int(cos(c + d*x)^2*(A + C/cos(c + d*x)^2)*(a + b/cos(c + d*x))^3,x)
Output:
(2*((A*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/2 + A*b^3*atanh(si n(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) + C*a^3*atan(sin(c/2 + (d*x)/2)/cos(c /2 + (d*x)/2)) + (C*b^3*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/2 + 3*A*a*b^2*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) + 3*C*a^2*b*atanh(si n(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))))/d + ((A*a^3*sin(2*c + 2*d*x))/8 + ( A*a^3*sin(4*c + 4*d*x))/16 + (C*b^3*sin(c + d*x))/2 + (3*A*a^2*b*sin(c + d *x))/4 + (3*A*a^2*b*sin(3*c + 3*d*x))/4 + (3*C*a*b^2*sin(2*c + 2*d*x))/2)/ (d*(cos(2*c + 2*d*x)/2 + 1/2))
Time = 0.17 (sec) , antiderivative size = 518, normalized size of antiderivative = 3.08 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {-6 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a \,b^{2} c -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a^{2} b c +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a^{2} b c +2 \sin \left (d x +c \right )^{2} a^{3} c^{2}-6 a^{2} b^{2} c +\sin \left (d x +c \right )^{2} a^{4} c +6 \sin \left (d x +c \right )^{2} a^{2} b^{2} c -2 a^{3} c d x -6 a^{2} b^{2} d x +\sin \left (d x +c \right )^{2} a^{4} d x +2 \sin \left (d x +c \right )^{2} a^{3} c d x -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3} c +6 \sin \left (d x +c \right )^{3} a^{3} b -6 \sin \left (d x +c \right ) a^{3} b -\sin \left (d x +c \right ) b^{3} c +\cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a^{4}-\cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{4}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a \,b^{3}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3} c -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a \,b^{3}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a \,b^{3}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b^{3} c +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2} b c +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a \,b^{3}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b^{3} c -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2} b c +6 \sin \left (d x +c \right )^{2} a^{2} b^{2} d x -a^{4} d x -a^{4} c -2 a^{3} c^{2}}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+C*sec(d*x+c)^2),x)
Output:
(cos(c + d*x)*sin(c + d*x)**3*a**4 - cos(c + d*x)*sin(c + d*x)*a**4 - 6*co s(c + d*x)*sin(c + d*x)*a*b**2*c - 6*log(tan((c + d*x)/2) - 1)*sin(c + d*x )**2*a**2*b*c - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a*b**3 - log(t an((c + d*x)/2) - 1)*sin(c + d*x)**2*b**3*c + 6*log(tan((c + d*x)/2) - 1)* a**2*b*c + 2*log(tan((c + d*x)/2) - 1)*a*b**3 + log(tan((c + d*x)/2) - 1)* b**3*c + 6*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b*c + 2*log(tan( (c + d*x)/2) + 1)*sin(c + d*x)**2*a*b**3 + log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b**3*c - 6*log(tan((c + d*x)/2) + 1)*a**2*b*c - 2*log(tan((c + d*x)/2) + 1)*a*b**3 - log(tan((c + d*x)/2) + 1)*b**3*c + 6*sin(c + d*x)**3 *a**3*b + sin(c + d*x)**2*a**4*c + sin(c + d*x)**2*a**4*d*x + 2*sin(c + d* x)**2*a**3*c**2 + 2*sin(c + d*x)**2*a**3*c*d*x + 6*sin(c + d*x)**2*a**2*b* *2*c + 6*sin(c + d*x)**2*a**2*b**2*d*x - 6*sin(c + d*x)*a**3*b - sin(c + d *x)*b**3*c - a**4*c - a**4*d*x - 2*a**3*c**2 - 2*a**3*c*d*x - 6*a**2*b**2* c - 6*a**2*b**2*d*x)/(2*d*(sin(c + d*x)**2 - 1))