Integrand size = 25, antiderivative size = 172 \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=-\frac {6 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}+\frac {6 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {8 d (c+d x) \sin (a+b x)}{b^2} \] Output:
-6*(d*x+c)^2*arctanh(exp(I*(b*x+a)))/b-8*d^2*cos(b*x+a)/b^3+4*(d*x+c)^2*co s(b*x+a)/b+6*I*d*(d*x+c)*polylog(2,-exp(I*(b*x+a)))/b^2-6*I*d*(d*x+c)*poly log(2,exp(I*(b*x+a)))/b^2-6*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+6*d^2*polyl og(3,exp(I*(b*x+a)))/b^3-8*d*(d*x+c)*sin(b*x+a)/b^2
Time = 0.59 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.30 \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {3 b^2 (c+d x)^2 \log \left (1-e^{i (a+b x)}\right )-3 b^2 (c+d x)^2 \log \left (1+e^{i (a+b x)}\right )+6 i b d (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-6 i b d (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )-6 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )+6 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+4 \cos (b x) \left (\left (-2 d^2+b^2 (c+d x)^2\right ) \cos (a)-2 b d (c+d x) \sin (a)\right )-4 \left (2 b d (c+d x) \cos (a)+\left (-2 d^2+b^2 (c+d x)^2\right ) \sin (a)\right ) \sin (b x)}{b^3} \] Input:
Integrate[(c + d*x)^2*Csc[a + b*x]^2*Sin[3*a + 3*b*x],x]
Output:
(3*b^2*(c + d*x)^2*Log[1 - E^(I*(a + b*x))] - 3*b^2*(c + d*x)^2*Log[1 + E^ (I*(a + b*x))] + (6*I)*b*d*(c + d*x)*PolyLog[2, -E^(I*(a + b*x))] - (6*I)* b*d*(c + d*x)*PolyLog[2, E^(I*(a + b*x))] - 6*d^2*PolyLog[3, -E^(I*(a + b* x))] + 6*d^2*PolyLog[3, E^(I*(a + b*x))] + 4*Cos[b*x]*((-2*d^2 + b^2*(c + d*x)^2)*Cos[a] - 2*b*d*(c + d*x)*Sin[a]) - 4*(2*b*d*(c + d*x)*Cos[a] + (-2 *d^2 + b^2*(c + d*x)^2)*Sin[a])*Sin[b*x])/b^3
Time = 0.43 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {4931, 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 (c+d x)^2 \sin (3 a+3 b x) \csc ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 4931 |
\(\displaystyle \int \left (3 (c+d x)^2 \cos (a+b x) \cot (a+b x)-(c+d x)^2 \sin (a+b x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {6 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {6 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}\) |
Input:
Int[(c + d*x)^2*Csc[a + b*x]^2*Sin[3*a + 3*b*x],x]
Output:
(-6*(c + d*x)^2*ArcTanh[E^(I*(a + b*x))])/b - (8*d^2*Cos[a + b*x])/b^3 + ( 4*(c + d*x)^2*Cos[a + b*x])/b + ((6*I)*d*(c + d*x)*PolyLog[2, -E^(I*(a + b *x))])/b^2 - ((6*I)*d*(c + d*x)*PolyLog[2, E^(I*(a + b*x))])/b^2 - (6*d^2* PolyLog[3, -E^(I*(a + b*x))])/b^3 + (6*d^2*PolyLog[3, E^(I*(a + b*x))])/b^ 3 - (8*d*(c + d*x)*Sin[a + b*x])/b^2
Int[((e_.) + (f_.)*(x_))^(m_.)*(F_)[(a_.) + (b_.)*(x_)]^(p_.)*(G_)[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Int[ExpandTrigExpand[(e + f*x)^m*G[c + d*x] ^q, F, c + d*x, p, b/d, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Member Q[{Sin, Cos}, F] && MemberQ[{Sec, Csc}, G] && IGtQ[p, 0] && IGtQ[q, 0] && E qQ[b*c - a*d, 0] && IGtQ[b/d, 1]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 480 vs. \(2 (160 ) = 320\).
Time = 1.98 (sec) , antiderivative size = 481, normalized size of antiderivative = 2.80
method | result | size |
risch | \(\frac {2 \left (x^{2} d^{2} b^{2}+2 b^{2} c d x +2 i b \,d^{2} x +b^{2} c^{2}+2 i b c d -2 d^{2}\right ) {\mathrm e}^{i \left (b x +a \right )}}{b^{3}}+\frac {2 \left (x^{2} d^{2} b^{2}+2 b^{2} c d x -2 i b \,d^{2} x +b^{2} c^{2}-2 i b c d -2 d^{2}\right ) {\mathrm e}^{-i \left (b x +a \right )}}{b^{3}}-\frac {6 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}+\frac {6 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {6 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {6 i c d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}+\frac {6 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {6 i c d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 i d^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{2}}{b^{3}}-\frac {3 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{3}}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b}-\frac {6 d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {3 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}+\frac {6 d^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {6 d^{2} a^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {12 c d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 c^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}\) | \(481\) |
Input:
int((d*x+c)^2*csc(b*x+a)^2*sin(3*b*x+3*a),x,method=_RETURNVERBOSE)
Output:
2*(x^2*d^2*b^2+2*b^2*c*d*x+b^2*c^2+2*I*b*d^2*x-2*d^2+2*I*b*c*d)/b^3*exp(I* (b*x+a))+2*(x^2*d^2*b^2+2*b^2*c*d*x+b^2*c^2-2*I*b*d^2*x-2*d^2-2*I*b*c*d)/b ^3*exp(-I*(b*x+a))-6/b^2*c*d*ln(exp(I*(b*x+a))+1)*a+6*I/b^2*d^2*polylog(2, -exp(I*(b*x+a)))*x+6/b^2*c*d*ln(1-exp(I*(b*x+a)))*a+6*I/b^2*c*d*polylog(2, -exp(I*(b*x+a)))-6/b*c*d*ln(exp(I*(b*x+a))+1)*x+6/b*c*d*ln(1-exp(I*(b*x+a) ))*x-6*I/b^2*c*d*polylog(2,exp(I*(b*x+a)))-6*I/b^2*d^2*polylog(2,exp(I*(b* x+a)))*x+3/b^3*d^2*ln(exp(I*(b*x+a))+1)*a^2-3/b^3*d^2*ln(1-exp(I*(b*x+a))) *a^2-3/b*d^2*ln(exp(I*(b*x+a))+1)*x^2-6*d^2*polylog(3,-exp(I*(b*x+a)))/b^3 +3/b*d^2*ln(1-exp(I*(b*x+a)))*x^2+6*d^2*polylog(3,exp(I*(b*x+a)))/b^3-6/b^ 3*d^2*a^2*arctanh(exp(I*(b*x+a)))+12/b^2*c*d*a*arctanh(exp(I*(b*x+a)))-6/b *c^2*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. 566 vs. \(2 (156) = 312\).
Time = 0.12 (sec) , antiderivative size = 566, normalized size of antiderivative = 3.29 \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)^2*csc(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="fricas")
Output:
1/2*(6*d^2*polylog(3, cos(b*x + a) + I*sin(b*x + a)) + 6*d^2*polylog(3, co s(b*x + a) - I*sin(b*x + a)) - 6*d^2*polylog(3, -cos(b*x + a) + I*sin(b*x + a)) - 6*d^2*polylog(3, -cos(b*x + a) - I*sin(b*x + a)) + 8*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - 2*d^2)*cos(b*x + a) - 6*(I*b*d^2*x + I*b*c*d)*di log(cos(b*x + a) + I*sin(b*x + a)) - 6*(-I*b*d^2*x - I*b*c*d)*dilog(cos(b* x + a) - I*sin(b*x + a)) - 6*(I*b*d^2*x + I*b*c*d)*dilog(-cos(b*x + a) + I *sin(b*x + a)) - 6*(-I*b*d^2*x - I*b*c*d)*dilog(-cos(b*x + a) - I*sin(b*x + a)) - 3*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*log(cos(b*x + a) + I*sin(b *x + a) + 1) - 3*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*log(cos(b*x + a) - I*sin(b*x + a) + 1) + 3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) + 3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(-1 /2*cos(b*x + a) - 1/2*I*sin(b*x + a) + 1/2) + 3*(b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*log(-cos(b*x + a) + I*sin(b*x + a) + 1) + 3*(b^2*d ^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) - 16*(b*d^2*x + b*c*d)*sin(b*x + a))/b^3
Timed out. \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Timed out} \] Input:
integrate((d*x+c)**2*csc(b*x+a)**2*sin(3*b*x+3*a),x)
Output:
Timed out
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 413 vs. \(2 (156) = 312\).
Time = 0.21 (sec) , antiderivative size = 413, normalized size of antiderivative = 2.40 \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {c^{2} {\left (8 \, \cos \left (b x + a\right ) - 3 \, \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + 3 \, \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right )\right )}}{2 \, b} - \frac {12 \, d^{2} {\rm Li}_{3}(-e^{\left (i \, b x + i \, a\right )}) - 12 \, d^{2} {\rm Li}_{3}(e^{\left (i \, b x + i \, a\right )}) - 6 \, {\left (-i \, b^{2} d^{2} x^{2} - 2 i \, b^{2} c d x\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 6 \, {\left (-i \, b^{2} d^{2} x^{2} - 2 i \, b^{2} c d x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 8 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x - 2 \, d^{2}\right )} \cos \left (b x + a\right ) - 12 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) - 12 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\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 ) - 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\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 ) + 16 \, {\left (b d^{2} x + b c d\right )} \sin \left (b x + a\right )}{2 \, b^{3}} \] Input:
integrate((d*x+c)^2*csc(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="maxima")
Output:
1/2*c^2*(8*cos(b*x + a) - 3*log(cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) + 3*log(cos(b*x)^2 - 2*cos(b* x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2))/b - 1/2 *(12*d^2*polylog(3, -e^(I*b*x + I*a)) - 12*d^2*polylog(3, e^(I*b*x + I*a)) - 6*(-I*b^2*d^2*x^2 - 2*I*b^2*c*d*x)*arctan2(sin(b*x + a), cos(b*x + a) + 1) - 6*(-I*b^2*d^2*x^2 - 2*I*b^2*c*d*x)*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 8*(b^2*d^2*x^2 + 2*b^2*c*d*x - 2*d^2)*cos(b*x + a) - 12*(I*b*d^2 *x + I*b*c*d)*dilog(-e^(I*b*x + I*a)) - 12*(-I*b*d^2*x - I*b*c*d)*dilog(e^ (I*b*x + I*a)) + 3*(b^2*d^2*x^2 + 2*b^2*c*d*x)*log(cos(b*x + a)^2 + sin(b* x + a)^2 + 2*cos(b*x + a) + 1) - 3*(b^2*d^2*x^2 + 2*b^2*c*d*x)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) + 16*(b*d^2*x + b*c*d)*sin( b*x + a))/b^3
\[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\int { {\left (d x + c\right )}^{2} \csc \left (b x + a\right )^{2} \sin \left (3 \, b x + 3 \, a\right ) \,d x } \] Input:
integrate((d*x+c)^2*csc(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="giac")
Output:
integrate((d*x + c)^2*csc(b*x + a)^2*sin(3*b*x + 3*a), x)
Timed out. \[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Hanged} \] Input:
int((sin(3*a + 3*b*x)*(c + d*x)^2)/sin(a + b*x)^2,x)
Output:
\text{Hanged}
\[ \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\left (\int \csc \left (b x +a \right )^{2} \sin \left (3 b x +3 a \right ) x^{2}d x \right ) d^{2}+2 \left (\int \csc \left (b x +a \right )^{2} \sin \left (3 b x +3 a \right ) x d x \right ) c d +\left (\int \csc \left (b x +a \right )^{2} \sin \left (3 b x +3 a \right )d x \right ) c^{2} \] Input:
int((d*x+c)^2*csc(b*x+a)^2*sin(3*b*x+3*a),x)
Output:
int(csc(a + b*x)**2*sin(3*a + 3*b*x)*x**2,x)*d**2 + 2*int(csc(a + b*x)**2* sin(3*a + 3*b*x)*x,x)*c*d + int(csc(a + b*x)**2*sin(3*a + 3*b*x),x)*c**2