Integrand size = 20, antiderivative size = 141 \[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=-\frac {d x}{2 b}-\frac {2 d x \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d \cot (a+b x)}{2 b^2}-\frac {(c+d x) \cot ^2(a+b x)}{2 b}-\frac {d x \log (\tan (a+b x))}{b}+\frac {(c+d x) \log (\tan (a+b x))}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \] Output:
-1/2*d*x/b-2*d*x*arctanh(exp(2*I*(b*x+a)))/b-1/2*d*cot(b*x+a)/b^2-1/2*(d*x +c)*cot(b*x+a)^2/b-d*x*ln(tan(b*x+a))/b+(d*x+c)*ln(tan(b*x+a))/b+1/2*I*d*p olylog(2,-exp(2*I*(b*x+a)))/b^2-1/2*I*d*polylog(2,exp(2*I*(b*x+a)))/b^2
Time = 0.88 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.53 \[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=-\frac {d \cot (a+b x)}{2 b^2}-\frac {c \csc ^2(a+b x)}{2 b}-\frac {d x \csc ^2(a+b x)}{2 b}-\frac {c \log (\cos (a+b x))}{b}+\frac {a d \log (\cos (a+b x))}{b^2}+\frac {c \log (\sin (a+b x))}{b}-\frac {a d \log (\sin (a+b x))}{b^2}+\frac {d \left (\frac {1}{2} i (a+b x)^2-(a+b x) \log \left (1+e^{2 i (a+b x)}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )\right )}{b^2}+\frac {d \left ((a+b x) \log \left (1-e^{2 i (a+b x)}\right )-\frac {1}{2} i \left ((a+b x)^2+\operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )\right )\right )}{b^2} \] Input:
Integrate[(c + d*x)*Csc[a + b*x]^3*Sec[a + b*x],x]
Output:
-1/2*(d*Cot[a + b*x])/b^2 - (c*Csc[a + b*x]^2)/(2*b) - (d*x*Csc[a + b*x]^2 )/(2*b) - (c*Log[Cos[a + b*x]])/b + (a*d*Log[Cos[a + b*x]])/b^2 + (c*Log[S in[a + b*x]])/b - (a*d*Log[Sin[a + b*x]])/b^2 + (d*((I/2)*(a + b*x)^2 - (a + b*x)*Log[1 + E^((2*I)*(a + b*x))] + (I/2)*PolyLog[2, -E^((2*I)*(a + b*x ))]))/b^2 + (d*((a + b*x)*Log[1 - E^((2*I)*(a + b*x))] - (I/2)*((a + b*x)^ 2 + PolyLog[2, E^((2*I)*(a + b*x))])))/b^2
Time = 0.34 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {4920, 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) \csc ^3(a+b x) \sec (a+b x) \, dx\) |
\(\Big \downarrow \) 4920 |
\(\displaystyle -d \int \left (\frac {\log (\tan (a+b x))}{b}-\frac {\cot ^2(a+b x)}{2 b}\right )dx-\frac {(c+d x) \cot ^2(a+b x)}{2 b}+\frac {(c+d x) \log (\tan (a+b x))}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -d \left (\frac {2 x \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {i \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {i \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2}+\frac {\cot (a+b x)}{2 b^2}+\frac {x \log (\tan (a+b x))}{b}+\frac {x}{2 b}\right )-\frac {(c+d x) \cot ^2(a+b x)}{2 b}+\frac {(c+d x) \log (\tan (a+b x))}{b}\) |
Input:
Int[(c + d*x)*Csc[a + b*x]^3*Sec[a + b*x],x]
Output:
-1/2*((c + d*x)*Cot[a + b*x]^2)/b + ((c + d*x)*Log[Tan[a + b*x]])/b - d*(x /(2*b) + (2*x*ArcTanh[E^((2*I)*(a + b*x))])/b + Cot[a + b*x]/(2*b^2) + (x* Log[Tan[a + b*x]])/b - ((I/2)*PolyLog[2, -E^((2*I)*(a + b*x))])/b^2 + ((I/ 2)*PolyLog[2, E^((2*I)*(a + b*x))])/b^2)
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b _.)*(x_)]^(p_.), x_Symbol] :> Module[{u = IntHide[Csc[a + b*x]^n*Sec[a + b* x]^p, x]}, Simp[(c + d*x)^m u, x] - Simp[d*m Int[(c + d*x)^(m - 1)*u, x ], x]] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p] && GtQ[m, 0] && NeQ[n, p]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 269 vs. \(2 (123 ) = 246\).
Time = 0.38 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.91
method | result | size |
risch | \(\frac {2 b d x \,{\mathrm e}^{2 i \left (b x +a \right )}-i d \,{\mathrm e}^{2 i \left (b x +a \right )}+2 b c \,{\mathrm e}^{2 i \left (b x +a \right )}+i d}{b^{2} \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{2}}+\frac {c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b}-\frac {c \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b}+\frac {c \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b}-\frac {d \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right ) x}{b}+\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{2}}+\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\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 {d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}\) | \(270\) |
Input:
int((d*x+c)*csc(b*x+a)^3*sec(b*x+a),x,method=_RETURNVERBOSE)
Output:
(2*b*d*x*exp(2*I*(b*x+a))-I*d*exp(2*I*(b*x+a))+2*b*c*exp(2*I*(b*x+a))+I*d) /b^2/(exp(2*I*(b*x+a))-1)^2+1/b*c*ln(exp(I*(b*x+a))+1)-1/b*c*ln(exp(2*I*(b *x+a))+1)+1/b*c*ln(exp(I*(b*x+a))-1)-1/b*d*ln(exp(2*I*(b*x+a))+1)*x+1/2*I* d*polylog(2,-exp(2*I*(b*x+a)))/b^2+1/b*d*ln(exp(I*(b*x+a))+1)*x-I*d*polylo g(2,-exp(I*(b*x+a)))/b^2+1/b*d*ln(1-exp(I*(b*x+a)))*x+1/b^2*d*ln(1-exp(I*( b*x+a)))*a-I*d*polylog(2,exp(I*(b*x+a)))/b^2-1/b^2*d*a*ln(exp(I*(b*x+a))-1 )
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 942 vs. \(2 (119) = 238\).
Time = 0.13 (sec) , antiderivative size = 942, normalized size of antiderivative = 6.68 \[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)*csc(b*x+a)^3*sec(b*x+a),x, algorithm="fricas")
Output:
1/2*(b*d*x + d*cos(b*x + a)*sin(b*x + a) + b*c + (-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(I*cos( b*x + a) + sin(b*x + a)) + (I*d*cos(b*x + a)^2 - I*d)*dilog(I*cos(b*x + a) - sin(b*x + a)) + (I*d*cos(b*x + a)^2 - I*d)*dilog(-I*cos(b*x + a) + sin( b*x + a)) + (-I*d*cos(b*x + a)^2 + I*d)*dilog(-I*cos(b*x + a) - 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*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*c - a*d)*cos(b*x + a)^2 - b*c + a*d)*log(cos(b*x + a) + I*sin(b*x + a) + I) - (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)*log(cos( b*x + a) - I*sin(b*x + a) + I) + (b*d*x - (b*d*x + a*d)*cos(b*x + a)^2 + a *d)*log(I*cos(b*x + a) + sin(b*x + a) + 1) + (b*d*x - (b*d*x + a*d)*cos(b* x + a)^2 + a*d)*log(I*cos(b*x + a) - sin(b*x + a) + 1) + (b*d*x - (b*d*x + a*d)*cos(b*x + a)^2 + a*d)*log(-I*cos(b*x + a) + sin(b*x + a) + 1) + (b*d *x - (b*d*x + a*d)*cos(b*x + a)^2 + a*d)*log(-I*cos(b*x + a) - sin(b*x + a ) + 1) + ((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*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)*c...
\[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\int \left (c + d x\right ) \csc ^{3}{\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)*csc(b*x+a)**3*sec(b*x+a),x)
Output:
Integral((c + d*x)*csc(a + b*x)**3*sec(a + b*x), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1028 vs. \(2 (119) = 238\).
Time = 0.38 (sec) , antiderivative size = 1028, normalized size of antiderivative = 7.29 \[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)*csc(b*x+a)^3*sec(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(2*b*x + 2*a), cos(2*b*x + 2*a) + 1) - 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) - 2*(-2*I*b*d*x - 2*I*b*c - d)*cos(2*b*x + 2*a) - (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^(2*I*b*x + 2*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)) + 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(2*b*x + 2*a )^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*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)...
\[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\int { {\left (d x + c\right )} \csc \left (b x + a\right )^{3} \sec \left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)*csc(b*x+a)^3*sec(b*x+a),x, algorithm="giac")
Output:
integrate((d*x + c)*csc(b*x + a)^3*sec(b*x + a), x)
Timed out. \[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\text {Hanged} \] Input:
int((c + d*x)/(cos(a + b*x)*sin(a + b*x)^3),x)
Output:
\text{Hanged}
\[ \int (c+d x) \csc ^3(a+b x) \sec (a+b x) \, dx=\frac {4 \left (\int \csc \left (b x +a \right )^{3} \sec \left (b x +a \right ) x d x \right ) \sin \left (b x +a \right )^{2} b d -4 \,\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right ) \sin \left (b x +a \right )^{2} c -4 \,\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right ) \sin \left (b x +a \right )^{2} c +4 \,\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \sin \left (b x +a \right )^{2} c +\sin \left (b x +a \right )^{2} c -2 c}{4 \sin \left (b x +a \right )^{2} b} \] Input:
int((d*x+c)*csc(b*x+a)^3*sec(b*x+a),x)
Output:
(4*int(csc(a + b*x)**3*sec(a + b*x)*x,x)*sin(a + b*x)**2*b*d - 4*log(tan(( a + b*x)/2) - 1)*sin(a + b*x)**2*c - 4*log(tan((a + b*x)/2) + 1)*sin(a + b *x)**2*c + 4*log(tan((a + b*x)/2))*sin(a + b*x)**2*c + sin(a + b*x)**2*c - 2*c)/(4*sin(a + b*x)**2*b)