Integrand size = 31, antiderivative size = 112 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=2 a^2 A x+\frac {a^2 (2 A+3 C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {A (a+a \sec (c+d x))^2 \sin (c+d x)}{d}-\frac {a^2 (2 A-3 C) \tan (c+d x)}{2 d}-\frac {(2 A-C) \left (a^2+a^2 \sec (c+d x)\right ) \tan (c+d x)}{2 d} \] Output:
2*a^2*A*x+1/2*a^2*(2*A+3*C)*arctanh(sin(d*x+c))/d+A*(a+a*sec(d*x+c))^2*sin (d*x+c)/d-1/2*a^2*(2*A-3*C)*tan(d*x+c)/d-1/2*(2*A-C)*(a^2+a^2*sec(d*x+c))* tan(d*x+c)/d
Time = 0.44 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.12 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=2 a^2 A x+\frac {2 a^2 A \coth ^{-1}(\sin (c+d x))}{d}+\frac {a^2 C \coth ^{-1}(\sin (c+d x))}{d}-\frac {a^2 A \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a^2 A \sin (c+d x)}{d}+\frac {2 a^2 C \tan (c+d x)}{d}+\frac {a^2 C \sec (c+d x) \tan (c+d x)}{2 d} \] Input:
Integrate[Cos[c + d*x]*(a + a*Sec[c + d*x])^2*(A + C*Sec[c + d*x]^2),x]
Output:
2*a^2*A*x + (2*a^2*A*ArcCoth[Sin[c + d*x]])/d + (a^2*C*ArcCoth[Sin[c + d*x ]])/d - (a^2*A*ArcTanh[Sin[c + d*x]])/d + (a^2*C*ArcTanh[Sin[c + d*x]])/(2 *d) + (a^2*A*Sin[c + d*x])/d + (2*a^2*C*Tan[c + d*x])/d + (a^2*C*Sec[c + d *x]*Tan[c + d*x])/(2*d)
Time = 0.72 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {3042, 4575, 3042, 4405, 3042, 4402, 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 \cos (c+d x) (a \sec (c+d x)+a)^2 \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4575 |
\(\displaystyle \frac {\int (\sec (c+d x) a+a)^2 (2 a A-a (2 A-C) \sec (c+d x))dx}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (2 a A-a (2 A-C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 4405 |
\(\displaystyle \frac {\frac {1}{2} \int (\sec (c+d x) a+a) \left (4 a^2 A-a^2 (2 A-3 C) \sec (c+d x)\right )dx-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{2} \int \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (4 a^2 A-a^2 (2 A-3 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 4402 |
\(\displaystyle \frac {\frac {1}{2} \left (-a^3 (2 A-3 C) \int \sec ^2(c+d x)dx+a^3 (2 A+3 C) \int \sec (c+d x)dx+4 a^3 A x\right )-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{2} \left (a^3 (2 A+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-a^3 (2 A-3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+4 a^3 A x\right )-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {1}{2} \left (\frac {a^3 (2 A-3 C) \int 1d(-\tan (c+d x))}{d}+a^3 (2 A+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+4 a^3 A x\right )-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {1}{2} \left (a^3 (2 A+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^3 (2 A-3 C) \tan (c+d x)}{d}+4 a^3 A x\right )-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{2} \left (\frac {a^3 (2 A+3 C) \text {arctanh}(\sin (c+d x))}{d}-\frac {a^3 (2 A-3 C) \tan (c+d x)}{d}+4 a^3 A x\right )-\frac {(2 A-C) \tan (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{2 d}}{a}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^2}{d}\) |
Input:
Int[Cos[c + d*x]*(a + a*Sec[c + d*x])^2*(A + C*Sec[c + d*x]^2),x]
Output:
(A*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/d + (-1/2*((2*A - C)*(a^3 + a^3*Se c[c + d*x])*Tan[c + d*x])/d + (4*a^3*A*x + (a^3*(2*A + 3*C)*ArcTanh[Sin[c + d*x]])/d - (a^3*(2*A - 3*C)*Tan[c + d*x])/d)/2)/a
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_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[a*c*x, x] + (Simp[b*d Int[Csc[e + f*x]^2, x], x ] + Simp[(b*c + a*d) Int[Csc[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f }, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Simp[1/m Int[(a + b*Csc[e + f*x])^(m - 1)*Simp[a*c*m + (b*c*m + a*d*(2*m - 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && GtQ[m, 1] && EqQ[a^2 - b^2, 0] && IntegerQ[2 *m]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[A*Co t[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/( b*d*n) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[a*A*m - b *(A*(m + n + 1) + C*n)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, C, m}, x] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)] && (LtQ[n, -2^(-1)] || EqQ[m + n + 1, 0])
Time = 0.42 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.02
method | result | size |
derivativedivides | \(\frac {a^{2} A \sin \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 a^{2} A \left (d x +c \right )+2 C \,a^{2} \tan \left (d x +c \right )+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 )}{d}\) | \(114\) |
default | \(\frac {a^{2} A \sin \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 a^{2} A \left (d x +c \right )+2 C \,a^{2} \tan \left (d x +c \right )+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 )}{d}\) | \(114\) |
parallelrisch | \(\frac {a^{2} \left (-2 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {3 C}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+2 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {3 C}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 d x A \cos \left (2 d x +2 c \right )+4 \sin \left (2 d x +2 c \right ) C +A \sin \left (3 d x +3 c \right )+\sin \left (d x +c \right ) \left (A +2 C \right )+4 d x A \right )}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(137\) |
risch | \(2 a^{2} A x -\frac {i a^{2} A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a^{2} A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {i C \,a^{2} \left ({\mathrm e}^{3 i \left (d x +c \right )}-4 \,{\mathrm e}^{2 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}-4\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}\) | \(190\) |
norman | \(\frac {\frac {a^{2} \left (2 A -3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-2 a^{2} A x +4 a^{2} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-4 a^{2} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+2 a^{2} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {3 a^{2} \left (2 A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {a^{2} \left (2 A +5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {a^{2} \left (6 A -5 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}-\frac {a^{2} \left (2 A +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a^{2} \left (2 A +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(248\) |
Input:
int(cos(d*x+c)*(a+a*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBO SE)
Output:
1/d*(a^2*A*sin(d*x+c)+C*a^2*ln(sec(d*x+c)+tan(d*x+c))+2*a^2*A*(d*x+c)+2*C* a^2*tan(d*x+c)+a^2*A*ln(sec(d*x+c)+tan(d*x+c))+C*a^2*(1/2*sec(d*x+c)*tan(d *x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.09 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.15 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {8 \, A a^{2} d x \cos \left (d x + c\right )^{2} + {\left (2 \, A + 3 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, A + 3 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, A a^{2} \cos \left (d x + c\right )^{2} + 4 \, C a^{2} \cos \left (d x + c\right ) + C a^{2}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x, algorithm="f ricas")
Output:
1/4*(8*A*a^2*d*x*cos(d*x + c)^2 + (2*A + 3*C)*a^2*cos(d*x + c)^2*log(sin(d *x + c) + 1) - (2*A + 3*C)*a^2*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*( 2*A*a^2*cos(d*x + c)^2 + 4*C*a^2*cos(d*x + c) + C*a^2)*sin(d*x + c))/(d*co s(d*x + c)^2)
\[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=a^{2} \left (\int A \cos {\left (c + d x \right )}\, dx + \int 2 A \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int A \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 C \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))**2*(A+C*sec(d*x+c)**2),x)
Output:
a**2*(Integral(A*cos(c + d*x), x) + Integral(2*A*cos(c + d*x)*sec(c + d*x) , x) + Integral(A*cos(c + d*x)*sec(c + d*x)**2, x) + Integral(C*cos(c + d* x)*sec(c + d*x)**2, x) + Integral(2*C*cos(c + d*x)*sec(c + d*x)**3, x) + I ntegral(C*cos(c + d*x)*sec(c + d*x)**4, x))
Time = 0.04 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.27 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {8 \, {\left (d x + c\right )} A a^{2} - 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 )} + 2 \, A a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, A a^{2} \sin \left (d x + c\right ) + 8 \, C a^{2} \tan \left (d x + c\right )}{4 \, d} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x, algorithm="m axima")
Output:
1/4*(8*(d*x + c)*A*a^2 - 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)) + 2*A*a^2*(log(sin(d*x + c) + 1 ) - log(sin(d*x + c) - 1)) + 2*C*a^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 4*A*a^2*sin(d*x + c) + 8*C*a^2*tan(d*x + c))/d
Time = 0.33 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.36 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, {\left (d x + c\right )} A a^{2} + \frac {4 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + {\left (2 \, A a^{2} + 3 \, C a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (2 \, A a^{2} + 3 \, C a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, C a^{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 )}^{2}}}{2 \, d} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x, algorithm="g iac")
Output:
1/2*(4*(d*x + c)*A*a^2 + 4*A*a^2*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c )^2 + 1) + (2*A*a^2 + 3*C*a^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (2*A*a ^2 + 3*C*a^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(3*C*a^2*tan(1/2*d*x + 1/2*c)^3 - 5*C*a^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^2) /d
Time = 11.73 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.38 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {4\,A\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {C\,a^2\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2} \] Input:
int(cos(c + d*x)*(A + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^2,x)
Output:
(A*a^2*sin(c + d*x))/d + (4*A*a^2*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/ 2)))/d + (2*A*a^2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (3*C*a ^2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*C*a^2*sin(c + d*x) )/(d*cos(c + d*x)) + (C*a^2*sin(c + d*x))/(2*d*cos(c + d*x)^2)
Time = 0.16 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.24 \[ \int \cos (c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {a^{2} \left (-4 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a -3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} c +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a +3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) c +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a +3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} c -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a -3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) c +2 \sin \left (d x +c \right )^{3} a +4 \sin \left (d x +c \right )^{2} a c +4 \sin \left (d x +c \right )^{2} a d x -2 \sin \left (d x +c \right ) a -\sin \left (d x +c \right ) c -4 a c -4 a d x \right )}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(cos(d*x+c)*(a+a*sec(d*x+c))^2*(A+C*sec(d*x+c)^2),x)
Output:
(a**2*( - 4*cos(c + d*x)*sin(c + d*x)*c - 2*log(tan((c + d*x)/2) - 1)*sin( c + d*x)**2*a - 3*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*c + 2*log(tan( (c + d*x)/2) - 1)*a + 3*log(tan((c + d*x)/2) - 1)*c + 2*log(tan((c + d*x)/ 2) + 1)*sin(c + d*x)**2*a + 3*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*c - 2*log(tan((c + d*x)/2) + 1)*a - 3*log(tan((c + d*x)/2) + 1)*c + 2*sin(c + d*x)**3*a + 4*sin(c + d*x)**2*a*c + 4*sin(c + d*x)**2*a*d*x - 2*sin(c + d*x)*a - sin(c + d*x)*c - 4*a*c - 4*a*d*x))/(2*d*(sin(c + d*x)**2 - 1))