Integrand size = 27, antiderivative size = 32 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=a (A+B) x+\frac {a B \text {arctanh}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d} \] Output:
a*(A+B)*x+a*B*arctanh(sin(d*x+c))/d+a*A*sin(d*x+c)/d
Time = 0.04 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.44 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=a A x+a B x+\frac {a B \coth ^{-1}(\sin (c+d x))}{d}+\frac {a A \cos (d x) \sin (c)}{d}+\frac {a A \cos (c) \sin (d x)}{d} \] Input:
Integrate[Cos[c + d*x]*(a + a*Sec[c + d*x])*(A + B*Sec[c + d*x]),x]
Output:
a*A*x + a*B*x + (a*B*ArcCoth[Sin[c + d*x]])/d + (a*A*Cos[d*x]*Sin[c])/d + (a*A*Cos[c]*Sin[d*x])/d
Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 4484, 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 \cos (c+d x) (a \sec (c+d x)+a) (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {a A \sin (c+d x)}{d}-\int (-a (A+B)-a B \sec (c+d x))dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a x (A+B)+\frac {a A \sin (c+d x)}{d}+\frac {a B \text {arctanh}(\sin (c+d x))}{d}\) |
Input:
Int[Cos[c + d*x]*(a + a*Sec[c + d*x])*(A + B*Sec[c + d*x]),x]
Output:
a*(A + B)*x + (a*B*ArcTanh[Sin[c + d*x]])/d + (a*A*Sin[c + d*x])/d
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*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]
Time = 0.18 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.50
method | result | size |
derivativedivides | \(\frac {a A \left (d x +c \right )+B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a A \sin \left (d x +c \right )+B a \left (d x +c \right )}{d}\) | \(48\) |
default | \(\frac {a A \left (d x +c \right )+B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a A \sin \left (d x +c \right )+B a \left (d x +c \right )}{d}\) | \(48\) |
parallelrisch | \(\frac {\left (-B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+A \sin \left (d x +c \right )+\left (A +B \right ) x d \right ) a}{d}\) | \(50\) |
risch | \(a A x +a x B -\frac {i a A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}\) | \(83\) |
norman | \(\frac {\left (-a A -B a \right ) x +\left (a A +B a \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {2 a A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{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 )}+\frac {B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(136\) |
Input:
int(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*A*(d*x+c)+B*a*ln(sec(d*x+c)+tan(d*x+c))+a*A*sin(d*x+c)+B*a*(d*x+c))
Time = 0.09 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.59 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {2 \, {\left (A + B\right )} a d x + B a \log \left (\sin \left (d x + c\right ) + 1\right ) - B a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x, algorithm="frica s")
Output:
1/2*(2*(A + B)*a*d*x + B*a*log(sin(d*x + c) + 1) - B*a*log(-sin(d*x + c) + 1) + 2*A*a*sin(d*x + c))/d
\[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=a \left (\int A \cos {\left (c + d x \right )}\, dx + \int A \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x)
Output:
a*(Integral(A*cos(c + d*x), x) + Integral(A*cos(c + d*x)*sec(c + d*x), x) + Integral(B*cos(c + d*x)*sec(c + d*x), x) + Integral(B*cos(c + d*x)*sec(c + d*x)**2, x))
Time = 0.04 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.81 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {2 \, {\left (d x + c\right )} A a + 2 \, {\left (d x + c\right )} B a + B a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x, algorithm="maxim a")
Output:
1/2*(2*(d*x + c)*A*a + 2*(d*x + c)*B*a + B*a*(log(sin(d*x + c) + 1) - log( sin(d*x + c) - 1)) + 2*A*a*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (32) = 64\).
Time = 0.13 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.47 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (A a + B a\right )} {\left (d x + c\right )} + \frac {2 \, A a \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}}{d} \] Input:
integrate(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x, algorithm="giac" )
Output:
(B*a*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - B*a*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (A*a + B*a)*(d*x + c) + 2*A*a*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d
Time = 11.94 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.12 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {A\,a\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\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\,B\,a\,\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\,B\,a\,\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} \] Input:
int(cos(c + d*x)*(A + B/cos(c + d*x))*(a + a/cos(c + d*x)),x)
Output:
(A*a*sin(c + d*x))/d + (2*A*a*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))) /d + (2*B*a*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*B*a*atanh( sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d
Time = 0.15 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.78 \[ \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {a \left (-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b +\sin \left (d x +c \right ) a +a c +a d x +b c +b d x \right )}{d} \] Input:
int(cos(d*x+c)*(a+a*sec(d*x+c))*(A+B*sec(d*x+c)),x)
Output:
(a*( - log(tan((c + d*x)/2) - 1)*b + log(tan((c + d*x)/2) + 1)*b + sin(c + d*x)*a + a*c + a*d*x + b*c + b*d*x))/d