Integrand size = 19, antiderivative size = 390 \[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\frac {(e+f x)^4 \log \left (1-e^{-2 i (c+d x)}\right )}{4 f}-\frac {(e+f x)^4 \log \left (1-\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{4 f}+\frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,e^{-2 i (c+d x)}\right )}{2 d}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{2 d}+\frac {3 f (e+f x)^2 \operatorname {PolyLog}\left (3,e^{-2 i (c+d x)}\right )}{4 d^2}-\frac {3 f (e+f x)^2 \operatorname {PolyLog}\left (3,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{4 d^2}-\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,e^{-2 i (c+d x)}\right )}{4 d^3}+\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{4 d^3}-\frac {3 f^3 \operatorname {PolyLog}\left (5,e^{-2 i (c+d x)}\right )}{8 d^4}+\frac {3 f^3 \operatorname {PolyLog}\left (5,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{8 d^4} \] Output:
1/4*(f*x+e)^4*ln(1-exp(-2*I*(d*x+c)))/f-1/4*(f*x+e)^4*ln(1-(a-I*b)/(a+I*b) /exp(2*I*(d*x+c)))/f+1/4*(f*x+e)^4*ln(a+b*cot(d*x+c))/f+1/2*I*(f*x+e)^3*po lylog(2,exp(-2*I*(d*x+c)))/d-1/2*I*(f*x+e)^3*polylog(2,(a-I*b)/(a+I*b)/exp (2*I*(d*x+c)))/d+3/4*f*(f*x+e)^2*polylog(3,exp(-2*I*(d*x+c)))/d^2-3/4*f*(f *x+e)^2*polylog(3,(a-I*b)/(a+I*b)/exp(2*I*(d*x+c)))/d^2-3/4*I*f^2*(f*x+e)* polylog(4,exp(-2*I*(d*x+c)))/d^3+3/4*I*f^2*(f*x+e)*polylog(4,(a-I*b)/(a+I* b)/exp(2*I*(d*x+c)))/d^3-3/8*f^3*polylog(5,exp(-2*I*(d*x+c)))/d^4+3/8*f^3* polylog(5,(a-I*b)/(a+I*b)/exp(2*I*(d*x+c)))/d^4
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(2120\) vs. \(2(390)=780\).
Time = 14.73 (sec) , antiderivative size = 2120, normalized size of antiderivative = 5.44 \[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\text {Result too large to show} \] Input:
Integrate[(e + f*x)^3*Log[a + b*Cot[c + d*x]],x]
Output:
(x*(4*e^3 + 6*e^2*f*x + 4*e*f^2*x^2 + f^3*x^3)*Log[a + b*Cot[c + d*x]])/4 - (e^2*E^(I*c)*f*Csc[c]*((2*d^3*x^3)/E^((2*I)*c) + (3*I)*d^2*(1 - E^((-2*I )*c))*x^2*Log[1 - E^((-I)*(c + d*x))] + (3*I)*d^2*(1 - E^((-2*I)*c))*x^2*L og[1 + E^((-I)*(c + d*x))] - 6*d*(1 - E^((-2*I)*c))*x*PolyLog[2, -E^((-I)* (c + d*x))] - 6*d*(1 - E^((-2*I)*c))*x*PolyLog[2, E^((-I)*(c + d*x))] + (6 *I)*(1 - E^((-2*I)*c))*PolyLog[3, -E^((-I)*(c + d*x))] + (6*I)*(1 - E^((-2 *I)*c))*PolyLog[3, E^((-I)*(c + d*x))]))/(4*d^2) - (e*E^(I*c)*f^2*Csc[c]*( (d^4*x^4)/E^((2*I)*c) + (2*I)*d^3*(1 - E^((-2*I)*c))*x^3*Log[1 - E^((-I)*( c + d*x))] + (2*I)*d^3*(1 - E^((-2*I)*c))*x^3*Log[1 + E^((-I)*(c + d*x))] - 6*d^2*(1 - E^((-2*I)*c))*x^2*PolyLog[2, -E^((-I)*(c + d*x))] - 6*d^2*(1 - E^((-2*I)*c))*x^2*PolyLog[2, E^((-I)*(c + d*x))] + (12*I)*d*(1 - E^((-2* I)*c))*x*PolyLog[3, -E^((-I)*(c + d*x))] + (12*I)*d*(1 - E^((-2*I)*c))*x*P olyLog[3, E^((-I)*(c + d*x))] + 12*(1 - E^((-2*I)*c))*PolyLog[4, -E^((-I)* (c + d*x))] + 12*(1 - E^((-2*I)*c))*PolyLog[4, E^((-I)*(c + d*x))]))/(4*d^ 3) - (E^(I*c)*f^3*Csc[c]*((2*d^5*x^5)/E^((2*I)*c) + (5*I)*d^4*(1 - E^((-2* I)*c))*x^4*Log[1 - E^((-I)*(c + d*x))] + (5*I)*d^4*(1 - E^((-2*I)*c))*x^4* Log[1 + E^((-I)*(c + d*x))] - 20*d^3*(1 - E^((-2*I)*c))*x^3*PolyLog[2, -E^ ((-I)*(c + d*x))] - 20*d^3*(1 - E^((-2*I)*c))*x^3*PolyLog[2, E^((-I)*(c + d*x))] + (60*I)*d^2*(1 - E^((-2*I)*c))*x^2*PolyLog[3, -E^((-I)*(c + d*x))] + (60*I)*d^2*(1 - E^((-2*I)*c))*x^2*PolyLog[3, E^((-I)*(c + d*x))] + 1...
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 (e+f x)^3 \log (a+b \cot (c+d x)) \, dx\) |
\(\Big \downarrow \) 3031 |
\(\displaystyle \frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}-\frac {\int -\frac {b d (e+f x)^4 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{4 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {b d (e+f x)^4 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{4 f}+\frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b d \int \frac {(e+f x)^4 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{4 f}+\frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {b d \int \left (\frac {\csc ^2(c+d x) e^4}{a+b \cot (c+d x)}+\frac {4 f x \csc ^2(c+d x) e^3}{a+b \cot (c+d x)}+\frac {6 f^2 x^2 \csc ^2(c+d x) e^2}{a+b \cot (c+d x)}+\frac {4 f^3 x^3 \csc ^2(c+d x) e}{a+b \cot (c+d x)}+\frac {f^4 x^4 \csc ^2(c+d x)}{a+b \cot (c+d x)}\right )dx}{4 f}+\frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b d \left (4 e^3 f \int \frac {x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+6 e^2 f^2 \int \frac {x^2 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+4 e f^3 \int \frac {x^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+f^4 \int \frac {x^4 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx-\frac {e^4 \log (a+b \cot (c+d x))}{b d}\right )}{4 f}+\frac {(e+f x)^4 \log (a+b \cot (c+d x))}{4 f}\) |
Input:
Int[(e + f*x)^3*Log[a + b*Cot[c + d*x]],x]
Output:
$Aborted
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1) *(Log[u]/(b*(m + 1))), x] - Simp[1/(b*(m + 1)) Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && InverseFunc tionFreeQ[u, x] && NeQ[m, -1]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 12.59 (sec) , antiderivative size = 8174, normalized size of antiderivative = 20.96
Input:
int((f*x+e)^3*ln(a+b*cot(d*x+c)),x,method=_RETURNVERBOSE)
Output:
result too large to display
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2019 vs. \(2 (318) = 636\).
Time = 0.20 (sec) , antiderivative size = 2019, normalized size of antiderivative = 5.18 \[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^3*log(a+b*cot(d*x+c)),x, algorithm="fricas")
Output:
1/16*(3*f^3*polylog(5, ((a^2 + 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (I*a^2 - 2*a*b - I*b^2)*sin(2*d*x + 2*c))/(a^2 + b^2)) + 3*f^3*polylog(5, ((a^2 - 2 *I*a*b - b^2)*cos(2*d*x + 2*c) + (-I*a^2 - 2*a*b + I*b^2)*sin(2*d*x + 2*c) )/(a^2 + b^2)) - 3*f^3*polylog(5, cos(2*d*x + 2*c) + I*sin(2*d*x + 2*c)) - 3*f^3*polylog(5, cos(2*d*x + 2*c) - I*sin(2*d*x + 2*c)) - 4*(-I*d^3*f^3*x ^3 - 3*I*d^3*e*f^2*x^2 - 3*I*d^3*e^2*f*x - I*d^3*e^3)*dilog(-(a^2 + b^2 - (a^2 + 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (-I*a^2 + 2*a*b + I*b^2)*sin(2*d* x + 2*c))/(a^2 + b^2) + 1) - 4*(I*d^3*f^3*x^3 + 3*I*d^3*e*f^2*x^2 + 3*I*d^ 3*e^2*f*x + I*d^3*e^3)*dilog(-(a^2 + b^2 - (a^2 - 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (I*a^2 + 2*a*b - I*b^2)*sin(2*d*x + 2*c))/(a^2 + b^2) + 1) - 4*( I*d^3*f^3*x^3 + 3*I*d^3*e*f^2*x^2 + 3*I*d^3*e^2*f*x + I*d^3*e^3)*dilog(cos (2*d*x + 2*c) + I*sin(2*d*x + 2*c)) - 4*(-I*d^3*f^3*x^3 - 3*I*d^3*e*f^2*x^ 2 - 3*I*d^3*e^2*f*x - I*d^3*e^3)*dilog(cos(2*d*x + 2*c) - I*sin(2*d*x + 2* c)) + 2*(4*c*d^3*e^3 - 6*c^2*d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^3)*log(1/2* a^2 + I*a*b - 1/2*b^2 - 1/2*(a^2 + b^2)*cos(2*d*x + 2*c) + 1/2*(I*a^2 + I* b^2)*sin(2*d*x + 2*c)) + 2*(4*c*d^3*e^3 - 6*c^2*d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^3)*log(-1/2*a^2 + I*a*b + 1/2*b^2 + 1/2*(a^2 + b^2)*cos(2*d*x + 2* c) + 1/2*(I*a^2 + I*b^2)*sin(2*d*x + 2*c)) - 2*(d^4*f^3*x^4 + 4*d^4*e*f^2* x^3 + 6*d^4*e^2*f*x^2 + 4*d^4*e^3*x + 4*c*d^3*e^3 - 6*c^2*d^2*e^2*f + 4*c^ 3*d*e*f^2 - c^4*f^3)*log((a^2 + b^2 - (a^2 + 2*I*a*b - b^2)*cos(2*d*x +...
\[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\int \left (e + f x\right )^{3} \log {\left (a + b \cot {\left (c + d x \right )} \right )}\, dx \] Input:
integrate((f*x+e)**3*ln(a+b*cot(d*x+c)),x)
Output:
Integral((e + f*x)**3*log(a + b*cot(c + d*x)), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1887 vs. \(2 (318) = 636\).
Time = 0.29 (sec) , antiderivative size = 1887, normalized size of antiderivative = 4.84 \[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^3*log(a+b*cot(d*x+c)),x, algorithm="maxima")
Output:
1/24*(6*(4*(d*x + c)*e^3 + 6*((d*x + c)^2 - 2*(d*x + c)*c)*e^2*f/d + 4*((d *x + c)^3 - 3*(d*x + c)^2*c + 3*(d*x + c)*c^2)*e*f^2/d^2 + ((d*x + c)^4 - 4*(d*x + c)^3*c + 6*(d*x + c)^2*c^2 - 4*(d*x + c)*c^3)*f^3/d^3)*log(b*cot( d*x + c) + a) + (18*f^3*polylog(5, (I*a - b)*e^(2*I*d*x + 2*I*c)/(I*a + b) ) - 144*f^3*polylog(5, -e^(I*d*x + I*c)) - 144*f^3*polylog(5, e^(I*d*x + I *c)) + 4*(-3*I*(d*x + c)^4*f^3 + 8*(-I*d*e*f^2 + I*c*f^3)*(d*x + c)^3 + 9* (-I*d^2*e^2*f + 2*I*c*d*e*f^2 - I*c^2*f^3)*(d*x + c)^2 + 6*(-I*d^3*e^3 + 3 *I*c*d^2*e^2*f - 3*I*c^2*d*e*f^2 + I*c^3*f^3)*(d*x + c))*arctan2(-(2*a*b*c os(2*d*x + 2*c) + (a^2 - b^2)*sin(2*d*x + 2*c))/(a^2 + b^2), (2*a*b*sin(2* d*x + 2*c) + a^2 + b^2 - (a^2 - b^2)*cos(2*d*x + 2*c))/(a^2 + b^2)) + 6*(I *(d*x + c)^4*f^3 + 4*(I*d*e*f^2 - I*c*f^3)*(d*x + c)^3 + 6*(I*d^2*e^2*f - 2*I*c*d*e*f^2 + I*c^2*f^3)*(d*x + c)^2 + 4*(I*d^3*e^3 - 3*I*c*d^2*e^2*f + 3*I*c^2*d*e*f^2 - I*c^3*f^3)*(d*x + c))*arctan2(sin(d*x + c), cos(d*x + c) + 1) + 6*(-I*(d*x + c)^4*f^3 + 4*(-I*d*e*f^2 + I*c*f^3)*(d*x + c)^3 + 6*( -I*d^2*e^2*f + 2*I*c*d*e*f^2 - I*c^2*f^3)*(d*x + c)^2 + 4*(-I*d^3*e^3 + 3* I*c*d^2*e^2*f - 3*I*c^2*d*e*f^2 + I*c^3*f^3)*(d*x + c))*arctan2(sin(d*x + c), -cos(d*x + c) + 1) + 12*(I*d^3*e^3 - 3*I*c*d^2*e^2*f + 3*I*c^2*d*e*f^2 + 2*I*(d*x + c)^3*f^3 - I*c^3*f^3 + 4*(I*d*e*f^2 - I*c*f^3)*(d*x + c)^2 + 3*(I*d^2*e^2*f - 2*I*c*d*e*f^2 + I*c^2*f^3)*(d*x + c))*dilog((I*a - b)*e^ (2*I*d*x + 2*I*c)/(I*a + b)) + 24*(-I*d^3*e^3 + 3*I*c*d^2*e^2*f - 3*I*c...
\[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\int { {\left (f x + e\right )}^{3} \log \left (b \cot \left (d x + c\right ) + a\right ) \,d x } \] Input:
integrate((f*x+e)^3*log(a+b*cot(d*x+c)),x, algorithm="giac")
Output:
integrate((f*x + e)^3*log(b*cot(d*x + c) + a), x)
Timed out. \[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\int \ln \left (a+b\,\mathrm {cot}\left (c+d\,x\right )\right )\,{\left (e+f\,x\right )}^3 \,d x \] Input:
int(log(a + b*cot(c + d*x))*(e + f*x)^3,x)
Output:
int(log(a + b*cot(c + d*x))*(e + f*x)^3, x)
\[ \int (e+f x)^3 \log (a+b \cot (c+d x)) \, dx=\int \left (f x +e \right )^{3} \mathrm {log}\left (a +b \cot \left (d x +c \right )\right )d x \] Input:
int((f*x+e)^3*log(a+b*cot(d*x+c)),x)
Output:
int((f*x+e)^3*log(a+b*cot(d*x+c)),x)