Integrand size = 27, antiderivative size = 27 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=B x+\frac {C \text {arctanh}(\sin (c+d x))}{d}+\frac {A \sin (c+d x)}{d} \] Output:
B*x+C*arctanh(sin(d*x+c))/d+A*sin(d*x+c)/d
Time = 0.01 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.41 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=B x+\frac {C \coth ^{-1}(\sin (c+d x))}{d}+\frac {A \cos (d x) \sin (c)}{d}+\frac {A \cos (c) \sin (d x)}{d} \] Input:
Integrate[Cos[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
B*x + (C*ArcCoth[Sin[c + d*x]])/d + (A*Cos[d*x]*Sin[c])/d + (A*Cos[c]*Sin[ d*x])/d
Time = 0.32 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3042, 4535, 24, 3042, 4533, 3042, 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) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \int \cos (c+d x) \left (C \sec ^2(c+d x)+A\right )dx+B \int 1dx\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \int \cos (c+d x) \left (C \sec ^2(c+d x)+A\right )dx+B x\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+B x\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle C \int \sec (c+d x)dx+\frac {A \sin (c+d x)}{d}+B x\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle C \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {A \sin (c+d x)}{d}+B x\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {A \sin (c+d x)}{d}+\frac {C \text {arctanh}(\sin (c+d x))}{d}+B x\) |
Input:
Int[Cos[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
B*x + (C*ArcTanh[Sin[c + d*x]])/d + (A*Sin[c + d*x])/d
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_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Time = 0.14 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.37
method | result | size |
derivativedivides | \(\frac {A \sin \left (d x +c \right )+B \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(37\) |
default | \(\frac {A \sin \left (d x +c \right )+B \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(37\) |
parallelrisch | \(\frac {B x d +C \left (-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )\right )+A \sin \left (d x +c \right )}{d}\) | \(47\) |
risch | \(B x -\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(74\) |
norman | \(\frac {B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-B x -\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 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 {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(119\) |
Input:
int(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(A*sin(d*x+c)+B*(d*x+c)+C*ln(sec(d*x+c)+tan(d*x+c)))
Time = 0.09 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.67 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, B d x + C \log \left (\sin \left (d x + c\right ) + 1\right ) - C \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas" )
Output:
1/2*(2*B*d*x + C*log(sin(d*x + c) + 1) - C*log(-sin(d*x + c) + 1) + 2*A*si n(d*x + c))/d
\[ \int \cos (c+d x) \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 )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)**2),x)
Output:
Integral((A + B*sec(c + d*x) + C*sec(c + d*x)**2)*cos(c + d*x), x)
Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.70 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} B + C {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima" )
Output:
1/2*(2*(d*x + c)*B + C*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2 *A*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (27) = 54\).
Time = 0.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.59 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (d x + c\right )} B + C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, 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+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
((d*x + c)*B + C*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - C*log(abs(tan(1/2*d* x + 1/2*c) - 1)) + 2*A*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/ d
Time = 11.59 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.52 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,B\,\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\,C\,\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 {A\,\sin \left (c+d\,x\right )}{d} \] Input:
int(cos(c + d*x)*(A + B/cos(c + d*x) + C/cos(c + d*x)^2),x)
Output:
(2*B*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*C*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (A*sin(c + d*x))/d
Time = 0.16 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.81 \[ \int \cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) c +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) c +\sin \left (d x +c \right ) a +b c +b d x}{d} \] Input:
int(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
( - log(tan((c + d*x)/2) - 1)*c + log(tan((c + d*x)/2) + 1)*c + sin(c + d* x)*a + b*c + b*d*x)/d