Integrand size = 20, antiderivative size = 108 \[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\frac {(c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}-\frac {i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}+\frac {i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2} \] Output:
(d*x+c)*arctanh(exp(I*(b*x+a)))/b-1/2*d*csc(b*x+a)/b^2-1/2*(d*x+c)*cot(b*x +a)*csc(b*x+a)/b-1/2*I*d*polylog(2,-exp(I*(b*x+a)))/b^2+1/2*I*d*polylog(2, exp(I*(b*x+a)))/b^2
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(260\) vs. \(2(108)=216\).
Time = 1.18 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.41 \[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=-\frac {d \cot \left (\frac {1}{2} (a+b x)\right )}{4 b^2}-\frac {c \csc ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}-\frac {d x \csc ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}+\frac {c \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}-\frac {c \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}+\frac {a d \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )}{2 b^2}-\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 )+i \left (\operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-\operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )\right )\right )}{2 b^2}+\frac {c \sec ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}+\frac {d x \sec ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}-\frac {d \tan \left (\frac {1}{2} (a+b x)\right )}{4 b^2} \] Input:
Integrate[(c + d*x)*Cot[a + b*x]^2*Csc[a + b*x],x]
Output:
-1/4*(d*Cot[(a + b*x)/2])/b^2 - (c*Csc[(a + b*x)/2]^2)/(8*b) - (d*x*Csc[(a + b*x)/2]^2)/(8*b) + (c*Log[Cos[(a + b*x)/2]])/(2*b) - (c*Log[Sin[(a + b* x)/2]])/(2*b) + (a*d*Log[Tan[(a + b*x)/2]])/(2*b^2) - (d*((a + b*x)*(Log[1 - E^(I*(a + b*x))] - Log[1 + E^(I*(a + b*x))]) + I*(PolyLog[2, -E^(I*(a + b*x))] - PolyLog[2, E^(I*(a + b*x))])))/(2*b^2) + (c*Sec[(a + b*x)/2]^2)/ (8*b) + (d*x*Sec[(a + b*x)/2]^2)/(8*b) - (d*Tan[(a + b*x)/2])/(4*b^2)
Time = 0.70 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.63, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4915, 3042, 4671, 2715, 2838, 4673, 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) \cot ^2(a+b x) \csc (a+b x) \, dx\) |
\(\Big \downarrow \) 4915 |
\(\displaystyle \int (c+d x) \csc ^3(a+b x)dx-\int (c+d x) \csc (a+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) \csc (a+b x)^3dx-\int (c+d x) \csc (a+b x)dx\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle \int (c+d x) \csc (a+b x)^3dx+\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}+\int (c+d x) \csc (a+b x)^3dx+\frac {2 (c+d x) \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \int (c+d x) \csc (a+b x)^3dx+\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}\) |
\(\Big \downarrow \) 4673 |
\(\displaystyle \frac {1}{2} \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}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \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}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle \frac {1}{2} \left (-\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}\right )+\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}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {1}{2} \left (\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}\right )+\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}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {1}{2} \left (-\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}\right )+\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}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}\) |
Input:
Int[(c + d*x)*Cot[a + b*x]^2*Csc[a + b*x],x]
Output:
(2*(c + d*x)*ArcTanh[E^(I*(a + b*x))])/b - (d*Csc[a + b*x])/(2*b^2) - ((c + d*x)*Cot[a + b*x]*Csc[a + b*x])/(2*b) - (I*d*PolyLog[2, -E^(I*(a + b*x)) ])/b^2 + (I*d*PolyLog[2, E^(I*(a + b*x))])/b^2 + ((-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)/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]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(-b^2)*(c + d*x)*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (-Simp[b^2*d*((b*Csc[e + f*x])^(n - 2)/(f^2*(n - 1)*(n - 2))), x] + S imp[b^2*((n - 2)/(n - 1)) Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2]
Int[Cot[(a_.) + (b_.)*(x_)]^(p_)*Csc[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_ ))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Csc[a + b*x]*Cot[a + b*x]^(p - 2), x] + Int[(c + d*x)^m*Csc[a + b*x]^3*Cot[a + b*x]^(p - 2), x] /; FreeQ[{a, b , c, d, m}, x] && IGtQ[p/2, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (92 ) = 184\).
Time = 0.27 (sec) , antiderivative size = 246, normalized size of antiderivative = 2.28
method | result | size |
risch | \(\frac {b d x \,{\mathrm e}^{3 i \left (b x +a \right )}+c b \,{\mathrm e}^{3 i \left (b x +a \right )}+b d x \,{\mathrm e}^{i \left (b x +a \right )}+b c \,{\mathrm e}^{i \left (b x +a \right )}-i d \,{\mathrm e}^{3 i \left (b x +a \right )}+i d \,{\mathrm e}^{i \left (b x +a \right )}}{b^{2} \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{2}}+\frac {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}{2 b}+\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{2 b^{2}}-\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{2 b}-\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{2 b^{2}}+\frac {i d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(246\) |
Input:
int((d*x+c)*cot(b*x+a)^2*csc(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/b^2/(exp(2*I*(b*x+a))-1)^2*(b*d*x*exp(3*I*(b*x+a))+c*b*exp(3*I*(b*x+a))+ b*d*x*exp(I*(b*x+a))+b*c*exp(I*(b*x+a))-I*d*exp(3*I*(b*x+a))+I*d*exp(I*(b* x+a)))+1/b*c*arctanh(exp(I*(b*x+a)))+1/2/b*d*ln(exp(I*(b*x+a))+1)*x+1/2/b^ 2*d*ln(exp(I*(b*x+a))+1)*a-1/2*I*d*polylog(2,-exp(I*(b*x+a)))/b^2-1/2/b*d* ln(1-exp(I*(b*x+a)))*x-1/2/b^2*d*ln(1-exp(I*(b*x+a)))*a+1/2*I*d*polylog(2, exp(I*(b*x+a)))/b^2-1/b^2*d*a*arctanh(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. 454 vs. \(2 (88) = 176\).
Time = 0.10 (sec) , antiderivative size = 454, normalized size of antiderivative = 4.20 \[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\frac {2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right ) + {\left (i \, d \cos \left (b x + a\right )^{2} - i \, d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (-i \, d \cos \left (b x + a\right )^{2} + i \, d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (i \, d \cos \left (b x + a\right )^{2} - i \, d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (-i \, d \cos \left (b x + a\right )^{2} + i \, d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - {\left (b d x - {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b d x - {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - {\left ({\left (b c - a d\right )} \cos \left (b x + a\right )^{2} - 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 ({\left (b c - a d\right )} \cos \left (b x + a\right )^{2} - 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 - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + 2 \, d \sin \left (b x + a\right )}{4 \, {\left (b^{2} \cos \left (b x + a\right )^{2} - b^{2}\right )}} \] Input:
integrate((d*x+c)*cot(b*x+a)^2*csc(b*x+a),x, algorithm="fricas")
Output:
1/4*(2*(b*d*x + b*c)*cos(b*x + a) + (I*d*cos(b*x + a)^2 - I*d)*dilog(cos(b *x + a) + I*sin(b*x + a)) + (-I*d*cos(b*x + a)^2 + I*d)*dilog(cos(b*x + a) - I*sin(b*x + a)) + (I*d*cos(b*x + a)^2 - I*d)*dilog(-cos(b*x + a) + I*si n(b*x + a)) + (-I*d*cos(b*x + a)^2 + I*d)*dilog(-cos(b*x + a) - I*sin(b*x + a)) - (b*d*x - (b*d*x + b*c)*cos(b*x + a)^2 + b*c)*log(cos(b*x + a) + I* sin(b*x + a) + 1) - (b*d*x - (b*d*x + b*c)*cos(b*x + a)^2 + b*c)*log(cos(b *x + a) - I*sin(b*x + a) + 1) - ((b*c - a*d)*cos(b*x + a)^2 - b*c + a*d)*l og(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) - ((b*c - a*d)*cos(b*x + a)^2 - b*c + a*d)*log(-1/2*cos(b*x + a) - 1/2*I*sin(b*x + a) + 1/2) + (b*d *x - (b*d*x + a*d)*cos(b*x + a)^2 + a*d)*log(-cos(b*x + a) + I*sin(b*x + a ) + 1) + (b*d*x - (b*d*x + a*d)*cos(b*x + a)^2 + a*d)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) + 2*d*sin(b*x + a))/(b^2*cos(b*x + a)^2 - b^2)
\[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\int \left (c + d x\right ) \cot ^{2}{\left (a + b x \right )} \csc {\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)*cot(b*x+a)**2*csc(b*x+a),x)
Output:
Integral((c + d*x)*cot(a + b*x)**2*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. 762 vs. \(2 (88) = 176\).
Time = 0.17 (sec) , antiderivative size = 762, normalized size of antiderivative = 7.06 \[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)*cot(b*x+a)^2*csc(b*x+a),x, algorithm="maxima")
Output:
(2*(b*d*x + b*c + (b*d*x + b*c)*cos(4*b*x + 4*a) - 2*(b*d*x + b*c)*cos(2*b *x + 2*a) - (-I*b*d*x - I*b*c)*sin(4*b*x + 4*a) - 2*(I*b*d*x + I*b*c)*sin( 2*b*x + 2*a))*arctan2(sin(b*x + a), cos(b*x + a) + 1) - 2*(b*c*cos(4*b*x + 4*a) - 2*b*c*cos(2*b*x + 2*a) + I*b*c*sin(4*b*x + 4*a) - 2*I*b*c*sin(2*b* x + 2*a) + b*c)*arctan2(sin(b*x + a), cos(b*x + a) - 1) + 2*(b*d*x*cos(4*b *x + 4*a) - 2*b*d*x*cos(2*b*x + 2*a) + I*b*d*x*sin(4*b*x + 4*a) - 2*I*b*d* x*sin(2*b*x + 2*a) + b*d*x)*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 4*( I*b*d*x + I*b*c + d)*cos(3*b*x + 3*a) - 4*(I*b*d*x + I*b*c - d)*cos(b*x + a) - 2*(d*cos(4*b*x + 4*a) - 2*d*cos(2*b*x + 2*a) + I*d*sin(4*b*x + 4*a) - 2*I*d*sin(2*b*x + 2*a) + d)*dilog(-e^(I*b*x + I*a)) + 2*(d*cos(4*b*x + 4* a) - 2*d*cos(2*b*x + 2*a) + I*d*sin(4*b*x + 4*a) - 2*I*d*sin(2*b*x + 2*a) + d)*dilog(e^(I*b*x + I*a)) + (-I*b*d*x - I*b*c + (-I*b*d*x - I*b*c)*cos(4 *b*x + 4*a) - 2*(-I*b*d*x - I*b*c)*cos(2*b*x + 2*a) + (b*d*x + b*c)*sin(4* b*x + 4*a) - 2*(b*d*x + b*c)*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b* x + a)^2 + 2*cos(b*x + a) + 1) + (I*b*d*x + I*b*c + (I*b*d*x + I*b*c)*cos( 4*b*x + 4*a) - 2*(I*b*d*x + I*b*c)*cos(2*b*x + 2*a) - (b*d*x + b*c)*sin(4* b*x + 4*a) + 2*(b*d*x + b*c)*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b* x + a)^2 - 2*cos(b*x + a) + 1) + 4*(b*d*x + b*c - I*d)*sin(3*b*x + 3*a) + 4*(b*d*x + b*c + I*d)*sin(b*x + a))/(-4*I*b^2*cos(4*b*x + 4*a) + 8*I*b^2*c os(2*b*x + 2*a) + 4*b^2*sin(4*b*x + 4*a) - 8*b^2*sin(2*b*x + 2*a) - 4*I...
\[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\int { {\left (d x + c\right )} \cot \left (b x + a\right )^{2} \csc \left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)*cot(b*x+a)^2*csc(b*x+a),x, algorithm="giac")
Output:
integrate((d*x + c)*cot(b*x + a)^2*csc(b*x + a), x)
Timed out. \[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\text {Hanged} \] Input:
int((cot(a + b*x)^2*(c + d*x))/sin(a + b*x),x)
Output:
\text{Hanged}
\[ \int (c+d x) \cot ^2(a+b x) \csc (a+b x) \, dx=\frac {-\cos \left (b x +a \right ) c +2 \left (\int \cot \left (b x +a \right )^{2} \csc \left (b x +a \right ) x d x \right ) \sin \left (b x +a \right )^{2} b d -\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \sin \left (b x +a \right )^{2} c}{2 \sin \left (b x +a \right )^{2} b} \] Input:
int((d*x+c)*cot(b*x+a)^2*csc(b*x+a),x)
Output:
( - cos(a + b*x)*c + 2*int(cot(a + b*x)**2*csc(a + b*x)*x,x)*sin(a + b*x)* *2*b*d - log(tan((a + b*x)/2))*sin(a + b*x)**2*c)/(2*sin(a + b*x)**2*b)