Integrand size = 12, antiderivative size = 67 \[ \int (c+d x) \csc (a+b x) \, dx=-\frac {2 (c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2} \] Output:
-2*(d*x+c)*arctanh(exp(I*(b*x+a)))/b+I*d*polylog(2,-exp(I*(b*x+a)))/b^2-I* d*polylog(2,exp(I*(b*x+a)))/b^2
Time = 0.08 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.61 \[ \int (c+d x) \csc (a+b x) \, dx=-\frac {c \text {arctanh}(\cos (a+b x))}{b}+\frac {d \left ((a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )-a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )+i \left (\operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-\operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )\right )\right )}{b^2} \] Input:
Integrate[(c + d*x)*Csc[a + b*x],x]
Output:
-((c*ArcTanh[Cos[a + b*x]])/b) + (d*((a + b*x)*(Log[1 - E^(I*(a + b*x))] - Log[1 + E^(I*(a + b*x))]) - a*Log[Tan[(a + b*x)/2]] + I*(PolyLog[2, -E^(I *(a + b*x))] - PolyLog[2, E^(I*(a + b*x))])))/b^2
Time = 0.29 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4671, 2715, 2838}
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 (c+d x) \csc (a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) \csc (a+b x)dx\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {d \int \log \left (1-e^{i (a+b x)}\right )dx}{b}+\frac {d \int \log \left (1+e^{i (a+b x)}\right )dx}{b}-\frac {2 (c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {i d \int e^{-i (a+b x)} \log \left (1-e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i d \int e^{-i (a+b x)} \log \left (1+e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {2 (c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle -\frac {2 (c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}\) |
Input:
Int[(c + d*x)*Csc[a + b*x],x]
Output:
(-2*(c + d*x)*ArcTanh[E^(I*(a + b*x))])/b + (I*d*PolyLog[2, -E^(I*(a + b*x ))])/b^2 - (I*d*PolyLog[2, E^(I*(a + b*x))])/b^2
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[- 2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*x))]/f), x] + (-Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x )^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IG tQ[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (59 ) = 118\).
Time = 0.61 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.85
method | result | size |
derivativedivides | \(\frac {-\frac {d a \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b}+c \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )+\frac {d \left (\left (b x +a \right ) \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )-\left (b x +a \right ) \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )+i \operatorname {dilog}\left ({\mathrm e}^{i \left (b x +a \right )}+1\right )-i \operatorname {dilog}\left (1-{\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(124\) |
default | \(\frac {-\frac {d a \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b}+c \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )+\frac {d \left (\left (b x +a \right ) \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )-\left (b x +a \right ) \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )+i \operatorname {dilog}\left ({\mathrm e}^{i \left (b x +a \right )}+1\right )-i \operatorname {dilog}\left (1-{\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(124\) |
risch | \(-\frac {2 c \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}+\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {i d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(151\) |
Input:
int((d*x+c)*csc(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/b*(-1/b*d*a*ln(csc(b*x+a)-cot(b*x+a))+c*ln(csc(b*x+a)-cot(b*x+a))+1/b*d* ((b*x+a)*ln(1-exp(I*(b*x+a)))-(b*x+a)*ln(exp(I*(b*x+a))+1)+I*dilog(exp(I*( b*x+a))+1)-I*dilog(1-exp(I*(b*x+a)))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 252 vs. \(2 (55) = 110\).
Time = 0.09 (sec) , antiderivative size = 252, normalized size of antiderivative = 3.76 \[ \int (c+d x) \csc (a+b x) \, dx=\frac {-i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \] Input:
integrate((d*x+c)*csc(b*x+a),x, algorithm="fricas")
Output:
1/2*(-I*d*dilog(cos(b*x + a) + I*sin(b*x + a)) + I*d*dilog(cos(b*x + a) - I*sin(b*x + a)) - I*d*dilog(-cos(b*x + a) + I*sin(b*x + a)) + I*d*dilog(-c os(b*x + a) - I*sin(b*x + a)) - (b*d*x + b*c)*log(cos(b*x + a) + I*sin(b*x + a) + 1) - (b*d*x + b*c)*log(cos(b*x + a) - I*sin(b*x + a) + 1) + (b*c - a*d)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) + (b*c - a*d)*log( -1/2*cos(b*x + a) - 1/2*I*sin(b*x + a) + 1/2) + (b*d*x + a*d)*log(-cos(b*x + a) + I*sin(b*x + a) + 1) + (b*d*x + a*d)*log(-cos(b*x + a) - I*sin(b*x + a) + 1))/b^2
\[ \int (c+d x) \csc (a+b x) \, dx=\int \left (c + d x\right ) \csc {\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)*csc(b*x+a),x)
Output:
Integral((c + d*x)*csc(a + b*x), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (55) = 110\).
Time = 0.11 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.61 \[ \int (c+d x) \csc (a+b x) \, dx=-\frac {2 i \, b d x \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 2 i \, b c \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) - 2 \, {\left (-i \, b d x - i \, b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 i \, d {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 i \, d {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \] Input:
integrate((d*x+c)*csc(b*x+a),x, algorithm="maxima")
Output:
-1/2*(2*I*b*d*x*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 2*I*b*c*arctan2 (sin(b*x + a), cos(b*x + a) - 1) - 2*(-I*b*d*x - I*b*c)*arctan2(sin(b*x + a), cos(b*x + a) + 1) - 2*I*d*dilog(-e^(I*b*x + I*a)) + 2*I*d*dilog(e^(I*b *x + I*a)) + (b*d*x + b*c)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) - (b*d*x + b*c)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1))/b^2
\[ \int (c+d x) \csc (a+b x) \, dx=\int { {\left (d x + c\right )} \csc \left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)*csc(b*x+a),x, algorithm="giac")
Output:
integrate((d*x + c)*csc(b*x + a), x)
Timed out. \[ \int (c+d x) \csc (a+b x) \, dx=\int \frac {c+d\,x}{\sin \left (a+b\,x\right )} \,d x \] Input:
int((c + d*x)/sin(a + b*x),x)
Output:
int((c + d*x)/sin(a + b*x), x)
\[ \int (c+d x) \csc (a+b x) \, dx=\frac {\left (\int \csc \left (b x +a \right ) x d x \right ) b d +\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) c}{b} \] Input:
int((d*x+c)*csc(b*x+a),x)
Output:
(int(csc(a + b*x)*x,x)*b*d + log(tan((a + b*x)/2))*c)/b