Integrand size = 32, antiderivative size = 180 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (8 a^3 B+12 a b^2 B+12 a^2 b C+3 b^3 C\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\left (16 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \tan (c+d x)}{6 d}+\frac {b \left (20 a b B+6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \] Output:
1/8*(8*B*a^3+12*B*a*b^2+12*C*a^2*b+3*C*b^3)*arctanh(sin(d*x+c))/d+1/6*(16* B*a^2*b+4*B*b^3+3*C*a^3+12*C*a*b^2)*tan(d*x+c)/d+1/24*b*(20*B*a*b+6*C*a^2+ 9*C*b^2)*sec(d*x+c)*tan(d*x+c)/d+1/12*(4*B*b+3*C*a)*(a+b*sec(d*x+c))^2*tan (d*x+c)/d+1/4*C*(a+b*sec(d*x+c))^3*tan(d*x+c)/d
Time = 0.85 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.80 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {24 a^3 B \coth ^{-1}(\sin (c+d x))+9 b \left (4 a b B+4 a^2 C+b^2 C\right ) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (24 \left (3 a^2 b B+b^3 B+a^3 C+3 a b^2 C\right )+9 b \left (4 a b B+4 a^2 C+b^2 C\right ) \sec (c+d x)+6 b^3 C \sec ^3(c+d x)+8 b^2 (b B+3 a C) \tan ^2(c+d x)\right )}{24 d} \] Input:
Integrate[(a + b*Sec[c + d*x])^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
(24*a^3*B*ArcCoth[Sin[c + d*x]] + 9*b*(4*a*b*B + 4*a^2*C + b^2*C)*ArcTanh[ Sin[c + d*x]] + Tan[c + d*x]*(24*(3*a^2*b*B + b^3*B + a^3*C + 3*a*b^2*C) + 9*b*(4*a*b*B + 4*a^2*C + b^2*C)*Sec[c + d*x] + 6*b^3*C*Sec[c + d*x]^3 + 8 *b^2*(b*B + 3*a*C)*Tan[c + d*x]^2))/(24*d)
Time = 0.71 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.06, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.219, Rules used = {3042, 4544, 3042, 4544, 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 (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\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 )dx\) |
\(\Big \downarrow \) 4544 |
\(\displaystyle \frac {1}{4} \int (a+b \sec (c+d x))^2 \left ((4 b B+3 a C) \sec ^2(c+d x)+(4 a B+3 b C) \sec (c+d x)\right )dx+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left ((4 b B+3 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+(4 a B+3 b C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4544 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int (a+b \sec (c+d x)) \left (\left (6 C a^2+20 b B a+9 b^2 C\right ) \sec ^2(c+d x)+\left (12 B a^2+15 b C a+8 b^2 B\right ) \sec (c+d x)\right )dx+\frac {(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {C \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 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (\left (6 C a^2+20 b B a+9 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (12 B a^2+15 b C a+8 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 4536 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \left (4 \left (3 C a^3+16 b B a^2+12 b^2 C a+4 b^3 B\right ) \sec ^2(c+d x)+3 \left (8 B a^3+12 b C a^2+12 b^2 B a+3 b^3 C\right ) \sec (c+d x)\right )dx+\frac {b \left (6 a^2 C+20 a b B+9 b^2 C\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {b \left (6 a^2 C+20 a b B+9 b^2 C\right ) \tan (c+d x) \sec (c+d x)}{2 d}+\frac {1}{2} \left (\frac {3 \left (8 a^3 B+12 a^2 b C+12 a b^2 B+3 b^3 C\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {4 \left (3 a^3 C+16 a^2 b B+12 a b^2 C+4 b^3 B\right ) \tan (c+d x)}{d}\right )\right )+\frac {(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}\) |
Input:
Int[(a + b*Sec[c + d*x])^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
(C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d) + (((4*b*B + 3*a*C)*(a + b*S ec[c + d*x])^2*Tan[c + d*x])/(3*d) + ((b*(20*a*b*B + 6*a^2*C + 9*b^2*C)*Se c[c + d*x]*Tan[c + d*x])/(2*d) + ((3*(8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*ArcTanh[Sin[c + d*x]])/d + (4*(16*a^2*b*B + 4*b^3*B + 3*a^3*C + 1 2*a*b^2*C)*Tan[c + d*x])/d)/2)/3)/4
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_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Simp[(-C)*Cot [e + f*x]*((a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[1/(m + 1) Int[( a + b*Csc[e + f*x])^(m - 1)*Simp[a*A*(m + 1) + ((A*b + a*B)*(m + 1) + b*C*m )*Csc[e + f*x] + (b*B*(m + 1) + a*C*m)*Csc[e + f*x]^2, x], x], x] /; FreeQ[ {a, b, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && IGtQ[2*m, 0]
Time = 1.66 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.03
method | result | size |
parts | \(-\frac {\left (B \,b^{3}+3 C 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 B a \,b^{2}+3 a^{2} b C \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 B \,a^{2} b +a^{3} C \right ) \tan \left (d x +c \right )}{d}+\frac {B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C \,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 {B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a^{3} C \tan \left (d x +c \right )+3 B \,a^{2} b \tan \left (d x +c \right )+3 a^{2} b 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 \,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 C a \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-B \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,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 {B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a^{3} C \tan \left (d x +c \right )+3 B \,a^{2} b \tan \left (d x +c \right )+3 a^{2} b 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 \,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 C a \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-B \,b^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,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 (B \,a^{3}+\frac {3}{2} B a \,b^{2}+\frac {3}{2} a^{2} b C +\frac {3}{8} C \,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 (B \,a^{3}+\frac {3}{2} B a \,b^{2}+\frac {3}{2} a^{2} b C +\frac {3}{8} C \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (144 B \,a^{2} b +64 B \,b^{3}+48 a^{3} C +192 C a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+\left (72 B \,a^{2} b +16 B \,b^{3}+24 a^{3} C +48 C a \,b^{2}\right ) \sin \left (4 d x +4 c \right )+72 \left (\left (B a b +C \,a^{2}+\frac {1}{4} C \,b^{2}\right ) \sin \left (3 d x +3 c \right )+\sin \left (d x +c \right ) \left (B a b +C \,a^{2}+\frac {11}{12} C \,b^{2}\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 B \,a^{2} b -12 B a \,b^{2}+8 B \,b^{3}+8 a^{3} C -12 a^{2} b C +24 C a \,b^{2}-5 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (24 B \,a^{2} b +12 B a \,b^{2}+8 B \,b^{3}+8 a^{3} C +12 a^{2} b C +24 C a \,b^{2}+5 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (216 B \,a^{2} b -36 B a \,b^{2}+40 B \,b^{3}+72 a^{3} C -36 a^{2} b C +120 C a \,b^{2}+9 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {\left (216 B \,a^{2} b +36 B a \,b^{2}+40 B \,b^{3}+72 a^{3} C +36 a^{2} b C +120 C a \,b^{2}-9 C \,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 B \,a^{3}+12 B a \,b^{2}+12 a^{2} b C +3 C \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (8 B \,a^{3}+12 B a \,b^{2}+12 a^{2} b C +3 C \,b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(357\) |
risch | \(-\frac {i \left (-16 B \,b^{3}-24 a^{3} C -72 B \,a^{2} b -48 C a \,b^{2}-36 B a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}+36 B a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-72 B \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+36 B a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-36 C \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-216 B \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-216 B \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-36 B a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+36 C \,a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}+36 C \,a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-144 C a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-36 C \,a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-192 C a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-9 C \,b^{3} {\mathrm e}^{i \left (d x +c \right )}-72 C \,a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-48 B \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-24 C \,a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+9 C \,b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+33 C \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-64 B \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-33 C \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-72 C \,a^{3} {\mathrm e}^{4 i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B a \,b^{2}}{2 d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,a^{2}}{2 d}-\frac {3 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B a \,b^{2}}{2 d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,a^{2}}{2 d}+\frac {3 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}\) | \(570\) |
Input:
int((a+b*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBO SE)
Output:
-(B*b^3+3*C*a*b^2)/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+(3*B*a*b^2+3*C*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*B*a^2*b +C*a^3)/d*tan(d*x+c)+B*a^3/d*ln(sec(d*x+c)+tan(d*x+c))+C*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.09 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.17 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (8 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 3 \, C b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 3 \, C b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (6 \, C b^{3} + 8 \, {\left (3 \, C a^{3} + 9 \, B a^{2} b + 6 \, C a b^{2} + 2 \, B b^{3}\right )} \cos \left (d x + c\right )^{3} + 9 \, {\left (4 \, C a^{2} b + 4 \, B a b^{2} + C b^{3}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (3 \, C a b^{2} + B 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((a+b*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="f ricas")
Output:
1/48*(3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*cos(d*x + c)^4*log(s in(d*x + c) + 1) - 3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(6*C*b^3 + 8*(3*C*a^3 + 9*B*a^2*b + 6*C *a*b^2 + 2*B*b^3)*cos(d*x + c)^3 + 9*(4*C*a^2*b + 4*B*a*b^2 + C*b^3)*cos(d *x + c)^2 + 8*(3*C*a*b^2 + B*b^3)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (B + C \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((a+b*sec(d*x+c))**3*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)
Output:
Integral((B + C*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 (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {48 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b^{2} + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b^{3} - 3 \, C 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 \, C 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 \, B 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 \, B a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 48 \, C a^{3} \tan \left (d x + c\right ) + 144 \, B a^{2} b \tan \left (d x + c\right )}{48 \, d} \] Input:
integrate((a+b*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="m axima")
Output:
1/48*(48*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a*b^2 + 16*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*b^3 - 3*C*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*C*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*B*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*B*a ^3*log(sec(d*x + c) + tan(d*x + c)) + 48*C*a^3*tan(d*x + c) + 144*B*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.35 (sec) , antiderivative size = 586, normalized size of antiderivative = 3.26 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \] Input:
integrate((a+b*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="g iac")
Output:
1/24*(3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*log(abs(t an(1/2*d*x + 1/2*c) - 1)) - 2*(24*C*a^3*tan(1/2*d*x + 1/2*c)^7 + 72*B*a^2* b*tan(1/2*d*x + 1/2*c)^7 - 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 36*B*a*b^2* tan(1/2*d*x + 1/2*c)^7 + 72*C*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 24*B*b^3*tan( 1/2*d*x + 1/2*c)^7 - 15*C*b^3*tan(1/2*d*x + 1/2*c)^7 - 72*C*a^3*tan(1/2*d* x + 1/2*c)^5 - 216*B*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 120*C*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 40*B*b^3*tan(1/2*d*x + 1/2*c)^5 - 9*C*b^3*tan(1/2*d*x + 1/2*c )^5 + 72*C*a^3*tan(1/2*d*x + 1/2*c)^3 + 216*B*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 120*C*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 40*B*b^3*tan(1/2*d*x + 1/2*c)^3 - 9* C*b^3*tan(1/2*d*x + 1/2*c)^3 - 24*C*a^3*tan(1/2*d*x + 1/2*c) - 72*B*a^2*b* tan(1/2*d*x + 1/2*c) - 36*C*a^2*b*tan(1/2*d*x + 1/2*c) - 36*B*a*b^2*tan(1/ 2*d*x + 1/2*c) - 72*C*a*b^2*tan(1/2*d*x + 1/2*c) - 24*B*b^3*tan(1/2*d*x + 1/2*c) - 15*C*b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 16.59 (sec) , antiderivative size = 395, normalized size of antiderivative = 2.19 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (B\,a^3+\frac {3\,C\,a^2\,b}{2}+\frac {3\,B\,a\,b^2}{2}+\frac {3\,C\,b^3}{8}\right )}{4\,B\,a^3+6\,C\,a^2\,b+6\,B\,a\,b^2+\frac {3\,C\,b^3}{2}}\right )\,\left (2\,B\,a^3+3\,C\,a^2\,b+3\,B\,a\,b^2+\frac {3\,C\,b^3}{4}\right )}{d}-\frac {\left (2\,B\,b^3+2\,C\,a^3-\frac {5\,C\,b^3}{4}-3\,B\,a\,b^2+6\,B\,a^2\,b+6\,C\,a\,b^2-3\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (3\,B\,a\,b^2-6\,C\,a^3-\frac {3\,C\,b^3}{4}-\frac {10\,B\,b^3}{3}-18\,B\,a^2\,b-10\,C\,a\,b^2+3\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {10\,B\,b^3}{3}+6\,C\,a^3-\frac {3\,C\,b^3}{4}+3\,B\,a\,b^2+18\,B\,a^2\,b+10\,C\,a\,b^2+3\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-2\,B\,b^3-2\,C\,a^3-\frac {5\,C\,b^3}{4}-3\,B\,a\,b^2-6\,B\,a^2\,b-6\,C\,a\,b^2-3\,C\,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((B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + b/cos(c + d*x))^3,x)
Output:
(atanh((4*tan(c/2 + (d*x)/2)*(B*a^3 + (3*C*b^3)/8 + (3*B*a*b^2)/2 + (3*C*a ^2*b)/2))/(4*B*a^3 + (3*C*b^3)/2 + 6*B*a*b^2 + 6*C*a^2*b))*(2*B*a^3 + (3*C *b^3)/4 + 3*B*a*b^2 + 3*C*a^2*b))/d - (tan(c/2 + (d*x)/2)^7*(2*B*b^3 + 2*C *a^3 - (5*C*b^3)/4 - 3*B*a*b^2 + 6*B*a^2*b + 6*C*a*b^2 - 3*C*a^2*b) + tan( c/2 + (d*x)/2)^3*((10*B*b^3)/3 + 6*C*a^3 - (3*C*b^3)/4 + 3*B*a*b^2 + 18*B* a^2*b + 10*C*a*b^2 + 3*C*a^2*b) - tan(c/2 + (d*x)/2)^5*((10*B*b^3)/3 + 6*C *a^3 + (3*C*b^3)/4 - 3*B*a*b^2 + 18*B*a^2*b + 10*C*a*b^2 - 3*C*a^2*b) - ta n(c/2 + (d*x)/2)*(2*B*b^3 + 2*C*a^3 + (5*C*b^3)/4 + 3*B*a*b^2 + 6*B*a^2*b + 6*C*a*b^2 + 3*C*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.15 (sec) , antiderivative size = 830, normalized size of antiderivative = 4.61 \[ \int (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \] Input:
int((a+b*sec(d*x+c))^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
( - 24*cos(c + d*x)*sin(c + d*x)**3*a**3*c - 72*cos(c + d*x)*sin(c + d*x)* *3*a**2*b**2 - 48*cos(c + d*x)*sin(c + d*x)**3*a*b**2*c - 16*cos(c + d*x)* sin(c + d*x)**3*b**4 + 24*cos(c + d*x)*sin(c + d*x)*a**3*c + 72*cos(c + d* x)*sin(c + d*x)*a**2*b**2 + 72*cos(c + d*x)*sin(c + d*x)*a*b**2*c + 24*cos (c + d*x)*sin(c + d*x)*b**4 - 24*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4 *a**3*b - 36*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a**2*b*c - 36*log(t an((c + d*x)/2) - 1)*sin(c + d*x)**4*a*b**3 - 9*log(tan((c + d*x)/2) - 1)* sin(c + d*x)**4*b**3*c + 48*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**3 *b + 72*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**2*b*c + 72*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a*b**3 + 18*log(tan((c + d*x)/2) - 1)*sin( c + d*x)**2*b**3*c - 24*log(tan((c + d*x)/2) - 1)*a**3*b - 36*log(tan((c + d*x)/2) - 1)*a**2*b*c - 36*log(tan((c + d*x)/2) - 1)*a*b**3 - 9*log(tan(( c + d*x)/2) - 1)*b**3*c + 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a** 3*b + 36*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a**2*b*c + 36*log(tan(( c + d*x)/2) + 1)*sin(c + d*x)**4*a*b**3 + 9*log(tan((c + d*x)/2) + 1)*sin( c + d*x)**4*b**3*c - 48*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**3*b - 72*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b*c - 72*log(tan((c + d *x)/2) + 1)*sin(c + d*x)**2*a*b**3 - 18*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b**3*c + 24*log(tan((c + d*x)/2) + 1)*a**3*b + 36*log(tan((c + d*x )/2) + 1)*a**2*b*c + 36*log(tan((c + d*x)/2) + 1)*a*b**3 + 9*log(tan((c...