Integrand size = 31, antiderivative size = 170 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (4 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a \left (12 A b^2-a^2 C+8 b^2 C\right ) \tan (c+d x)}{6 b d}-\frac {\left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \sec (c+d x) \tan (c+d x)}{24 d}-\frac {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*(4*a^2*(2*A+C)+b^2*(4*A+3*C))*arctanh(sin(d*x+c))/d+1/6*a*(12*A*b^2-C* a^2+8*C*b^2)*tan(d*x+c)/b/d-1/24*(2*C*a^2-3*b^2*(4*A+3*C))*sec(d*x+c)*tan( d*x+c)/d-1/12*a*C*(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 = 1.41 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.69 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+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+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+4 a^2 C+3 b^2 C\right ) \sec (c+d x)+6 b^2 C \sec ^3(c+d x)+16 a b \left (3 (A+C)+C \tan ^2(c+d x)\right )\right )}{24 d} \] Input:
Integrate[Sec[c + d*x]*(a + b*Sec[c + d*x])^2*(A + C*Sec[c + d*x]^2),x]
Output:
(24*a^2*A*ArcCoth[Sin[c + d*x]] + 3*(4*A*b^2 + 4*a^2*C + 3*b^2*C)*ArcTanh[ Sin[c + d*x]] + Tan[c + d*x]*(3*(4*A*b^2 + 4*a^2*C + 3*b^2*C)*Sec[c + d*x] + 6*b^2*C*Sec[c + d*x]^3 + 16*a*b*(3*(A + C) + C*Tan[c + d*x]^2)))/(24*d)
Time = 1.03 (sec) , antiderivative size = 180, 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.387, Rules used = {3042, 4571, 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+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+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4571 |
\(\displaystyle \frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 (b (4 A+3 C)-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)-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 (a b (12 A+7 C)-\left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \sec (c+d x)\right )dx-\frac {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 (a b (12 A+7 C)+\left (3 b^2 (4 A+3 C)-2 a^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {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+b^2 (4 A+3 C)\right )+4 a \left (-C a^2+12 A b^2+8 b^2 C\right ) \sec (c+d x)\right )dx-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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+b^2 (4 A+3 C)\right )+4 a \left (-C a^2+12 A b^2+8 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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 (4 a \left (a^2 (-C)+12 A b^2+8 b^2 C\right ) \int \sec ^2(c+d x)dx+3 b \left (4 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \int \sec (c+d x)dx\right )-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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)+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+4 a \left (a^2 (-C)+12 A b^2+8 b^2 C\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\right )-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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)+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {4 a \left (a^2 (-C)+12 A b^2+8 b^2 C\right ) \int 1d(-\tan (c+d x))}{d}\right )-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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)+b^2 (4 A+3 C)\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {4 a \left (a^2 (-C)+12 A b^2+8 b^2 C\right ) \tan (c+d x)}{d}\right )-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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 {1}{2} \left (\frac {3 b \left (4 a^2 (2 A+C)+b^2 (4 A+3 C)\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {4 a \left (a^2 (-C)+12 A b^2+8 b^2 C\right ) \tan (c+d x)}{d}\right )-\frac {b \left (2 a^2 C-3 b^2 (4 A+3 C)\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {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 + C*Sec[c + d*x]^2),x]
Output:
(C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*b*d) + (-1/3*(a*C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/d + (-1/2*(b*(2*a^2*C - 3*b^2*(4*A + 3*C))*Sec[c + d*x]*Tan[c + d*x])/d + ((3*b*(4*a^2*(2*A + C) + b^2*(4*A + 3*C))*ArcTanh[ Sin[c + d*x]])/d + (4*a*(12*A*b^2 - a^2*C + 8*b^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_)]^2*(C_.))*(csc[ (e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-C)*Cot[e + f*x] *((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) In t[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*A*(m + 2) + b*C*(m + 1) - a*C* Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && !LtQ[m, -1]
Time = 8.21 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.95
method | result | size |
parts | \(\frac {\left (A \,b^{2}+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}+\frac {2 a A b \tan \left (d x +c \right )}{d}-\frac {2 C a b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(162\) |
derivativedivides | \(\frac {a^{2} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\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 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 )+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}\) | \(180\) |
default | \(\frac {a^{2} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\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 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 )+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}\) | \(180\) |
parallelrisch | \(\frac {-16 \left (\frac {\left (A +\frac {3 C}{4}\right ) b^{2}}{2}+a^{2} \left (A +\frac {C}{2}\right )\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+16 \left (\frac {\left (A +\frac {3 C}{4}\right ) b^{2}}{2}+a^{2} \left (A +\frac {C}{2}\right )\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (b^{2} \left (4 A +3 C \right )+4 C \,a^{2}\right ) \sin \left (3 d x +3 c \right )+16 a \left (A +\frac {4 C}{3}\right ) b \sin \left (2 d x +2 c \right )+8 \left (A +\frac {2 C}{3}\right ) a b \sin \left (4 d x +4 c \right )+4 \left (\left (A +\frac {11 C}{4}\right ) b^{2}+C \,a^{2}\right ) \sin \left (d x +c \right )}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(230\) |
norman | \(\frac {-\frac {\left (16 a A b -4 A \,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}+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}-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}+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}+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}+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}\) | \(281\) |
risch | \(-\frac {i \left (12 A \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+12 C \,a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+9 C \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-48 A a b \,{\mathrm e}^{6 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 )}+33 C \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-144 A a b \,{\mathrm e}^{4 i \left (d x +c \right )}-96 C a b \,{\mathrm e}^{4 i \left (d x +c \right )}-12 A \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-12 C \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-33 C \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-144 a A b \,{\mathrm e}^{2 i \left (d x +c \right )}-128 C a b \,{\mathrm e}^{2 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 )}-48 a A b -32 C a b \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 {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 {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}\) | \(457\) |
Input:
int(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBO SE)
Output:
(A*b^2+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)))+2*a*A*b/d*tan(d*x+c)-2*C*a* b/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)
Time = 0.09 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.01 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (4 \, {\left (2 \, A + C\right )} a^{2} + {\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} + {\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 (16 \, {\left (3 \, A + 2 \, C\right )} a b \cos \left (d x + c\right )^{3} + 16 \, C a b \cos \left (d x + c\right ) + 6 \, C b^{2} + 3 \, {\left (4 \, C a^{2} + {\left (4 \, A + 3 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{2}\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+C*sec(d*x+c)^2),x, algorithm="f ricas")
Output:
1/48*(3*(4*(2*A + C)*a^2 + (4*A + 3*C)*b^2)*cos(d*x + c)^4*log(sin(d*x + c ) + 1) - 3*(4*(2*A + C)*a^2 + (4*A + 3*C)*b^2)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(16*(3*A + 2*C)*a*b*cos(d*x + c)^3 + 16*C*a*b*cos(d*x + c) + 6*C*b^2 + 3*(4*C*a^2 + (4*A + 3*C)*b^2)*cos(d*x + c)^2)*sin(d*x + c))/(d *cos(d*x + c)^4)
\[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{2} \sec {\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))**2*(A+C*sec(d*x+c)**2),x)
Output:
Integral((A + C*sec(c + d*x)**2)*(a + b*sec(c + d*x))**2*sec(c + d*x), x)
Time = 0.04 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.32 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+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 - 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 )} - 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 ) + 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+C*sec(d*x+c)^2),x, algorithm="m axima")
Output:
1/48*(32*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a*b - 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(si n(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)) - 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)) + 96*A*a*b*tan( d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 426 vs. \(2 (159) = 318\).
Time = 0.27 (sec) , antiderivative size = 426, normalized size of antiderivative = 2.51 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (8 \, A a^{2} + 4 \, C a^{2} + 4 \, A b^{2} + 3 \, C b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (8 \, A a^{2} + 4 \, C a^{2} + 4 \, A b^{2} + 3 \, C b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 48 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 48 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 144 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 80 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 144 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 48 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 48 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C 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 )}^{4}}}{24 \, d} \] Input:
integrate(sec(d*x+c)*(a+b*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x, algorithm="g iac")
Output:
1/24*(3*(8*A*a^2 + 4*C*a^2 + 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 + 4*A*b^2 + 3*C*b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(12*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 - 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 + 15*C*b^2*tan(1/2*d*x + 1/2*c)^7 - 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 + 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 + 9*C*b^2*tan(1/2*d*x + 1/2*c)^5 - 12*C*a^2*ta n(1/2*d*x + 1/2*c)^3 - 144*A*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 + 9*C*b^2*tan(1/2*d*x + 1/2*c)^3 + 12*C*a^2*tan(1/2*d*x + 1/2*c) + 48*A*a*b*tan(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) + 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 = 15.17 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.81 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (A\,b^2+C\,a^2+\frac {5\,C\,b^2}{4}-4\,A\,a\,b-4\,C\,a\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {3\,C\,b^2}{4}-C\,a^2-A\,b^2+12\,A\,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}-C\,a^2-A\,b^2-12\,A\,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+C\,a^2+\frac {5\,C\,b^2}{4}+4\,A\,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}\right )}{4\,A\,a^2+2\,A\,b^2+2\,C\,a^2+\frac {3\,C\,b^2}{2}}\right )\,\left (2\,A\,a^2+A\,b^2+C\,a^2+\frac {3\,C\,b^2}{4}\right )}{d} \] Input:
int(((A + C/cos(c + d*x)^2)*(a + b/cos(c + d*x))^2)/cos(c + d*x),x)
Output:
(tan(c/2 + (d*x)/2)*(A*b^2 + C*a^2 + (5*C*b^2)/4 + 4*A*a*b + 4*C*a*b) + ta n(c/2 + (d*x)/2)^7*(A*b^2 + C*a^2 + (5*C*b^2)/4 - 4*A*a*b - 4*C*a*b) - tan (c/2 + (d*x)/2)^3*(A*b^2 + C*a^2 - (3*C*b^2)/4 + 12*A*a*b + (20*C*a*b)/3) + tan(c/2 + (d*x)/2)^5*((3*C*b^2)/4 - C*a^2 - A*b^2 + 12*A*a*b + (20*C*a*b )/3))/(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))/(4*A*a^2 + 2*A*b^2 + 2*C*a^2 + ( 3*C*b^2)/2))*(2*A*a^2 + A*b^2 + C*a^2 + (3*C*b^2)/4))/d
Time = 0.16 (sec) , antiderivative size = 734, normalized size of antiderivative = 4.32 \[ \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (A+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+C*sec(d*x+c)^2),x)
Output:
( - 48*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 + 48*cos(c + d*x)*sin(c + d*x)*a**2*b + 48*cos(c + d*x)*sin(c + d *x)*a*b*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 - 12*log(tan((c + d*x)/2) - 1)*s in(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 + 24*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*lo g(tan((c + d*x)/2) - 1)*a**3 - 12*log(tan((c + d*x)/2) - 1)*a**2*c - 12*lo g(tan((c + d*x)/2) - 1)*a*b**2 - 9*log(tan((c + d*x)/2) - 1)*b**2*c + 24*l og(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 + 12*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 - 24*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a*b**2 - 1 8*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 + 12*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 - 12*sin(c + d*x)**3*a*b**2 - 9*sin(c + d*x)**3*b**2*c + 12*sin(c + d*x)*a**2*c + 12*sin(c + d*x)*a*b**2 + 15*sin(c + d*x)*b**2*c)/(24*d*(s...