Integrand size = 41, antiderivative size = 183 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{8} a^3 (15 A+20 B+28 C) x+\frac {a^3 C \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^3 (3 A+4 (B+C)) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {(3 A+4 B) \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{12 a d}+\frac {(15 A+20 B+12 C) \cos (c+d x) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{24 d} \] Output:
1/8*a^3*(15*A+20*B+28*C)*x+a^3*C*arctanh(sin(d*x+c))/d+5/8*a^3*(3*A+4*B+4* C)*sin(d*x+c)/d+1/4*A*cos(d*x+c)^3*(a+a*sec(d*x+c))^3*sin(d*x+c)/d+1/12*(3 *A+4*B)*cos(d*x+c)^2*(a^2+a^2*sec(d*x+c))^2*sin(d*x+c)/a/d+1/24*(15*A+20*B +12*C)*cos(d*x+c)*(a^3+a^3*sec(d*x+c))*sin(d*x+c)/d
Time = 1.15 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.80 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 \left (180 A d x+240 B d x+336 C d x-96 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+96 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+24 (13 A+15 B+12 C) \sin (c+d x)+24 (4 A+3 B+C) \sin (2 (c+d x))+24 A \sin (3 (c+d x))+8 B \sin (3 (c+d x))+3 A \sin (4 (c+d x))\right )}{96 d} \] Input:
Integrate[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Se c[c + d*x]^2),x]
Output:
(a^3*(180*A*d*x + 240*B*d*x + 336*C*d*x - 96*C*Log[Cos[(c + d*x)/2] - Sin[ (c + d*x)/2]] + 96*C*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 24*(13*A + 15*B + 12*C)*Sin[c + d*x] + 24*(4*A + 3*B + C)*Sin[2*(c + d*x)] + 24*A*Si n[3*(c + d*x)] + 8*B*Sin[3*(c + d*x)] + 3*A*Sin[4*(c + d*x)]))/(96*d)
Time = 1.05 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.244, Rules used = {3042, 4574, 3042, 4505, 3042, 4505, 27, 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 ^4(c+d x) (a \sec (c+d x)+a)^3 \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 \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 )^4}dx\) |
\(\Big \downarrow \) 4574 |
\(\displaystyle \frac {\int \cos ^3(c+d x) (\sec (c+d x) a+a)^3 (a (3 A+4 B)+4 a C \sec (c+d x))dx}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3 \left (a (3 A+4 B)+4 a C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 4505 |
\(\displaystyle \frac {\frac {1}{3} \int \cos ^2(c+d x) (\sec (c+d x) a+a)^2 \left ((15 A+20 B+12 C) a^2+12 C \sec (c+d x) a^2\right )dx+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left ((15 A+20 B+12 C) a^2+12 C \csc \left (c+d x+\frac {\pi }{2}\right ) a^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 4505 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int 3 \cos (c+d x) (\sec (c+d x) a+a) \left (5 (3 A+4 (B+C)) a^3+8 C \sec (c+d x) a^3\right )dx+\frac {(15 A+20 B+12 C) \sin (c+d x) \cos (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{2 d}\right )+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {3}{2} \int \cos (c+d x) (\sec (c+d x) a+a) \left (5 (3 A+4 (B+C)) a^3+8 C \sec (c+d x) a^3\right )dx+\frac {(15 A+20 B+12 C) \sin (c+d x) \cos (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{2 d}\right )+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {3}{2} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (5 (3 A+4 (B+C)) a^3+8 C \csc \left (c+d x+\frac {\pi }{2}\right ) a^3\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {(15 A+20 B+12 C) \sin (c+d x) \cos (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{2 d}\right )+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {3}{2} \left (\frac {5 a^4 (3 A+4 (B+C)) \sin (c+d x)}{d}-\int \left (-\left ((15 A+20 B+28 C) a^4\right )-8 C \sec (c+d x) a^4\right )dx\right )+\frac {(15 A+20 B+12 C) \sin (c+d x) \cos (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{2 d}\right )+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {3}{2} \left (\frac {5 a^4 (3 A+4 (B+C)) \sin (c+d x)}{d}+a^4 x (15 A+20 B+28 C)+\frac {8 a^4 C \text {arctanh}(\sin (c+d x))}{d}\right )+\frac {(15 A+20 B+12 C) \sin (c+d x) \cos (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{2 d}\right )+\frac {(3 A+4 B) \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{3 d}}{4 a}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d}\) |
Input:
Int[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
(A*Cos[c + d*x]^3*(a + a*Sec[c + d*x])^3*Sin[c + d*x])/(4*d) + (((3*A + 4* B)*Cos[c + d*x]^2*(a^2 + a^2*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + (((15*A + 20*B + 12*C)*Cos[c + d*x]*(a^4 + a^4*Sec[c + d*x])*Sin[c + d*x])/(2*d) + (3*(a^4*(15*A + 20*B + 28*C)*x + (8*a^4*C*ArcTanh[Sin[c + d*x]])/d + (5* a^4*(3*A + 4*(B + C))*Sin[c + d*x])/d))/2)/3)/(4*a)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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[a*A*Cot [e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x] - Sim p[b/(a*d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Sim p[a*A*(m - n - 1) - b*B*n - (a*B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, 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_.) + 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])
Time = 0.81 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.62
method | result | size |
parallelrisch | \(\frac {\left (-4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (4 A +3 B +C \right ) \sin \left (2 d x +2 c \right )+\left (A +\frac {B}{3}\right ) \sin \left (3 d x +3 c \right )+\frac {A \sin \left (4 d x +4 c \right )}{8}+\left (13 A +15 B +12 C \right ) \sin \left (d x +c \right )+\frac {15 x d \left (A +\frac {4 B}{3}+\frac {28 C}{15}\right )}{2}\right ) a^{3}}{4 d}\) | \(114\) |
derivativedivides | \(\frac {a^{3} A \sin \left (d x +c \right )+B \,a^{3} \left (d x +c \right )+a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 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 )+3 B \,a^{3} \sin \left (d x +c \right )+3 a^{3} C \left (d x +c \right )+a^{3} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )+3 B \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{3} C \sin \left (d x +c \right )+a^{3} A \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,a^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{3} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(245\) |
default | \(\frac {a^{3} A \sin \left (d x +c \right )+B \,a^{3} \left (d x +c \right )+a^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 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 )+3 B \,a^{3} \sin \left (d x +c \right )+3 a^{3} C \left (d x +c \right )+a^{3} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )+3 B \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{3} C \sin \left (d x +c \right )+a^{3} A \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,a^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{3} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(245\) |
risch | \(\frac {15 a^{3} A x}{8}+\frac {5 a^{3} B x}{2}+\frac {7 a^{3} x C}{2}+\frac {15 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{3}}{8 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a^{3} C}{2 d}-\frac {13 i a^{3} A \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {15 i B \,a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {13 i a^{3} A \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a^{3} C}{2 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {a^{3} A \sin \left (4 d x +4 c \right )}{32 d}+\frac {a^{3} A \sin \left (3 d x +3 c \right )}{4 d}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{3}}{12 d}+\frac {\sin \left (2 d x +2 c \right ) a^{3} A}{d}+\frac {3 \sin \left (2 d x +2 c \right ) B \,a^{3}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) a^{3} C}{4 d}\) | \(287\) |
norman | \(\frac {\left (\frac {15}{8} a^{3} A +\frac {5}{2} B \,a^{3}+\frac {7}{2} a^{3} C \right ) x +\left (-\frac {15}{2} a^{3} A -10 B \,a^{3}-14 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {15}{2} a^{3} A -10 B \,a^{3}-14 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {15}{8} a^{3} A +\frac {5}{2} B \,a^{3}+\frac {7}{2} a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{16}+\left (\frac {45}{4} a^{3} A +15 B \,a^{3}+21 a^{3} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-\frac {19 a^{3} \left (3 A +4 B +4 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{4 d}+\frac {5 a^{3} \left (3 A +4 B +4 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{15}}{4 d}-\frac {a^{3} \left (15 A +20 B +36 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{12 d}+\frac {a^{3} \left (49 A +44 B +28 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a^{3} \left (81 A +44 B +156 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {a^{3} \left (111 A +404 B +276 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{12 d}-\frac {a^{3} \left (369 A +236 B +108 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}+\frac {a^{3} \left (-52 B -68 C +57 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{4 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}+\frac {a^{3} C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a^{3} C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(454\) |
Input:
int(cos(d*x+c)^4*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x,meth od=_RETURNVERBOSE)
Output:
1/4*(-4*C*ln(tan(1/2*d*x+1/2*c)-1)+4*C*ln(tan(1/2*d*x+1/2*c)+1)+(4*A+3*B+C )*sin(2*d*x+2*c)+(A+1/3*B)*sin(3*d*x+3*c)+1/8*A*sin(4*d*x+4*c)+(13*A+15*B+ 12*C)*sin(d*x+c)+15/2*x*d*(A+4/3*B+28/15*C))*a^3/d
Time = 0.09 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.72 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (15 \, A + 20 \, B + 28 \, C\right )} a^{3} d x + 12 \, C a^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 12 \, C a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (6 \, A a^{3} \cos \left (d x + c\right )^{3} + 8 \, {\left (3 \, A + B\right )} a^{3} \cos \left (d x + c\right )^{2} + 3 \, {\left (15 \, A + 12 \, B + 4 \, C\right )} a^{3} \cos \left (d x + c\right ) + 8 \, {\left (9 \, A + 11 \, B + 9 \, C\right )} a^{3}\right )} \sin \left (d x + c\right )}{24 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="fricas")
Output:
1/24*(3*(15*A + 20*B + 28*C)*a^3*d*x + 12*C*a^3*log(sin(d*x + c) + 1) - 12 *C*a^3*log(-sin(d*x + c) + 1) + (6*A*a^3*cos(d*x + c)^3 + 8*(3*A + B)*a^3* cos(d*x + c)^2 + 3*(15*A + 12*B + 4*C)*a^3*cos(d*x + c) + 8*(9*A + 11*B + 9*C)*a^3)*sin(d*x + c))/d
Timed out. \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**4*(a+a*sec(d*x+c))**3*(A+B*sec(d*x+c)+C*sec(d*x+c)** 2),x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.31 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {96 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 96 \, {\left (d x + c\right )} B a^{3} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} - 288 \, {\left (d x + c\right )} C a^{3} - 48 \, 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 )} - 96 \, A a^{3} \sin \left (d x + c\right ) - 288 \, B a^{3} \sin \left (d x + c\right ) - 288 \, C a^{3} \sin \left (d x + c\right )}{96 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="maxima")
Output:
-1/96*(96*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^3 - 3*(12*d*x + 12*c + sin (4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*A*a^3 - 72*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^3 + 32*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a^3 - 72*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^3 - 96*(d*x + c)*B*a^3 - 24*(2*d*x + 2*c + sin(2* d*x + 2*c))*C*a^3 - 288*(d*x + c)*C*a^3 - 48*C*a^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) - 96*A*a^3*sin(d*x + c) - 288*B*a^3*sin(d*x + c) - 288*C*a^3*sin(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 286, normalized size of antiderivative = 1.56 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {24 \, C a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 24 \, C a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (15 \, A a^{3} + 20 \, B a^{3} + 28 \, C a^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (45 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 60 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 60 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 165 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 220 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 204 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 219 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 292 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 228 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 147 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 132 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 84 \, 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 )}^{4}}}{24 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="giac")
Output:
1/24*(24*C*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 24*C*a^3*log(abs(tan(1 /2*d*x + 1/2*c) - 1)) + 3*(15*A*a^3 + 20*B*a^3 + 28*C*a^3)*(d*x + c) + 2*( 45*A*a^3*tan(1/2*d*x + 1/2*c)^7 + 60*B*a^3*tan(1/2*d*x + 1/2*c)^7 + 60*C*a ^3*tan(1/2*d*x + 1/2*c)^7 + 165*A*a^3*tan(1/2*d*x + 1/2*c)^5 + 220*B*a^3*t an(1/2*d*x + 1/2*c)^5 + 204*C*a^3*tan(1/2*d*x + 1/2*c)^5 + 219*A*a^3*tan(1 /2*d*x + 1/2*c)^3 + 292*B*a^3*tan(1/2*d*x + 1/2*c)^3 + 228*C*a^3*tan(1/2*d *x + 1/2*c)^3 + 147*A*a^3*tan(1/2*d*x + 1/2*c) + 132*B*a^3*tan(1/2*d*x + 1 /2*c) + 84*C*a^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 12.96 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.33 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {45\,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 )+60\,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 )+84\,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 )+24\,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 )+12\,A\,a^3\,\sin \left (2\,c+2\,d\,x\right )+3\,A\,a^3\,\sin \left (3\,c+3\,d\,x\right )+\frac {3\,A\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{8}+9\,B\,a^3\,\sin \left (2\,c+2\,d\,x\right )+B\,a^3\,\sin \left (3\,c+3\,d\,x\right )+3\,C\,a^3\,\sin \left (2\,c+2\,d\,x\right )+39\,A\,a^3\,\sin \left (c+d\,x\right )+45\,B\,a^3\,\sin \left (c+d\,x\right )+36\,C\,a^3\,\sin \left (c+d\,x\right )}{12\,d} \] Input:
int(cos(c + d*x)^4*(a + a/cos(c + d*x))^3*(A + B/cos(c + d*x) + C/cos(c + d*x)^2),x)
Output:
(45*A*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) + 60*B*a^3*atan(sin( c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) + 84*C*a^3*atan(sin(c/2 + (d*x)/2)/cos( c/2 + (d*x)/2)) + 24*C*a^3*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) + 12*A*a^3*sin(2*c + 2*d*x) + 3*A*a^3*sin(3*c + 3*d*x) + (3*A*a^3*sin(4*c + 4*d*x))/8 + 9*B*a^3*sin(2*c + 2*d*x) + B*a^3*sin(3*c + 3*d*x) + 3*C*a^3*si n(2*c + 2*d*x) + 39*A*a^3*sin(c + d*x) + 45*B*a^3*sin(c + d*x) + 36*C*a^3* sin(c + d*x))/(12*d)
Time = 0.16 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.97 \[ \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{3} \left (-6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a +51 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a +36 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b +12 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c -24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) c +24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) c -24 \sin \left (d x +c \right )^{3} a -8 \sin \left (d x +c \right )^{3} b +96 \sin \left (d x +c \right ) a +96 \sin \left (d x +c \right ) b +72 \sin \left (d x +c \right ) c +45 a c +45 a d x +60 b c +60 b d x +84 c^{2}+84 c d x \right )}{24 d} \] Input:
int(cos(d*x+c)^4*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
(a**3*( - 6*cos(c + d*x)*sin(c + d*x)**3*a + 51*cos(c + d*x)*sin(c + d*x)* a + 36*cos(c + d*x)*sin(c + d*x)*b + 12*cos(c + d*x)*sin(c + d*x)*c - 24*l og(tan((c + d*x)/2) - 1)*c + 24*log(tan((c + d*x)/2) + 1)*c - 24*sin(c + d *x)**3*a - 8*sin(c + d*x)**3*b + 96*sin(c + d*x)*a + 96*sin(c + d*x)*b + 7 2*sin(c + d*x)*c + 45*a*c + 45*a*d*x + 60*b*c + 60*b*d*x + 84*c**2 + 84*c* d*x))/(24*d)