Integrand size = 39, antiderivative size = 200 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (8 a b B+4 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\left (4 a^2 b B+4 b^3 B-a^3 C+4 a b^2 (3 A+2 C)\right ) \tan (c+d x)}{6 b d}+\frac {\left (12 A b^2+8 a b B-2 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {(4 b B-a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 b d}+\frac {C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 b d} \] Output:
1/8*(8*B*a*b+4*a^2*(2*A+C)+b^2*(4*A+3*C))*arctanh(sin(d*x+c))/d+1/6*(4*B*a ^2*b+4*B*b^3-a^3*C+4*a*b^2*(3*A+2*C))*tan(d*x+c)/b/d+1/24*(12*A*b^2+8*B*a* b-2*C*a^2+9*C*b^2)*sec(d*x+c)*tan(d*x+c)/d+1/12*(4*B*b-C*a)*(a+b*sec(d*x+c ))^2*tan(d*x+c)/b/d+1/4*C*(a+b*sec(d*x+c))^3*tan(d*x+c)/b/d
Time = 2.13 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.74 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {24 a^2 A \coth ^{-1}(\sin (c+d x))+3 \left (4 A b^2+8 a b B+4 a^2 C+3 b^2 C\right ) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (3 \left (4 A b^2+8 a b B+4 a^2 C+3 b^2 C\right ) \sec (c+d x)+6 b^2 C \sec ^3(c+d x)+8 \left (3 a^2 B+3 b^2 B+6 a b (A+C)+b (b B+2 a C) \tan ^2(c+d x)\right )\right )}{24 d} \] Input:
Integrate[Sec[c + d*x]*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[ c + d*x]^2),x]
Output:
(24*a^2*A*ArcCoth[Sin[c + d*x]] + 3*(4*A*b^2 + 8*a*b*B + 4*a^2*C + 3*b^2*C )*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(3*(4*A*b^2 + 8*a*b*B + 4*a^2*C + 3 *b^2*C)*Sec[c + d*x] + 6*b^2*C*Sec[c + d*x]^3 + 8*(3*a^2*B + 3*b^2*B + 6*a *b*(A + C) + b*(b*B + 2*a*C)*Tan[c + d*x]^2)))/(24*d)
Time = 1.13 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.05, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 4570, 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))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, 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 )^2 \left (A+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 \) 4570 |
\(\displaystyle \frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 (b (4 A+3 C)+(4 b B-a C) \sec (c+d x))dx}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\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 (b (4 A+3 C)+(4 b B-a C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 4490 |
\(\displaystyle \frac {\frac {1}{3} \int \sec (c+d x) (a+b \sec (c+d x)) \left (b (12 a A+8 b B+7 a C)+\left (-2 C a^2+8 b B a+12 A b^2+9 b^2 C\right ) \sec (c+d x)\right )dx+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\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 (b (12 a A+8 b B+7 a C)+\left (-2 C a^2+8 b B a+12 A b^2+9 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 4485 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \sec (c+d x) \left (3 b \left (4 (2 A+C) a^2+8 b B a+b^2 (4 A+3 C)\right )+4 \left (-C a^3+4 b B a^2+4 b^2 (3 A+2 C) a+4 b^3 B\right ) \sec (c+d x)\right )dx+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 b \left (4 (2 A+C) a^2+8 b B a+b^2 (4 A+3 C)\right )+4 \left (-C a^3+4 b B a^2+4 b^2 (3 A+2 C) a+4 b^3 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 b \left (4 a^2 (2 A+C)+8 a b B+b^2 (4 A+3 C)\right ) \int \sec (c+d x)dx+4 \left (a^3 (-C)+4 a^2 b B+4 a b^2 (3 A+2 C)+4 b^3 B\right ) \int \sec ^2(c+d x)dx\right )+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 b \left (4 a^2 (2 A+C)+8 a b B+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+4 \left (a^3 (-C)+4 a^2 b B+4 a b^2 (3 A+2 C)+4 b^3 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\right )+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 b \left (4 a^2 (2 A+C)+8 a b B+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {4 \left (a^3 (-C)+4 a^2 b B+4 a b^2 (3 A+2 C)+4 b^3 B\right ) \int 1d(-\tan (c+d x))}{d}\right )+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 b \left (4 a^2 (2 A+C)+8 a b B+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {4 \tan (c+d x) \left (a^3 (-C)+4 a^2 b B+4 a b^2 (3 A+2 C)+4 b^3 B\right )}{d}\right )+\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {b \tan (c+d x) \sec (c+d x) \left (-2 a^2 C+8 a b B+12 A b^2+9 b^2 C\right )}{2 d}+\frac {1}{2} \left (\frac {3 b \left (4 a^2 (2 A+C)+8 a b B+b^2 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {4 \tan (c+d x) \left (a^3 (-C)+4 a^2 b B+4 a b^2 (3 A+2 C)+4 b^3 B\right )}{d}\right )\right )+\frac {(4 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}}{4 b}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^3}{4 b d}\) |
Input:
Int[Sec[c + d*x]*(a + b*Sec[c + d*x])^2*(A + 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*b*d) + (((4*b*B - a*C)*(a + b*S ec[c + d*x])^2*Tan[c + d*x])/(3*d) + ((b*(12*A*b^2 + 8*a*b*B - 2*a^2*C + 9 *b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + ((3*b*(8*a*b*B + 4*a^2*(2*A + C ) + b^2*(4*A + 3*C))*ArcTanh[Sin[c + d*x]])/d + (4*(4*a^2*b*B + 4*b^3*B - a^3*C + 4*a*b^2*(3*A + 2*C))*Tan[c + d*x])/d)/2)/3)/(4*b)
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]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e _.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) )), x] + Simp[1/(b*(m + 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 1.96 (sec) , antiderivative size = 182, normalized size of antiderivative = 0.91
method | result | size |
parts | \(\frac {\left (2 a A b +B \,a^{2}\right ) \tan \left (d x +c \right )}{d}-\frac {\left (B \,b^{2}+2 C a b \right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (A \,b^{2}+2 B a b +C \,a^{2}\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 {a^{2} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C \,b^{2} \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}\) | \(182\) |
derivativedivides | \(\frac {a^{2} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{2} \tan \left (d x +c \right )+C \,a^{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 )+2 a A b \tan \left (d x +c \right )+2 B a 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 )-2 C a b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+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 )-B \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{2} \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}\) | \(251\) |
default | \(\frac {a^{2} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{2} \tan \left (d x +c \right )+C \,a^{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 )+2 a A b \tan \left (d x +c \right )+2 B a 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 )-2 C a b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+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 )-B \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{2} \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}\) | \(251\) |
parallelrisch | \(\frac {-24 \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \left (\left (\frac {A}{2}+\frac {3 C}{8}\right ) b^{2}+B a b +a^{2} \left (A +\frac {C}{2}\right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+24 \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \left (\left (\frac {A}{2}+\frac {3 C}{8}\right ) b^{2}+B a b +a^{2} \left (A +\frac {C}{2}\right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (64 B \,b^{2}+96 \left (A +\frac {4 C}{3}\right ) a b +48 B \,a^{2}\right ) \sin \left (2 d x +2 c \right )+\left (\left (24 A +18 C \right ) b^{2}+48 B a b +24 C \,a^{2}\right ) \sin \left (3 d x +3 c \right )+\left (16 B \,b^{2}+48 \left (A +\frac {2 C}{3}\right ) a b +24 B \,a^{2}\right ) \sin \left (4 d x +4 c \right )+24 \left (\left (A +\frac {11 C}{4}\right ) b^{2}+2 B a b +C \,a^{2}\right ) \sin \left (d x +c \right )}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(278\) |
norman | \(\frac {-\frac {\left (16 a A b -4 A \,b^{2}+8 B \,a^{2}-8 B a b +8 B \,b^{2}-4 C \,a^{2}+16 C a b -5 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (16 a A b +4 A \,b^{2}+8 B \,a^{2}+8 B a b +8 B \,b^{2}+4 C \,a^{2}+16 C a b +5 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (144 a A b -12 A \,b^{2}+72 B \,a^{2}-24 B a b +40 B \,b^{2}-12 C \,a^{2}+80 C a b +9 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {\left (144 a A b +12 A \,b^{2}+72 B \,a^{2}+24 B a b +40 B \,b^{2}+12 C \,a^{2}+80 C a b -9 C \,b^{2}\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^{2} A +4 A \,b^{2}+8 B a b +4 C \,a^{2}+3 C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (8 a^{2} A +4 A \,b^{2}+8 B a b +4 C \,a^{2}+3 C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(359\) |
risch | \(-\frac {i \left (-48 a A b -32 C a b -24 B \,a^{2}-16 B \,b^{2}-12 C \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+12 A \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+33 C \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-72 B \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+9 C \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-64 B \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 A \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+12 C \,a^{2} {\mathrm e}^{5 i \left (d x +c \right )}+12 C \,a^{2} {\mathrm e}^{7 i \left (d x +c \right )}-24 B a b \,{\mathrm e}^{i \left (d x +c \right )}-128 C a b \,{\mathrm e}^{2 i \left (d x +c \right )}-48 A a b \,{\mathrm e}^{6 i \left (d x +c \right )}-24 B a b \,{\mathrm e}^{3 i \left (d x +c \right )}+24 B a b \,{\mathrm e}^{5 i \left (d x +c \right )}+24 B a b \,{\mathrm e}^{7 i \left (d x +c \right )}-144 a A b \,{\mathrm e}^{2 i \left (d x +c \right )}-96 C a b \,{\mathrm e}^{4 i \left (d x +c \right )}-144 A a b \,{\mathrm e}^{4 i \left (d x +c \right )}-12 A \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-12 C \,a^{2} {\mathrm e}^{i \left (d x +c \right )}-9 C \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-24 B \,a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-72 B \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-33 C \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-48 B \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-12 A \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A \,b^{2}}{2 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B a b}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,b^{2}}{8 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A \,b^{2}}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B a b}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,b^{2}}{8 d}\) | \(641\) |
Input:
int(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x,method =_RETURNVERBOSE)
Output:
(2*A*a*b+B*a^2)/d*tan(d*x+c)-(B*b^2+2*C*a*b)/d*(-2/3-1/3*sec(d*x+c)^2)*tan (d*x+c)+(A*b^2+2*B*a*b+C*a^2)/d*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+ c)+tan(d*x+c)))+a^2*A/d*ln(sec(d*x+c)+tan(d*x+c))+C*b^2/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 = 209, normalized size of antiderivative = 1.04 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (4 \, {\left (2 \, A + C\right )} a^{2} + 8 \, B a b + {\left (4 \, A + 3 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (4 \, {\left (2 \, A + C\right )} a^{2} + 8 \, B a b + {\left (4 \, A + 3 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (3 \, B a^{2} + 2 \, {\left (3 \, A + 2 \, C\right )} a b + 2 \, B b^{2}\right )} \cos \left (d x + c\right )^{3} + 6 \, C b^{2} + 3 \, {\left (4 \, C a^{2} + 8 \, B a b + {\left (4 \, A + 3 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (2 \, C a b + B b^{2}\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))^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
Output:
1/48*(3*(4*(2*A + C)*a^2 + 8*B*a*b + (4*A + 3*C)*b^2)*cos(d*x + c)^4*log(s in(d*x + c) + 1) - 3*(4*(2*A + C)*a^2 + 8*B*a*b + (4*A + 3*C)*b^2)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(8*(3*B*a^2 + 2*(3*A + 2*C)*a*b + 2*B*b ^2)*cos(d*x + c)^3 + 6*C*b^2 + 3*(4*C*a^2 + 8*B*a*b + (4*A + 3*C)*b^2)*cos (d*x + c)^2 + 8*(2*C*a*b + B*b^2)*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))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))**2*(A+B*sec(d*x+c)+C*sec(d*x+c)**2), x)
Output:
Integral((a + b*sec(c + d*x))**2*(A + B*sec(c + d*x) + C*sec(c + d*x)**2)* sec(c + d*x), x)
Time = 0.04 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.53 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {32 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b^{2} - 3 \, C b^{2} {\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 )} - 12 \, C a^{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 )} - 24 \, B a 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 )} - 12 \, 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^{2} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 48 \, B a^{2} \tan \left (d x + c\right ) + 96 \, A a b \tan \left (d x + c\right )}{48 \, d} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
Output:
1/48*(32*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a*b + 16*(tan(d*x + c)^3 + 3* tan(d*x + c))*B*b^2 - 3*C*b^2*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin( 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)) - 12*C*a^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d* x + c) + 1) + log(sin(d*x + c) - 1)) - 24*B*a*b*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 12*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^2*log(sec(d*x + c) + tan(d*x + c)) + 48*B*a^2*tan(d*x + c) + 96*A*a*b*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 630 vs. \(2 (188) = 376\).
Time = 0.29 (sec) , antiderivative size = 630, normalized size of antiderivative = 3.15 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
1/24*(3*(8*A*a^2 + 4*C*a^2 + 8*B*a*b + 4*A*b^2 + 3*C*b^2)*log(abs(tan(1/2* d*x + 1/2*c) + 1)) - 3*(8*A*a^2 + 4*C*a^2 + 8*B*a*b + 4*A*b^2 + 3*C*b^2)*l og(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(24*B*a^2*tan(1/2*d*x + 1/2*c)^7 - 1 2*C*a^2*tan(1/2*d*x + 1/2*c)^7 + 48*A*a*b*tan(1/2*d*x + 1/2*c)^7 - 24*B*a* b*tan(1/2*d*x + 1/2*c)^7 + 48*C*a*b*tan(1/2*d*x + 1/2*c)^7 - 12*A*b^2*tan( 1/2*d*x + 1/2*c)^7 + 24*B*b^2*tan(1/2*d*x + 1/2*c)^7 - 15*C*b^2*tan(1/2*d* x + 1/2*c)^7 - 72*B*a^2*tan(1/2*d*x + 1/2*c)^5 + 12*C*a^2*tan(1/2*d*x + 1/ 2*c)^5 - 144*A*a*b*tan(1/2*d*x + 1/2*c)^5 + 24*B*a*b*tan(1/2*d*x + 1/2*c)^ 5 - 80*C*a*b*tan(1/2*d*x + 1/2*c)^5 + 12*A*b^2*tan(1/2*d*x + 1/2*c)^5 - 40 *B*b^2*tan(1/2*d*x + 1/2*c)^5 - 9*C*b^2*tan(1/2*d*x + 1/2*c)^5 + 72*B*a^2* tan(1/2*d*x + 1/2*c)^3 + 12*C*a^2*tan(1/2*d*x + 1/2*c)^3 + 144*A*a*b*tan(1 /2*d*x + 1/2*c)^3 + 24*B*a*b*tan(1/2*d*x + 1/2*c)^3 + 80*C*a*b*tan(1/2*d*x + 1/2*c)^3 + 12*A*b^2*tan(1/2*d*x + 1/2*c)^3 + 40*B*b^2*tan(1/2*d*x + 1/2 *c)^3 - 9*C*b^2*tan(1/2*d*x + 1/2*c)^3 - 24*B*a^2*tan(1/2*d*x + 1/2*c) - 1 2*C*a^2*tan(1/2*d*x + 1/2*c) - 48*A*a*b*tan(1/2*d*x + 1/2*c) - 24*B*a*b*ta n(1/2*d*x + 1/2*c) - 48*C*a*b*tan(1/2*d*x + 1/2*c) - 12*A*b^2*tan(1/2*d*x + 1/2*c) - 24*B*b^2*tan(1/2*d*x + 1/2*c) - 15*C*b^2*tan(1/2*d*x + 1/2*c))/ (tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 16.21 (sec) , antiderivative size = 389, normalized size of antiderivative = 1.94 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (A\,b^2-2\,B\,a^2-2\,B\,b^2+C\,a^2+\frac {5\,C\,b^2}{4}-4\,A\,a\,b+2\,B\,a\,b-4\,C\,a\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,B\,a^2-A\,b^2+\frac {10\,B\,b^2}{3}-C\,a^2+\frac {3\,C\,b^2}{4}+12\,A\,a\,b-2\,B\,a\,b+\frac {20\,C\,a\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {3\,C\,b^2}{4}-6\,B\,a^2-\frac {10\,B\,b^2}{3}-C\,a^2-A\,b^2-12\,A\,a\,b-2\,B\,a\,b-\frac {20\,C\,a\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (A\,b^2+2\,B\,a^2+2\,B\,b^2+C\,a^2+\frac {5\,C\,b^2}{4}+4\,A\,a\,b+2\,B\,a\,b+4\,C\,a\,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 )}+\frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A\,a^2+\frac {A\,b^2}{2}+\frac {C\,a^2}{2}+\frac {3\,C\,b^2}{8}+B\,a\,b\right )}{4\,A\,a^2+2\,A\,b^2+2\,C\,a^2+\frac {3\,C\,b^2}{2}+4\,B\,a\,b}\right )\,\left (2\,A\,a^2+A\,b^2+C\,a^2+\frac {3\,C\,b^2}{4}+2\,B\,a\,b\right )}{d} \] Input:
int(((a + b/cos(c + d*x))^2*(A + B/cos(c + d*x) + C/cos(c + d*x)^2))/cos(c + d*x),x)
Output:
(tan(c/2 + (d*x)/2)^7*(A*b^2 - 2*B*a^2 - 2*B*b^2 + C*a^2 + (5*C*b^2)/4 - 4 *A*a*b + 2*B*a*b - 4*C*a*b) - tan(c/2 + (d*x)/2)^3*(A*b^2 + 6*B*a^2 + (10* B*b^2)/3 + C*a^2 - (3*C*b^2)/4 + 12*A*a*b + 2*B*a*b + (20*C*a*b)/3) + tan( c/2 + (d*x)/2)^5*(6*B*a^2 - A*b^2 + (10*B*b^2)/3 - C*a^2 + (3*C*b^2)/4 + 1 2*A*a*b - 2*B*a*b + (20*C*a*b)/3) + tan(c/2 + (d*x)/2)*(A*b^2 + 2*B*a^2 + 2*B*b^2 + C*a^2 + (5*C*b^2)/4 + 4*A*a*b + 2*B*a*b + 4*C*a*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)) + (atanh((4*tan(c/2 + (d*x)/2)*(A*a^2 + (A*b^2)/2 + (C *a^2)/2 + (3*C*b^2)/8 + B*a*b))/(4*A*a^2 + 2*A*b^2 + 2*C*a^2 + (3*C*b^2)/2 + 4*B*a*b))*(2*A*a^2 + A*b^2 + C*a^2 + (3*C*b^2)/4 + 2*B*a*b))/d
Time = 0.15 (sec) , antiderivative size = 770, normalized size of antiderivative = 3.85 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx =\text {Too large to display} \] Input:
int(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
( - 72*cos(c + d*x)*sin(c + d*x)**3*a**2*b - 32*cos(c + d*x)*sin(c + d*x)* *3*a*b*c - 16*cos(c + d*x)*sin(c + d*x)**3*b**3 + 72*cos(c + d*x)*sin(c + d*x)*a**2*b + 48*cos(c + d*x)*sin(c + d*x)*a*b*c + 24*cos(c + d*x)*sin(c + d*x)*b**3 - 24*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a**3 - 12*log(ta n((c + d*x)/2) - 1)*sin(c + d*x)**4*a**2*c - 36*log(tan((c + d*x)/2) - 1)* sin(c + d*x)**4*a*b**2 - 9*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*b**2* c + 48*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**3 + 24*log(tan((c + d* x)/2) - 1)*sin(c + d*x)**2*a**2*c + 72*log(tan((c + d*x)/2) - 1)*sin(c + d *x)**2*a*b**2 + 18*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b**2*c - 24*l og(tan((c + d*x)/2) - 1)*a**3 - 12*log(tan((c + d*x)/2) - 1)*a**2*c - 36*l og(tan((c + d*x)/2) - 1)*a*b**2 - 9*log(tan((c + d*x)/2) - 1)*b**2*c + 24* log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a**3 + 12*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*a**2*c + 36*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4* a*b**2 + 9*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*b**2*c - 48*log(tan(( c + d*x)/2) + 1)*sin(c + d*x)**2*a**3 - 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*c - 72*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a*b**2 - 18*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b**2*c + 24*log(tan((c + d*x) /2) + 1)*a**3 + 12*log(tan((c + d*x)/2) + 1)*a**2*c + 36*log(tan((c + d*x) /2) + 1)*a*b**2 + 9*log(tan((c + d*x)/2) + 1)*b**2*c - 12*sin(c + d*x)**3* a**2*c - 36*sin(c + d*x)**3*a*b**2 - 9*sin(c + d*x)**3*b**2*c + 12*sin(...