Integrand size = 29, antiderivative size = 43 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {B \text {arctanh}(\sin (c+d x))}{a d}+\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))} \] Output:
B*arctanh(sin(d*x+c))/a/d+(A-B)*tan(d*x+c)/d/(a+a*sec(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(109\) vs. \(2(43)=86\).
Time = 0.76 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.53 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (B \cos \left (\frac {1}{2} (c+d x)\right ) \left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+(A-B) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )\right )}{a d (1+\cos (c+d x))} \] Input:
Integrate[(Sec[c + d*x]*(A + B*Sec[c + d*x]))/(a + a*Sec[c + d*x]),x]
Output:
(2*Cos[(c + d*x)/2]*(B*Cos[(c + d*x)/2]*(-Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + (A - B)*Sec[c/2]*Si n[(d*x)/2]))/(a*d*(1 + Cos[c + d*x]))
Time = 0.37 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 4486, 3042, 4257, 4281}
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 \frac {\sec (c+d x) (A+B \sec (c+d x))}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{a \csc \left (c+d x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4486 |
\(\displaystyle (A-B) \int \frac {\sec (c+d x)}{\sec (c+d x) a+a}dx+\frac {B \int \sec (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {B \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle (A-B) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {B \text {arctanh}(\sin (c+d x))}{a d}\) |
\(\Big \downarrow \) 4281 |
\(\displaystyle \frac {(A-B) \tan (c+d x)}{d (a \sec (c+d x)+a)}+\frac {B \text {arctanh}(\sin (c+d x))}{a d}\) |
Input:
Int[(Sec[c + d*x]*(A + B*Sec[c + d*x]))/(a + a*Sec[c + d*x]),x]
Output:
(B*ArcTanh[Sin[c + d*x]])/(a*d) + ((A - B)*Tan[c + d*x])/(d*(a + a*Sec[c + d*x]))
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[-Cot[e + f*x]/(f*(b + a*Csc[e + f*x])), x] /; FreeQ[{a, b, e, f} , x] && EqQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b Int[Csc[e + f*x], x], x] + Simp[(A*b - a*B)/b Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x ] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Time = 0.15 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.23
method | result | size |
parallelrisch | \(\frac {-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 )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (A -B \right )}{a d}\) | \(53\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -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 )}{d a}\) | \(61\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -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 )}{d a}\) | \(61\) |
risch | \(\frac {2 i A}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 i B}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a d}\) | \(91\) |
norman | \(\frac {\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}+\frac {B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}\) | \(105\) |
Input:
int(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)
Output:
(-B*ln(tan(1/2*d*x+1/2*c)-1)+B*ln(tan(1/2*d*x+1/2*c)+1)+tan(1/2*d*x+1/2*c) *(A-B))/a/d
Time = 0.08 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.72 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {{\left (B \cos \left (d x + c\right ) + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (B \cos \left (d x + c\right ) + B\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A - B\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \] Input:
integrate(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x, algorithm="frica s")
Output:
1/2*((B*cos(d*x + c) + B)*log(sin(d*x + c) + 1) - (B*cos(d*x + c) + B)*log (-sin(d*x + c) + 1) + 2*(A - B)*sin(d*x + c))/(a*d*cos(d*x + c) + a*d)
\[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x)
Output:
(Integral(A*sec(c + d*x)/(sec(c + d*x) + 1), x) + Integral(B*sec(c + d*x)* *2/(sec(c + d*x) + 1), x))/a
Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (43) = 86\).
Time = 0.04 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.30 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {B {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {A \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \] Input:
integrate(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x, algorithm="maxim a")
Output:
(B*(log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a - log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a - sin(d*x + c)/(a*(cos(d*x + c) + 1))) + A*sin(d*x + c)/ (a*(cos(d*x + c) + 1)))/d
Time = 0.15 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.63 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \] Input:
integrate(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x, algorithm="giac" )
Output:
(B*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a - B*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a + (A*tan(1/2*d*x + 1/2*c) - B*tan(1/2*d*x + 1/2*c))/a)/d
Time = 11.43 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {2\,B\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \] Input:
int((A + B/cos(c + d*x))/(cos(c + d*x)*(a + a/cos(c + d*x))),x)
Output:
(2*B*atanh(tan(c/2 + (d*x)/2)))/(a*d) + (tan(c/2 + (d*x)/2)*(A - B))/(a*d)
Time = 0.18 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.40 \[ \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {-\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 +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{a d} \] Input:
int(sec(d*x+c)*(A+B*sec(d*x+c))/(a+a*sec(d*x+c)),x)
Output:
( - log(tan((c + d*x)/2) - 1)*b + log(tan((c + d*x)/2) + 1)*b + tan((c + d *x)/2)*a - tan((c + d*x)/2)*b)/(a*d)