Integrand size = 17, antiderivative size = 26 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{d}+\frac {b \log (\tan (c+d x))}{d} \] Output:
-a*arctanh(cos(d*x+c))/d+b*ln(tan(d*x+c))/d
Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.50 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{d}-\frac {b \log (\cos (c+d x))}{d}+\frac {b \log (\sin (c+d x))}{d} \] Input:
Integrate[Csc[c + d*x]*(a + b*Sec[c + d*x]),x]
Output:
-((a*ArcTanh[Cos[c + d*x]])/d) - (b*Log[Cos[c + d*x]])/d + (b*Log[Sin[c + d*x]])/d
Time = 0.37 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.706, Rules used = {3042, 4360, 25, 25, 3042, 25, 3313, 25, 3042, 3100, 14, 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 \csc (c+d x) (a+b \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a-b \csc \left (c+d x-\frac {\pi }{2}\right )}{\cos \left (c+d x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int -(\csc (c+d x) \sec (c+d x) (-a \cos (c+d x)-b))dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int -((b+a \cos (c+d x)) \csc (c+d x) \sec (c+d x))dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \csc (c+d x) \sec (c+d x) (a \cos (c+d x)+b)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {b-a \sin \left (c+d x-\frac {\pi }{2}\right )}{\sin \left (c+d x-\frac {\pi }{2}\right ) \cos \left (c+d x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right ) \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )}dx\) |
\(\Big \downarrow \) 3313 |
\(\displaystyle a \int \csc (c+d x)dx-b \int -\csc (c+d x) \sec (c+d x)dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle a \int \csc (c+d x)dx+b \int \csc (c+d x) \sec (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (c+d x)dx+b \int \csc (c+d x) \sec (c+d x)dx\) |
\(\Big \downarrow \) 3100 |
\(\displaystyle a \int \csc (c+d x)dx+\frac {b \int \cot (c+d x)d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 14 |
\(\displaystyle a \int \csc (c+d x)dx+\frac {b \log (\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {b \log (\tan (c+d x))}{d}-\frac {a \text {arctanh}(\cos (c+d x))}{d}\) |
Input:
Int[Csc[c + d*x]*(a + b*Sec[c + d*x]),x]
Output:
-((a*ArcTanh[Cos[c + d*x]])/d) + (b*Log[Tan[c + d*x]])/d
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[1/f Subst[Int[(1 + x^2)^((m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]] , x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_ ) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[Cos[e + f*x]^ p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[Cos[e + f*x]^p*(d*Sin[e + f*x ])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2 ] && IntegerQ[n] && ((LtQ[p, 0] && NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] | | LtQ[p + 1, -n, 2*p + 1])
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 0.15 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.27
method | result | size |
derivativedivides | \(\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )+b \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(33\) |
default | \(\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )+b \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(33\) |
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 )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (a +b \right )}{d}\) | \(50\) |
norman | \(\frac {\left (a +b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(55\) |
risch | \(\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(89\) |
Input:
int(csc(d*x+c)*(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*ln(csc(d*x+c)-cot(d*x+c))+b*ln(tan(d*x+c)))
Time = 0.09 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.96 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=-\frac {2 \, b \log \left (-\cos \left (d x + c\right )\right ) + {\left (a - b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (a + b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \] Input:
integrate(csc(d*x+c)*(a+b*sec(d*x+c)),x, algorithm="fricas")
Output:
-1/2*(2*b*log(-cos(d*x + c)) + (a - b)*log(1/2*cos(d*x + c) + 1/2) - (a + b)*log(-1/2*cos(d*x + c) + 1/2))/d
\[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \csc {\left (c + d x \right )}\, dx \] Input:
integrate(csc(d*x+c)*(a+b*sec(d*x+c)),x)
Output:
Integral((a + b*sec(c + d*x))*csc(c + d*x), x)
Time = 0.03 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.73 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=-\frac {{\left (a - b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) + 2 \, b \log \left (\cos \left (d x + c\right )\right )}{2 \, d} \] Input:
integrate(csc(d*x+c)*(a+b*sec(d*x+c)),x, algorithm="maxima")
Output:
-1/2*((a - b)*log(cos(d*x + c) + 1) - (a + b)*log(cos(d*x + c) - 1) + 2*b* log(cos(d*x + c)))/d
Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (26) = 52\).
Time = 0.13 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.04 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=-\frac {{\left (a - b\right )} \log \left ({\left | \cos \left (d x + c\right ) + 1 \right |}\right )}{2 \, d} + \frac {{\left (a + b\right )} \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} - \frac {b \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} \] Input:
integrate(csc(d*x+c)*(a+b*sec(d*x+c)),x, algorithm="giac")
Output:
-1/2*(a - b)*log(abs(cos(d*x + c) + 1))/d + 1/2*(a + b)*log(abs(cos(d*x + c) - 1))/d - b*log(abs(cos(d*x + c)))/d
Time = 0.11 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.42 \[ \int \csc (c+d x) (a+b \sec (c+d x)) \, dx=\frac {\frac {a\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{2}-b\,\ln \left (\cos \left (c+d\,x\right )\right )-\frac {a\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{2}+\frac {b\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{2}+\frac {b\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{2}}{d} \] Input:
int((a + b/cos(c + d*x))/sin(c + d*x),x)
Output:
((a*log(cos(c + d*x) - 1))/2 - b*log(cos(c + d*x)) - (a*log(cos(c + d*x) + 1))/2 + (b*log(cos(c + d*x) - 1))/2 + (b*log(cos(c + d*x) + 1))/2)/d
Time = 0.18 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.27 \[ \int \csc (c+d x) (a+b \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 +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b}{d} \] Input:
int(csc(d*x+c)*(a+b*sec(d*x+c)),x)
Output:
( - log(tan((c + d*x)/2) - 1)*b - log(tan((c + d*x)/2) + 1)*b + log(tan((c + d*x)/2))*a + log(tan((c + d*x)/2))*b)/d