Integrand size = 31, antiderivative size = 145 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {1}{2} \left (3 a^2 A b+2 A b^3+a^3 B+6 a b^2 B\right ) x+\frac {b^3 B \text {arctanh}(\sin (c+d x))}{d}+\frac {a \left (2 a^2 A+8 A b^2+9 a b B\right ) \sin (c+d x)}{3 d}+\frac {a^2 (5 A b+3 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a A \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d} \] Output:
1/2*(3*A*a^2*b+2*A*b^3+B*a^3+6*B*a*b^2)*x+b^3*B*arctanh(sin(d*x+c))/d+1/3* a*(2*A*a^2+8*A*b^2+9*B*a*b)*sin(d*x+c)/d+1/6*a^2*(5*A*b+3*B*a)*cos(d*x+c)* sin(d*x+c)/d+1/3*a*A*cos(d*x+c)^2*(a+b*sec(d*x+c))^2*sin(d*x+c)/d
Time = 1.48 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.10 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {6 \left (3 a^2 A b+2 A b^3+a^3 B+6 a b^2 B\right ) (c+d x)-12 b^3 B \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 b^3 B \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 a \left (a^2 A+4 A b^2+4 a b B\right ) \sin (c+d x)+3 a^2 (3 A b+a B) \sin (2 (c+d x))+a^3 A \sin (3 (c+d x))}{12 d} \] Input:
Integrate[Cos[c + d*x]^3*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]
Output:
(6*(3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B)*(c + d*x) - 12*b^3*B*Log[Cos[ (c + d*x)/2] - Sin[(c + d*x)/2]] + 12*b^3*B*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 9*a*(a^2*A + 4*A*b^2 + 4*a*b*B)*Sin[c + d*x] + 3*a^2*(3*A*b + a*B)*Sin[2*(c + d*x)] + a^3*A*Sin[3*(c + d*x)])/(12*d)
Time = 1.00 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.05, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.419, Rules used = {3042, 4513, 25, 3042, 4562, 25, 3042, 4535, 24, 3042, 4533, 3042, 4257}
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 ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4513 |
\(\displaystyle \frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}-\frac {1}{3} \int -\cos ^2(c+d x) (a+b \sec (c+d x)) \left (3 b^2 B \sec ^2(c+d x)+\left (2 A a^2+6 b B a+3 A b^2\right ) \sec (c+d x)+a (5 A b+3 a B)\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{3} \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (3 b^2 B \sec ^2(c+d x)+\left (2 A a^2+6 b B a+3 A b^2\right ) \sec (c+d x)+a (5 A b+3 a B)\right )dx+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (3 b^2 B \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (2 A a^2+6 b B a+3 A b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+a (5 A b+3 a B)\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4562 |
\(\displaystyle \frac {1}{3} \left (\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}-\frac {1}{2} \int -\cos (c+d x) \left (6 B \sec ^2(c+d x) b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )+3 \left (B a^3+3 A b a^2+6 b^2 B a+2 A b^3\right ) \sec (c+d x)\right )dx\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \int \cos (c+d x) \left (6 B \sec ^2(c+d x) b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )+3 \left (B a^3+3 A b a^2+6 b^2 B a+2 A b^3\right ) \sec (c+d x)\right )dx+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \int \frac {6 B \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )+3 \left (B a^3+3 A b a^2+6 b^2 B a+2 A b^3\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (\int \cos (c+d x) \left (6 B \sec ^2(c+d x) b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )\right )dx+3 \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right ) \int 1dx\right )+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (\int \cos (c+d x) \left (6 B \sec ^2(c+d x) b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )\right )dx+3 x \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right )\right )+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (\int \frac {6 B \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+2 a \left (2 A a^2+9 b B a+8 A b^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+3 x \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right )\right )+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (6 b^3 B \int \sec (c+d x)dx+\frac {2 a \left (2 a^2 A+9 a b B+8 A b^2\right ) \sin (c+d x)}{d}+3 x \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right )\right )+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (6 b^3 B \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {2 a \left (2 a^2 A+9 a b B+8 A b^2\right ) \sin (c+d x)}{d}+3 x \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right )\right )+\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{3} \left (\frac {a^2 (3 a B+5 A b) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {1}{2} \left (\frac {2 a \left (2 a^2 A+9 a b B+8 A b^2\right ) \sin (c+d x)}{d}+3 x \left (a^3 B+3 a^2 A b+6 a b^2 B+2 A b^3\right )+\frac {6 b^3 B \text {arctanh}(\sin (c+d x))}{d}\right )\right )+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}\) |
Input:
Int[Cos[c + d*x]^3*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]
Output:
(a*A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + ((a^2*(5* A*b + 3*a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (3*(3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B)*x + (6*b^3*B*ArcTanh[Sin[c + d*x]])/d + (2*a*(2*a^2*A + 8*A*b^2 + 9*a*b*B)*Sin[c + d*x])/d)/2)/3
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
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[1/(d*n) Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^(n + 1)*Simp[ a*(a*B*n - A*b*(m - n - 1)) + (2*a*b*B*n + A*(b^2*n + a^2*(1 + n)))*Csc[e + f*x] + b*(b*B*n + a*A*(m + n))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] & & LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, 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 _)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Si mp[1/(d*n) Int[(d*Csc[e + f*x])^(n + 1)*Simp[n*(B*a + A*b) + (n*(a*C + B* b) + A*a*(n + 1))*Csc[e + f*x] + b*C*n*Csc[e + f*x]^2, x], x], x] /; FreeQ[ {a, b, d, e, f, A, B, C}, x] && LtQ[n, -1]
Time = 0.71 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.94
method | result | size |
parallelrisch | \(\frac {-12 B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3}+12 B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3}+\left (9 A \,a^{2} b +3 B \,a^{3}\right ) \sin \left (2 d x +2 c \right )+a^{3} A \sin \left (3 d x +3 c \right )+9 a \left (A \,a^{2}+4 A \,b^{2}+4 B a b \right ) \sin \left (d x +c \right )+18 \left (A \,a^{2} b +\frac {2}{3} A \,b^{3}+\frac {1}{3} B \,a^{3}+2 B a \,b^{2}\right ) x d}{12 d}\) | \(137\) |
derivativedivides | \(\frac {\frac {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 \,a^{2} b \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^{2} b \sin \left (d x +c \right )+3 A a \,b^{2} \sin \left (d x +c \right )+3 B a \,b^{2} \left (d x +c \right )+A \,b^{3} \left (d x +c \right )+B \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(151\) |
default | \(\frac {\frac {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 \,a^{2} b \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^{2} b \sin \left (d x +c \right )+3 A a \,b^{2} \sin \left (d x +c \right )+3 B a \,b^{2} \left (d x +c \right )+A \,b^{3} \left (d x +c \right )+B \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(151\) |
risch | \(\frac {3 A \,a^{2} b x}{2}+x A \,b^{3}+\frac {B \,a^{3} x}{2}+3 x B a \,b^{2}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a^{3} A}{8 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} A a \,b^{2}}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{2} b}{2 d}+\frac {3 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 a \,b^{2}}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{2} b}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,b^{3}}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,b^{3}}{d}+\frac {a^{3} A \sin \left (3 d x +3 c \right )}{12 d}+\frac {3 \sin \left (2 d x +2 c \right ) A \,a^{2} b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{3}}{4 d}\) | \(247\) |
norman | \(\frac {\left (-\frac {3}{2} A \,a^{2} b -A \,b^{3}-\frac {1}{2} B \,a^{3}-3 B a \,b^{2}\right ) x +\left (-\frac {9}{2} A \,a^{2} b -3 A \,b^{3}-\frac {3}{2} B \,a^{3}-9 B a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {3}{2} A \,a^{2} b +A \,b^{3}+\frac {1}{2} B \,a^{3}+3 B a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {9}{2} A \,a^{2} b +3 A \,b^{3}+\frac {3}{2} B \,a^{3}+9 B a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {a \left (2 A \,a^{2}-3 A a b +6 A \,b^{2}-B \,a^{2}+6 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}+\frac {2 a \left (2 A \,a^{2}-3 A a b -6 A \,b^{2}-B \,a^{2}-6 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {2 a \left (2 A \,a^{2}+3 A a b -6 A \,b^{2}+B \,a^{2}-6 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {a \left (2 A \,a^{2}+3 A a b +6 A \,b^{2}+B \,a^{2}+6 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {a \left (14 A \,a^{2}-27 A a b +18 A \,b^{2}-9 B \,a^{2}+18 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}+\frac {a \left (14 A \,a^{2}+27 A a b +18 A \,b^{2}+9 B \,a^{2}+18 B a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {B \,b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {B \,b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(494\) |
Input:
int(cos(d*x+c)^3*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x,method=_RETURNVERBO SE)
Output:
1/12*(-12*B*ln(tan(1/2*d*x+1/2*c)-1)*b^3+12*B*ln(tan(1/2*d*x+1/2*c)+1)*b^3 +(9*A*a^2*b+3*B*a^3)*sin(2*d*x+2*c)+a^3*A*sin(3*d*x+3*c)+9*a*(A*a^2+4*A*b^ 2+4*B*a*b)*sin(d*x+c)+18*(A*a^2*b+2/3*A*b^3+1/3*B*a^3+2*B*a*b^2)*x*d)/d
Time = 0.09 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.90 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {3 \, B b^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, B b^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (B a^{3} + 3 \, A a^{2} b + 6 \, B a b^{2} + 2 \, A b^{3}\right )} d x + {\left (2 \, A a^{3} \cos \left (d x + c\right )^{2} + 4 \, A a^{3} + 18 \, B a^{2} b + 18 \, A a b^{2} + 3 \, {\left (B a^{3} + 3 \, A a^{2} b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="f ricas")
Output:
1/6*(3*B*b^3*log(sin(d*x + c) + 1) - 3*B*b^3*log(-sin(d*x + c) + 1) + 3*(B *a^3 + 3*A*a^2*b + 6*B*a*b^2 + 2*A*b^3)*d*x + (2*A*a^3*cos(d*x + c)^2 + 4* A*a^3 + 18*B*a^2*b + 18*A*a*b^2 + 3*(B*a^3 + 3*A*a^2*b)*cos(d*x + c))*sin( d*x + c))/d
Timed out. \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**3*(a+b*sec(d*x+c))**3*(A+B*sec(d*x+c)),x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.05 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 9 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} b - 36 \, {\left (d x + c\right )} B a b^{2} - 12 \, {\left (d x + c\right )} A b^{3} - 6 \, B b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, B a^{2} b \sin \left (d x + c\right ) - 36 \, A a b^{2} \sin \left (d x + c\right )}{12 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="m axima")
Output:
-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^3 - 3*(2*d*x + 2*c + sin(2* d*x + 2*c))*B*a^3 - 9*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^2*b - 36*(d*x + c)*B*a*b^2 - 12*(d*x + c)*A*b^3 - 6*B*b^3*(log(sin(d*x + c) + 1) - log(si n(d*x + c) - 1)) - 36*B*a^2*b*sin(d*x + c) - 36*A*a*b^2*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (137) = 274\).
Time = 0.19 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.17 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {6 \, B b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, B b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (B a^{3} + 3 \, A a^{2} b + 6 \, B a b^{2} + 2 \, A b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, A a b^{2} \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 )}^{3}}}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="g iac")
Output:
1/6*(6*B*b^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 6*B*b^3*log(abs(tan(1/2* d*x + 1/2*c) - 1)) + 3*(B*a^3 + 3*A*a^2*b + 6*B*a*b^2 + 2*A*b^3)*(d*x + c) + 2*(6*A*a^3*tan(1/2*d*x + 1/2*c)^5 - 3*B*a^3*tan(1/2*d*x + 1/2*c)^5 - 9* A*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 18*B*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 18*A* a*b^2*tan(1/2*d*x + 1/2*c)^5 + 4*A*a^3*tan(1/2*d*x + 1/2*c)^3 + 36*B*a^2*b *tan(1/2*d*x + 1/2*c)^3 + 36*A*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 6*A*a^3*tan( 1/2*d*x + 1/2*c) + 3*B*a^3*tan(1/2*d*x + 1/2*c) + 9*A*a^2*b*tan(1/2*d*x + 1/2*c) + 18*B*a^2*b*tan(1/2*d*x + 1/2*c) + 18*A*a*b^2*tan(1/2*d*x + 1/2*c) )/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 12.71 (sec) , antiderivative size = 1924, normalized size of antiderivative = 13.27 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\text {Too large to display} \] Input:
int(cos(c + d*x)^3*(A + B/cos(c + d*x))*(a + b/cos(c + d*x))^3,x)
Output:
(tan(c/2 + (d*x)/2)*(2*A*a^3 + B*a^3 + 6*A*a*b^2 + 3*A*a^2*b + 6*B*a^2*b) + tan(c/2 + (d*x)/2)^3*((4*A*a^3)/3 + 12*A*a*b^2 + 12*B*a^2*b) + tan(c/2 + (d*x)/2)^5*(2*A*a^3 - B*a^3 + 6*A*a*b^2 - 3*A*a^2*b + 6*B*a^2*b))/(d*(3*t an(c/2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 + 1)) + (atan((((A*b^3*1i + (B*a^3*1i)/2 + (A*a^2*b*3i)/2 + B*a*b^2*3i)*(32*A*b^ 3 + 16*B*a^3 + 32*B*b^3 + 48*A*a^2*b + 96*B*a*b^2) + tan(c/2 + (d*x)/2)*(3 2*A^2*b^6 + 8*B^2*a^6 + 32*B^2*b^6 + 96*A^2*a^2*b^4 + 72*A^2*a^4*b^2 + 288 *B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 192*A*B*a*b^5 + 48*A*B*a^5*b + 320*A*B*a^3 *b^3))*(A*b^3*1i + (B*a^3*1i)/2 + (A*a^2*b*3i)/2 + B*a*b^2*3i)*1i - ((A*b^ 3*1i + (B*a^3*1i)/2 + (A*a^2*b*3i)/2 + B*a*b^2*3i)*(32*A*b^3 + 16*B*a^3 + 32*B*b^3 + 48*A*a^2*b + 96*B*a*b^2) - tan(c/2 + (d*x)/2)*(32*A^2*b^6 + 8*B ^2*a^6 + 32*B^2*b^6 + 96*A^2*a^2*b^4 + 72*A^2*a^4*b^2 + 288*B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 192*A*B*a*b^5 + 48*A*B*a^5*b + 320*A*B*a^3*b^3))*(A*b^3*1 i + (B*a^3*1i)/2 + (A*a^2*b*3i)/2 + B*a*b^2*3i)*1i)/(((A*b^3*1i + (B*a^3*1 i)/2 + (A*a^2*b*3i)/2 + B*a*b^2*3i)*(32*A*b^3 + 16*B*a^3 + 32*B*b^3 + 48*A *a^2*b + 96*B*a*b^2) + tan(c/2 + (d*x)/2)*(32*A^2*b^6 + 8*B^2*a^6 + 32*B^2 *b^6 + 96*A^2*a^2*b^4 + 72*A^2*a^4*b^2 + 288*B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 192*A*B*a*b^5 + 48*A*B*a^5*b + 320*A*B*a^3*b^3))*(A*b^3*1i + (B*a^3*1i)/ 2 + (A*a^2*b*3i)/2 + B*a*b^2*3i) + ((A*b^3*1i + (B*a^3*1i)/2 + (A*a^2*b*3i )/2 + B*a*b^2*3i)*(32*A*b^3 + 16*B*a^3 + 32*B*b^3 + 48*A*a^2*b + 96*B*a...
Time = 0.15 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.87 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {6 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{3} b -3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{4}+3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{4}-\sin \left (d x +c \right )^{3} a^{4}+3 \sin \left (d x +c \right ) a^{4}+18 \sin \left (d x +c \right ) a^{2} b^{2}+6 a^{3} b c +6 a^{3} b d x +12 a \,b^{3} c +12 a \,b^{3} d x}{3 d} \] Input:
int(cos(d*x+c)^3*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x)
Output:
(6*cos(c + d*x)*sin(c + d*x)*a**3*b - 3*log(tan((c + d*x)/2) - 1)*b**4 + 3 *log(tan((c + d*x)/2) + 1)*b**4 - sin(c + d*x)**3*a**4 + 3*sin(c + d*x)*a* *4 + 18*sin(c + d*x)*a**2*b**2 + 6*a**3*b*c + 6*a**3*b*d*x + 12*a*b**3*c + 12*a*b**3*d*x)/(3*d)