Integrand size = 29, antiderivative size = 180 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {\left (8 a^3 A+12 a A b^2+12 a^2 b B+3 b^3 B\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\left (16 a^2 A b+4 A b^3+3 a^3 B+12 a b^2 B\right ) \tan (c+d x)}{6 d}+\frac {b \left (20 a A b+6 a^2 B+9 b^2 B\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {(4 A b+3 a B) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {B (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \] Output:
1/8*(8*A*a^3+12*A*a*b^2+12*B*a^2*b+3*B*b^3)*arctanh(sin(d*x+c))/d+1/6*(16* A*a^2*b+4*A*b^3+3*B*a^3+12*B*a*b^2)*tan(d*x+c)/d+1/24*b*(20*A*a*b+6*B*a^2+ 9*B*b^2)*sec(d*x+c)*tan(d*x+c)/d+1/12*(4*A*b+3*B*a)*(a+b*sec(d*x+c))^2*tan (d*x+c)/d+1/4*B*(a+b*sec(d*x+c))^3*tan(d*x+c)/d
Time = 0.78 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.80 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {24 a^3 A \coth ^{-1}(\sin (c+d x))+9 b \left (4 a A b+4 a^2 B+b^2 B\right ) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (24 \left (3 a^2 A b+A b^3+a^3 B+3 a b^2 B\right )+9 b \left (4 a A b+4 a^2 B+b^2 B\right ) \sec (c+d x)+6 b^3 B \sec ^3(c+d x)+8 b^2 (A b+3 a B) \tan ^2(c+d x)\right )}{24 d} \] Input:
Integrate[Sec[c + d*x]*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]
Output:
(24*a^3*A*ArcCoth[Sin[c + d*x]] + 9*b*(4*a*A*b + 4*a^2*B + b^2*B)*ArcTanh[ Sin[c + d*x]] + Tan[c + d*x]*(24*(3*a^2*A*b + A*b^3 + a^3*B + 3*a*b^2*B) + 9*b*(4*a*A*b + 4*a^2*B + b^2*B)*Sec[c + d*x] + 6*b^3*B*Sec[c + d*x]^3 + 8 *b^2*(A*b + 3*a*B)*Tan[c + d*x]^2))/(24*d)
Time = 1.06 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.06, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.414, Rules used = {3042, 4490, 3042, 4490, 3042, 4485, 3042, 4274, 3042, 4254, 24, 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 \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right ) \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 )dx\) |
\(\Big \downarrow \) 4490 |
\(\displaystyle \frac {1}{4} \int \sec (c+d x) (a+b \sec (c+d x))^2 (4 a A+3 b B+(4 A b+3 a B) \sec (c+d x))dx+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (4 a A+3 b B+(4 A b+3 a B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4490 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \sec (c+d x) (a+b \sec (c+d x)) \left (12 A a^2+15 b B a+8 A b^2+\left (6 B a^2+20 A b a+9 b^2 B\right ) \sec (c+d x)\right )dx+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (12 A a^2+15 b B a+8 A b^2+\left (6 B a^2+20 A b a+9 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4485 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \sec (c+d x) \left (3 \left (8 A a^3+12 b B a^2+12 A b^2 a+3 b^3 B\right )+4 \left (3 B a^3+16 A b a^2+12 b^2 B a+4 A b^3\right ) \sec (c+d x)\right )dx+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 \left (8 A a^3+12 b B a^2+12 A b^2 a+3 b^3 B\right )+4 \left (3 B a^3+16 A b a^2+12 b^2 B a+4 A b^3\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (4 \left (3 a^3 B+16 a^2 A b+12 a b^2 B+4 A b^3\right ) \int \sec ^2(c+d x)dx+3 \left (8 a^3 A+12 a^2 b B+12 a A b^2+3 b^3 B\right ) \int \sec (c+d x)dx\right )+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (3 \left (8 a^3 A+12 a^2 b B+12 a A b^2+3 b^3 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+4 \left (3 a^3 B+16 a^2 A b+12 a b^2 B+4 A b^3\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\right )+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (3 \left (8 a^3 A+12 a^2 b B+12 a A b^2+3 b^3 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {4 \left (3 a^3 B+16 a^2 A b+12 a b^2 B+4 A b^3\right ) \int 1d(-\tan (c+d x))}{d}\right )+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (3 \left (8 a^3 A+12 a^2 b B+12 a A b^2+3 b^3 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {4 \left (3 a^3 B+16 a^2 A b+12 a b^2 B+4 A b^3\right ) \tan (c+d x)}{d}\right )+\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {b \left (6 a^2 B+20 a A b+9 b^2 B\right ) \tan (c+d x) \sec (c+d x)}{2 d}+\frac {1}{2} \left (\frac {3 \left (8 a^3 A+12 a^2 b B+12 a A b^2+3 b^3 B\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {4 \left (3 a^3 B+16 a^2 A b+12 a b^2 B+4 A b^3\right ) \tan (c+d x)}{d}\right )\right )+\frac {(3 a B+4 A b) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {B \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
Input:
Int[Sec[c + d*x]*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]
Output:
(B*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d) + (((4*A*b + 3*a*B)*(a + b*S ec[c + d*x])^2*Tan[c + d*x])/(3*d) + ((b*(20*a*A*b + 6*a^2*B + 9*b^2*B)*Se c[c + d*x]*Tan[c + d*x])/(2*d) + ((3*(8*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*ArcTanh[Sin[c + d*x]])/d + (4*(16*a^2*A*b + 4*A*b^3 + 3*a^3*B + 1 2*a*b^2*B)*Tan[c + d*x])/d)/2)/3)/4
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
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_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[ e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Simp[1/(n + 1) Int[(d*Csc [e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*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_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[1/(m + 1) Int[Csc[e + f*x]* (a + b*Csc[e + f*x])^(m - 1)*Simp[b*B*m + a*A*(m + 1) + (a*B*m + A*b*(m + 1 ))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a* B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0]
Time = 1.47 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.03
method | result | size |
parts | \(-\frac {\left (A \,b^{3}+3 B a \,b^{2}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (3 A a \,b^{2}+3 B \,a^{2} b \right ) \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}+\frac {\left (3 A \,a^{2} b +B \,a^{3}\right ) \tan \left (d x +c \right )}{d}+\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {B \,b^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(185\) |
derivativedivides | \(\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+3 A \,a^{2} b \tan \left (d x +c \right )+3 B \,a^{2} b \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 A a \,b^{2} \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 \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-A \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,b^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(223\) |
default | \(\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+3 A \,a^{2} b \tan \left (d x +c \right )+3 B \,a^{2} b \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 A a \,b^{2} \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 \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-A \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,b^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(223\) |
parallelrisch | \(\frac {-96 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{3} A +\frac {3}{2} A a \,b^{2}+\frac {3}{2} B \,a^{2} b +\frac {3}{8} B \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+96 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{3} A +\frac {3}{2} A a \,b^{2}+\frac {3}{2} B \,a^{2} b +\frac {3}{8} B \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (144 A \,a^{2} b +64 A \,b^{3}+48 B \,a^{3}+192 B a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+\left (72 A \,a^{2} b +16 A \,b^{3}+24 B \,a^{3}+48 B a \,b^{2}\right ) \sin \left (4 d x +4 c \right )+72 \left (\left (A a b +B \,a^{2}+\frac {1}{4} b^{2} B \right ) \sin \left (3 d x +3 c \right )+\sin \left (d x +c \right ) \left (A a b +B \,a^{2}+\frac {11}{12} b^{2} B \right )\right ) b}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(282\) |
norman | \(\frac {-\frac {\left (24 A \,a^{2} b -12 A a \,b^{2}+8 A \,b^{3}+8 B \,a^{3}-12 B \,a^{2} b +24 B a \,b^{2}-5 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (24 A \,a^{2} b +12 A a \,b^{2}+8 A \,b^{3}+8 B \,a^{3}+12 B \,a^{2} b +24 B a \,b^{2}+5 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (216 A \,a^{2} b -36 A a \,b^{2}+40 A \,b^{3}+72 B \,a^{3}-36 B \,a^{2} b +120 B a \,b^{2}+9 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {\left (216 A \,a^{2} b +36 A a \,b^{2}+40 A \,b^{3}+72 B \,a^{3}+36 B \,a^{2} b +120 B a \,b^{2}-9 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {\left (8 a^{3} A +12 A a \,b^{2}+12 B \,a^{2} b +3 B \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (8 a^{3} A +12 A a \,b^{2}+12 B \,a^{2} b +3 B \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(357\) |
risch | \(-\frac {i \left (-48 B a \,b^{2}-72 A \,a^{2} b -36 A a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-36 B \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-216 A \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-192 B a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+36 A a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+36 A a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+36 B \,a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-144 B a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-36 A a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-36 B \,a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-216 A \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+36 B \,a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-72 A \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-24 B \,a^{3}-9 b^{3} B \,{\mathrm e}^{i \left (d x +c \right )}-48 A \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+33 B \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+9 B \,b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-64 A \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-72 B \,a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-72 B \,a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-24 B \,a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-33 B \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-16 A \,b^{3}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{3} A}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A a \,b^{2}}{2 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,a^{2} b}{2 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,b^{3}}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{3} A}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A a \,b^{2}}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,a^{2} b}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,b^{3}}{8 d}\) | \(570\) |
Input:
int(sec(d*x+c)*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x,method=_RETURNVERBOSE )
Output:
-(A*b^3+3*B*a*b^2)/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+(3*A*a*b^2+3*B*a^2 *b)/d*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+(3*A*a^2*b +B*a^3)/d*tan(d*x+c)+a^3*A/d*ln(sec(d*x+c)+tan(d*x+c))+B*b^3/d*(-(-1/4*sec (d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))
Time = 0.10 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.17 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (8 \, A a^{3} + 12 \, B a^{2} b + 12 \, A a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, A a^{3} + 12 \, B a^{2} b + 12 \, A a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (6 \, B b^{3} + 8 \, {\left (3 \, B a^{3} + 9 \, A a^{2} b + 6 \, B a b^{2} + 2 \, A b^{3}\right )} \cos \left (d x + c\right )^{3} + 9 \, {\left (4 \, B a^{2} b + 4 \, A a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="fri cas")
Output:
1/48*(3*(8*A*a^3 + 12*B*a^2*b + 12*A*a*b^2 + 3*B*b^3)*cos(d*x + c)^4*log(s in(d*x + c) + 1) - 3*(8*A*a^3 + 12*B*a^2*b + 12*A*a*b^2 + 3*B*b^3)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(6*B*b^3 + 8*(3*B*a^3 + 9*A*a^2*b + 6*B *a*b^2 + 2*A*b^3)*cos(d*x + c)^3 + 9*(4*B*a^2*b + 4*A*a*b^2 + B*b^3)*cos(d *x + c)^2 + 8*(3*B*a*b^2 + A*b^3)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int \left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec {\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))**3*(A+B*sec(d*x+c)),x)
Output:
Integral((A + B*sec(c + d*x))*(a + b*sec(c + d*x))**3*sec(c + d*x), x)
Time = 0.04 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.48 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {48 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a b^{2} + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A b^{3} - 3 \, B b^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, B a^{2} b {\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 )} - 36 \, A a b^{2} {\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 )} + 48 \, A a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 48 \, B a^{3} \tan \left (d x + c\right ) + 144 \, A a^{2} b \tan \left (d x + c\right )}{48 \, d} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="max ima")
Output:
1/48*(48*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a*b^2 + 16*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*b^3 - 3*B*b^3*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(si n(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin (d*x + c) - 1)) - 36*B*a^2*b*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(si n(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 36*A*a*b^2*(2*sin(d*x + c)/(sin (d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 48*A*a ^3*log(sec(d*x + c) + tan(d*x + c)) + 48*B*a^3*tan(d*x + c) + 144*A*a^2*b* tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 586 vs. \(2 (170) = 340\).
Time = 0.18 (sec) , antiderivative size = 586, normalized size of antiderivative = 3.26 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx =\text {Too large to display} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="gia c")
Output:
1/24*(3*(8*A*a^3 + 12*B*a^2*b + 12*A*a*b^2 + 3*B*b^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(8*A*a^3 + 12*B*a^2*b + 12*A*a*b^2 + 3*B*b^3)*log(abs(t an(1/2*d*x + 1/2*c) - 1)) - 2*(24*B*a^3*tan(1/2*d*x + 1/2*c)^7 + 72*A*a^2* b*tan(1/2*d*x + 1/2*c)^7 - 36*B*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 36*A*a*b^2* tan(1/2*d*x + 1/2*c)^7 + 72*B*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 24*A*b^3*tan( 1/2*d*x + 1/2*c)^7 - 15*B*b^3*tan(1/2*d*x + 1/2*c)^7 - 72*B*a^3*tan(1/2*d* x + 1/2*c)^5 - 216*A*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 36*B*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 36*A*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 120*B*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 40*A*b^3*tan(1/2*d*x + 1/2*c)^5 - 9*B*b^3*tan(1/2*d*x + 1/2*c )^5 + 72*B*a^3*tan(1/2*d*x + 1/2*c)^3 + 216*A*a^2*b*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 + 120*B*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 40*A*b^3*tan(1/2*d*x + 1/2*c)^3 - 9* B*b^3*tan(1/2*d*x + 1/2*c)^3 - 24*B*a^3*tan(1/2*d*x + 1/2*c) - 72*A*a^2*b* tan(1/2*d*x + 1/2*c) - 36*B*a^2*b*tan(1/2*d*x + 1/2*c) - 36*A*a*b^2*tan(1/ 2*d*x + 1/2*c) - 72*B*a*b^2*tan(1/2*d*x + 1/2*c) - 24*A*b^3*tan(1/2*d*x + 1/2*c) - 15*B*b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 15.03 (sec) , antiderivative size = 395, normalized size of antiderivative = 2.19 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A\,a^3+\frac {3\,B\,a^2\,b}{2}+\frac {3\,A\,a\,b^2}{2}+\frac {3\,B\,b^3}{8}\right )}{4\,A\,a^3+6\,B\,a^2\,b+6\,A\,a\,b^2+\frac {3\,B\,b^3}{2}}\right )\,\left (2\,A\,a^3+3\,B\,a^2\,b+3\,A\,a\,b^2+\frac {3\,B\,b^3}{4}\right )}{d}-\frac {\left (2\,A\,b^3+2\,B\,a^3-\frac {5\,B\,b^3}{4}-3\,A\,a\,b^2+6\,A\,a^2\,b+6\,B\,a\,b^2-3\,B\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (3\,A\,a\,b^2-6\,B\,a^3-\frac {3\,B\,b^3}{4}-\frac {10\,A\,b^3}{3}-18\,A\,a^2\,b-10\,B\,a\,b^2+3\,B\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {10\,A\,b^3}{3}+6\,B\,a^3-\frac {3\,B\,b^3}{4}+3\,A\,a\,b^2+18\,A\,a^2\,b+10\,B\,a\,b^2+3\,B\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-2\,A\,b^3-2\,B\,a^3-\frac {5\,B\,b^3}{4}-3\,A\,a\,b^2-6\,A\,a^2\,b-6\,B\,a\,b^2-3\,B\,a^2\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \] Input:
int(((A + B/cos(c + d*x))*(a + b/cos(c + d*x))^3)/cos(c + d*x),x)
Output:
(atanh((4*tan(c/2 + (d*x)/2)*(A*a^3 + (3*B*b^3)/8 + (3*A*a*b^2)/2 + (3*B*a ^2*b)/2))/(4*A*a^3 + (3*B*b^3)/2 + 6*A*a*b^2 + 6*B*a^2*b))*(2*A*a^3 + (3*B *b^3)/4 + 3*A*a*b^2 + 3*B*a^2*b))/d - (tan(c/2 + (d*x)/2)^7*(2*A*b^3 + 2*B *a^3 - (5*B*b^3)/4 - 3*A*a*b^2 + 6*A*a^2*b + 6*B*a*b^2 - 3*B*a^2*b) + tan( c/2 + (d*x)/2)^3*((10*A*b^3)/3 + 6*B*a^3 - (3*B*b^3)/4 + 3*A*a*b^2 + 18*A* a^2*b + 10*B*a*b^2 + 3*B*a^2*b) - tan(c/2 + (d*x)/2)^5*((10*A*b^3)/3 + 6*B *a^3 + (3*B*b^3)/4 - 3*A*a*b^2 + 18*A*a^2*b + 10*B*a*b^2 - 3*B*a^2*b) - ta n(c/2 + (d*x)/2)*(2*A*b^3 + 2*B*a^3 + (5*B*b^3)/4 + 3*A*a*b^2 + 6*A*a^2*b + 6*B*a*b^2 + 3*B*a^2*b))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2 )^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))
Time = 0.17 (sec) , antiderivative size = 578, normalized size of antiderivative = 3.21 \[ \int \sec (c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx =\text {Too large to display} \] Input:
int(sec(d*x+c)*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x)
Output:
( - 96*cos(c + d*x)*sin(c + d*x)**3*a**3*b - 64*cos(c + d*x)*sin(c + d*x)* *3*a*b**3 + 96*cos(c + d*x)*sin(c + d*x)*a**3*b + 96*cos(c + d*x)*sin(c + d*x)*a*b**3 - 24*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a**4 - 72*log(t an((c + d*x)/2) - 1)*sin(c + d*x)**4*a**2*b**2 - 9*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*b**4 + 48*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a** 4 + 144*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**2*b**2 + 18*log(tan(( c + d*x)/2) - 1)*sin(c + d*x)**2*b**4 - 24*log(tan((c + d*x)/2) - 1)*a**4 - 72*log(tan((c + d*x)/2) - 1)*a**2*b**2 - 9*log(tan((c + d*x)/2) - 1)*b** 4 + 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a**4 + 72*log(tan((c + d* x)/2) + 1)*sin(c + d*x)**4*a**2*b**2 + 9*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*b**4 - 48*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**4 - 144*lo g(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b**2 - 18*log(tan((c + d*x)/2 ) + 1)*sin(c + d*x)**2*b**4 + 24*log(tan((c + d*x)/2) + 1)*a**4 + 72*log(t an((c + d*x)/2) + 1)*a**2*b**2 + 9*log(tan((c + d*x)/2) + 1)*b**4 - 72*sin (c + d*x)**3*a**2*b**2 - 9*sin(c + d*x)**3*b**4 + 72*sin(c + d*x)*a**2*b** 2 + 15*sin(c + d*x)*b**4)/(24*d*(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1))