Integrand size = 40, antiderivative size = 108 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^3 (3 B+C) x+\frac {a^3 (6 B+7 C) \text {arctanh}(\sin (c+d x))}{2 d}-\frac {5 a^3 C \sin (c+d x)}{2 d}+\frac {a C (a+a \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {(B+2 C) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{d} \] Output:
a^3*(3*B+C)*x+1/2*a^3*(6*B+7*C)*arctanh(sin(d*x+c))/d-5/2*a^3*C*sin(d*x+c) /d+1/2*a*C*(a+a*sec(d*x+c))^2*sin(d*x+c)/d+(B+2*C)*(a^3+a^3*sec(d*x+c))*si n(d*x+c)/d
Time = 3.17 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.93 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 \left (12 B c+4 c C+12 B d x+4 C d x-12 B \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-14 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 B \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+14 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+4 B \sin (c+d x)+4 (B+3 C) \tan (c+d x)\right )}{4 d} \] Input:
Integrate[Cos[c + d*x]^2*(a + a*Sec[c + d*x])^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
(a^3*(12*B*c + 4*c*C + 12*B*d*x + 4*C*d*x - 12*B*Log[Cos[(c + d*x)/2] - Si n[(c + d*x)/2]] - 14*C*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 12*B*Log [Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 14*C*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + C/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2 - C/(Cos[(c + d*x) /2] + Sin[(c + d*x)/2])^2 + 4*B*Sin[c + d*x] + 4*(B + 3*C)*Tan[c + d*x]))/ (4*d)
Time = 0.78 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.02, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 4560, 3042, 4506, 3042, 4506, 25, 3042, 4484, 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 \sec (c+d x)+a)^3 \left (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 \left (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 )^2}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \cos (c+d x) (a \sec (c+d x)+a)^3 (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4506 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) (\sec (c+d x) a+a)^2 (a (2 B-C)+2 a (B+2 C) \sec (c+d x))dx+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (a (2 B-C)+2 a (B+2 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 4506 |
\(\displaystyle \frac {1}{2} \left (\int -\cos (c+d x) (\sec (c+d x) a+a) \left (5 a^2 C-a^2 (6 B+7 C) \sec (c+d x)\right )dx+\frac {2 (B+2 C) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {2 (B+2 C) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}-\int \cos (c+d x) (\sec (c+d x) a+a) \left (5 a^2 C-a^2 (6 B+7 C) \sec (c+d x)\right )dx\right )+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {2 (B+2 C) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}-\int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (5 a^2 C-a^2 (6 B+7 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\right )+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {1}{2} \left (\int \left (2 (3 B+C) a^3+(6 B+7 C) \sec (c+d x) a^3\right )dx+\frac {2 (B+2 C) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}-\frac {5 a^3 C \sin (c+d x)}{d}\right )+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (\frac {a^3 (6 B+7 C) \text {arctanh}(\sin (c+d x))}{d}+\frac {2 (B+2 C) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}+2 a^3 x (3 B+C)-\frac {5 a^3 C \sin (c+d x)}{d}\right )+\frac {a C \sin (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
Input:
Int[Cos[c + d*x]^2*(a + a*Sec[c + d*x])^3*(B*Sec[c + d*x] + C*Sec[c + d*x] ^2),x]
Output:
(a*C*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (2*a^3*(3*B + C)*x + (a^ 3*(6*B + 7*C)*ArcTanh[Sin[c + d*x]])/d - (5*a^3*C*Sin[c + d*x])/d + (2*(B + 2*C)*(a^3 + a^3*Sec[c + d*x])*Sin[c + d*x])/d)/2
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B* Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x] )^n*Simp[a*A*d*(m + n) + B*(b*d*n) + (A*b*d*(m + n) + a*B*d*(2*m + n - 1))* Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && GtQ[m, 1/2] && !LtQ[n, -1]
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]
Time = 0.58 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.27
method | result | size |
derivativedivides | \(\frac {B \,a^{3} \tan \left (d x +c \right )+a^{3} C \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 )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} C \tan \left (d x +c \right )+3 B \,a^{3} \left (d x +c \right )+3 a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \sin \left (d x +c \right )+a^{3} C \left (d x +c \right )}{d}\) | \(137\) |
default | \(\frac {B \,a^{3} \tan \left (d x +c \right )+a^{3} C \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 )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} C \tan \left (d x +c \right )+3 B \,a^{3} \left (d x +c \right )+3 a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \sin \left (d x +c \right )+a^{3} C \left (d x +c \right )}{d}\) | \(137\) |
parallelrisch | \(\frac {a^{3} \left (-6 \left (B +\frac {7 C}{6}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+6 \left (B +\frac {7 C}{6}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+6 d \left (B +\frac {C}{3}\right ) x \cos \left (2 d x +2 c \right )+\left (2 B +6 C \right ) \sin \left (2 d x +2 c \right )+B \sin \left (3 d x +3 c \right )+\sin \left (d x +c \right ) \left (B +2 C \right )+6 d \left (B +\frac {C}{3}\right ) x \right )}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(150\) |
risch | \(3 a^{3} B x +a^{3} x C -\frac {i B \,a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i B \,a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {i a^{3} \left (C \,{\mathrm e}^{3 i \left (d x +c \right )}-2 B \,{\mathrm e}^{2 i \left (d x +c \right )}-6 C \,{\mathrm e}^{2 i \left (d x +c \right )}-C \,{\mathrm e}^{i \left (d x +c \right )}-2 B -6 C \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}-\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}+\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}\) | \(217\) |
norman | \(\frac {\left (3 B \,a^{3}+a^{3} C \right ) x +\left (-6 B \,a^{3}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-6 B \,a^{3}-2 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-3 B \,a^{3}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-3 B \,a^{3}-a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (3 B \,a^{3}+a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (12 B \,a^{3}+4 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {a^{3} \left (4 B +7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {14 a^{3} C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {5 a^{3} C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {a^{3} \left (4 B -7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {2 a^{3} \left (4 B +5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {a^{3} \left (8 B +5 C \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 {a^{3} \left (6 B +7 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a^{3} \left (6 B +7 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(398\) |
Input:
int(cos(d*x+c)^2*(a+a*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method =_RETURNVERBOSE)
Output:
1/d*(B*a^3*tan(d*x+c)+a^3*C*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+t an(d*x+c)))+3*B*a^3*ln(sec(d*x+c)+tan(d*x+c))+3*a^3*C*tan(d*x+c)+3*B*a^3*( d*x+c)+3*a^3*C*ln(sec(d*x+c)+tan(d*x+c))+B*a^3*sin(d*x+c)+a^3*C*(d*x+c))
Time = 0.09 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.27 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, {\left (3 \, B + C\right )} a^{3} d x \cos \left (d x + c\right )^{2} + {\left (6 \, B + 7 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (6 \, B + 7 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, B a^{3} \cos \left (d x + c\right )^{2} + 2 \, {\left (B + 3 \, C\right )} a^{3} \cos \left (d x + c\right ) + C a^{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+a*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
Output:
1/4*(4*(3*B + C)*a^3*d*x*cos(d*x + c)^2 + (6*B + 7*C)*a^3*cos(d*x + c)^2*l og(sin(d*x + c) + 1) - (6*B + 7*C)*a^3*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*(2*B*a^3*cos(d*x + c)^2 + 2*(B + 3*C)*a^3*cos(d*x + c) + C*a^3)*sin (d*x + c))/(d*cos(d*x + c)^2)
Timed out. \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**2*(a+a*sec(d*x+c))**3*(B*sec(d*x+c)+C*sec(d*x+c)**2) ,x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.53 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {12 \, {\left (d x + c\right )} B a^{3} + 4 \, {\left (d x + c\right )} C a^{3} - C a^{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 \, B a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, C a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a^{3} \sin \left (d x + c\right ) + 4 \, B a^{3} \tan \left (d x + c\right ) + 12 \, C a^{3} \tan \left (d x + c\right )}{4 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+a*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
Output:
1/4*(12*(d*x + c)*B*a^3 + 4*(d*x + c)*C*a^3 - C*a^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*B*a^3* (log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 6*C*a^3*(log(sin(d*x + c ) + 1) - log(sin(d*x + c) - 1)) + 4*B*a^3*sin(d*x + c) + 4*B*a^3*tan(d*x + c) + 12*C*a^3*tan(d*x + c))/d
Time = 0.36 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.78 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\frac {4 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + 2 \, {\left (3 \, B a^{3} + C a^{3}\right )} {\left (d x + c\right )} + {\left (6 \, B a^{3} + 7 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (6 \, B a^{3} + 7 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7 \, C a^{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 )^{2} - 1\right )}^{2}}}{2 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+a*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
1/2*(4*B*a^3*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1) + 2*(3*B*a^ 3 + C*a^3)*(d*x + c) + (6*B*a^3 + 7*C*a^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (6*B*a^3 + 7*C*a^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(2*B*a^3* tan(1/2*d*x + 1/2*c)^3 + 5*C*a^3*tan(1/2*d*x + 1/2*c)^3 - 2*B*a^3*tan(1/2* d*x + 1/2*c) - 7*C*a^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^ 2)/d
Time = 11.72 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.92 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {6\,B\,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 )}{d}+\frac {6\,B\,a^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 )}{d}+\frac {2\,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 )}{d}+\frac {7\,C\,a^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 )}{d}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {3\,C\,a^3\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {C\,a^3\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2} \] Input:
int(cos(c + d*x)^2*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x) )^3,x)
Output:
(B*a^3*sin(c + d*x))/d + (6*B*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/ 2)))/d + (6*B*a^3*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*C*a ^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (7*C*a^3*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (B*a^3*sin(c + d*x))/(d*cos(c + d*x)) + (3*C*a^3*sin(c + d*x))/(d*cos(c + d*x)) + (C*a^3*sin(c + d*x))/(2*d*cos (c + d*x)^2)
Time = 0.17 (sec) , antiderivative size = 302, normalized size of antiderivative = 2.80 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{3} \left (-2 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b -6 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b -7 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} c +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +7 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) c +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b +7 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} c -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b -7 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) c +2 \sin \left (d x +c \right )^{3} b +6 \sin \left (d x +c \right )^{2} b c +6 \sin \left (d x +c \right )^{2} b d x +2 \sin \left (d x +c \right )^{2} c^{2}+2 \sin \left (d x +c \right )^{2} c d x -2 \sin \left (d x +c \right ) b -\sin \left (d x +c \right ) c -6 b c -6 b d x -2 c^{2}-2 c d x \right )}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(cos(d*x+c)^2*(a+a*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
(a**3*( - 2*cos(c + d*x)*sin(c + d*x)*b - 6*cos(c + d*x)*sin(c + d*x)*c - 6*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b - 7*log(tan((c + d*x)/2) - 1 )*sin(c + d*x)**2*c + 6*log(tan((c + d*x)/2) - 1)*b + 7*log(tan((c + d*x)/ 2) - 1)*c + 6*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b + 7*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*c - 6*log(tan((c + d*x)/2) + 1)*b - 7*log(ta n((c + d*x)/2) + 1)*c + 2*sin(c + d*x)**3*b + 6*sin(c + d*x)**2*b*c + 6*si n(c + d*x)**2*b*d*x + 2*sin(c + d*x)**2*c**2 + 2*sin(c + d*x)**2*c*d*x - 2 *sin(c + d*x)*b - sin(c + d*x)*c - 6*b*c - 6*b*d*x - 2*c**2 - 2*c*d*x))/(2 *d*(sin(c + d*x)**2 - 1))