Integrand size = 23, antiderivative size = 58 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=a A x+\frac {b (2 A+C) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a C \tan (c+d x)}{d}+\frac {b C \sec (c+d x) \tan (c+d x)}{2 d} \] Output:
a*A*x+1/2*b*(2*A+C)*arctanh(sin(d*x+c))/d+a*C*tan(d*x+c)/d+1/2*b*C*sec(d*x +c)*tan(d*x+c)/d
Time = 0.01 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.16 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=a A x+\frac {A b \coth ^{-1}(\sin (c+d x))}{d}+\frac {b C \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a C \tan (c+d x)}{d}+\frac {b C \sec (c+d x) \tan (c+d x)}{2 d} \] Input:
Integrate[(a + b*Sec[c + d*x])*(A + C*Sec[c + d*x]^2),x]
Output:
a*A*x + (A*b*ArcCoth[Sin[c + d*x]])/d + (b*C*ArcTanh[Sin[c + d*x]])/(2*d) + (a*C*Tan[c + d*x])/d + (b*C*Sec[c + d*x]*Tan[c + d*x])/(2*d)
Time = 0.26 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.07, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 4537, 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 (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4537 |
\(\displaystyle \frac {1}{2} \int \left (2 a C \sec ^2(c+d x)+b (2 A+C) \sec (c+d x)+2 a A\right )dx+\frac {b C \tan (c+d x) \sec (c+d x)}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (2 a A x+\frac {2 a C \tan (c+d x)}{d}+\frac {b (2 A+C) \text {arctanh}(\sin (c+d x))}{d}\right )+\frac {b C \tan (c+d x) \sec (c+d x)}{2 d}\) |
Input:
Int[(a + b*Sec[c + d*x])*(A + C*Sec[c + d*x]^2),x]
Output:
(b*C*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (2*a*A*x + (b*(2*A + C)*ArcTanh[Si n[c + d*x]])/d + (2*a*C*Tan[c + d*x])/d)/2
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_. ) + (a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*(Cot[e + f*x]/(2*f)), x] + Simp[1/2 Int[Simp[2*A*a + b*(2*A + C)*Csc[e + f*x] + 2*a*C*Csc[e + f*x]^ 2, x], x], x] /; FreeQ[{a, b, e, f, A, C}, x]
Time = 0.87 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.28
method | result | size |
derivativedivides | \(\frac {a A \left (d x +c \right )+C a \tan \left (d x +c \right )+A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C 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 )}{d}\) | \(74\) |
default | \(\frac {a A \left (d x +c \right )+C a \tan \left (d x +c \right )+A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C 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 )}{d}\) | \(74\) |
parts | \(a A x +\frac {A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a C \tan \left (d x +c \right )}{d}+\frac {C 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 )}{d}\) | \(75\) |
parallelrisch | \(\frac {-\left (A +\frac {C}{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (A +\frac {C}{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+a A x d \cos \left (2 d x +2 c \right )+a A x d +C a \sin \left (2 d x +2 c \right )+C b \sin \left (d x +c \right )}{d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(120\) |
norman | \(\frac {a A x +a A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {\left (2 a +b \right ) C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {C \left (2 a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-2 a A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}-\frac {b \left (2 A +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {b \left (2 A +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(143\) |
risch | \(a A x -\frac {i C \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}-2 \,{\mathrm e}^{2 i \left (d x +c \right )} a -b \,{\mathrm e}^{i \left (d x +c \right )}-2 a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}\) | \(144\) |
Input:
int((a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(a*A*(d*x+c)+C*a*tan(d*x+c)+A*b*ln(sec(d*x+c)+tan(d*x+c))+C*b*(1/2*sec (d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.08 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.74 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, A a d x \cos \left (d x + c\right )^{2} + {\left (2 \, A + C\right )} b \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, A + C\right )} b \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a \cos \left (d x + c\right ) + C b\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate((a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="fricas")
Output:
1/4*(4*A*a*d*x*cos(d*x + c)^2 + (2*A + C)*b*cos(d*x + c)^2*log(sin(d*x + c ) + 1) - (2*A + C)*b*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*(2*C*a*cos( d*x + c) + C*b)*sin(d*x + c))/(d*cos(d*x + c)^2)
\[ \int (a+b \sec (c+d x)) \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 )\, dx \] Input:
integrate((a+b*sec(d*x+c))*(A+C*sec(d*x+c)**2),x)
Output:
Integral((A + C*sec(c + d*x)**2)*(a + b*sec(c + d*x)), x)
Time = 0.03 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.52 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, {\left (d x + c\right )} A a - C 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 )} + 4 \, A b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 4 \, C a \tan \left (d x + c\right )}{4 \, d} \] Input:
integrate((a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="maxima")
Output:
1/4*(4*(d*x + c)*A*a - C*b*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin( d*x + c) + 1) + log(sin(d*x + c) - 1)) + 4*A*b*log(sec(d*x + c) + tan(d*x + c)) + 4*C*a*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (54) = 108\).
Time = 0.25 (sec) , antiderivative size = 134, normalized size of antiderivative = 2.31 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} A a + {\left (2 \, A b + C b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (2 \, A b + C b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b \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((a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
1/2*(2*(d*x + c)*A*a + (2*A*b + C*b)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (2*A*b + C*b)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(2*C*a*tan(1/2*d*x + 1/2*c)^3 - C*b*tan(1/2*d*x + 1/2*c)^3 - 2*C*a*tan(1/2*d*x + 1/2*c) - C*b*t an(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^2)/d
Time = 12.01 (sec) , antiderivative size = 135, normalized size of antiderivative = 2.33 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=\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 {C\,a\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {C\,b\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2}-\frac {A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,2{}\mathrm {i}}{d}-\frac {C\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,1{}\mathrm {i}}{d} \] Input:
int((A + C/cos(c + d*x)^2)*(a + b/cos(c + d*x)),x)
Output:
(2*A*a*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d - (A*b*atan((sin(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*2i)/d - (C*b*atan((sin(c/2 + (d*x)/2)* 1i)/cos(c/2 + (d*x)/2))*1i)/d + (C*a*sin(c + d*x))/(d*cos(c + d*x)) + (C*b *sin(c + d*x))/(2*d*cos(c + d*x)^2)
Time = 0.17 (sec) , antiderivative size = 224, normalized size of antiderivative = 3.86 \[ \int (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {-2 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a 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 b -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b c +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b 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 b +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b c -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b c +2 \sin \left (d x +c \right )^{2} a^{2} d x -\sin \left (d x +c \right ) b c -2 a^{2} d x}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int((a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x)
Output:
( - 2*cos(c + d*x)*sin(c + d*x)*a*c - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a*b - log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b*c + 2*log(tan((c + d*x)/2) - 1)*a*b + log(tan((c + d*x)/2) - 1)*b*c + 2*log(tan((c + d*x)/ 2) + 1)*sin(c + d*x)**2*a*b + log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b* c - 2*log(tan((c + d*x)/2) + 1)*a*b - log(tan((c + d*x)/2) + 1)*b*c + 2*si n(c + d*x)**2*a**2*d*x - sin(c + d*x)*b*c - 2*a**2*d*x)/(2*d*(sin(c + d*x) **2 - 1))