Integrand size = 19, antiderivative size = 313 \[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\frac {(e+f x)^3 \log \left (1-e^{-2 i (c+d x)}\right )}{3 f}-\frac {(e+f x)^3 \log \left (1-\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{3 f}+\frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}+\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,e^{-2 i (c+d x)}\right )}{2 d}-\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{2 d}+\frac {f (e+f x) \operatorname {PolyLog}\left (3,e^{-2 i (c+d x)}\right )}{2 d^2}-\frac {f (e+f x) \operatorname {PolyLog}\left (3,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{2 d^2}-\frac {i f^2 \operatorname {PolyLog}\left (4,e^{-2 i (c+d x)}\right )}{4 d^3}+\frac {i f^2 \operatorname {PolyLog}\left (4,\frac {(a-i b) e^{-2 i (c+d x)}}{a+i b}\right )}{4 d^3} \] Output:
1/3*(f*x+e)^3*ln(1-exp(-2*I*(d*x+c)))/f-1/3*(f*x+e)^3*ln(1-(a-I*b)/(a+I*b) /exp(2*I*(d*x+c)))/f+1/3*(f*x+e)^3*ln(a+b*cot(d*x+c))/f+1/2*I*(f*x+e)^2*po lylog(2,exp(-2*I*(d*x+c)))/d-1/2*I*(f*x+e)^2*polylog(2,(a-I*b)/(a+I*b)/exp (2*I*(d*x+c)))/d+1/2*f*(f*x+e)*polylog(3,exp(-2*I*(d*x+c)))/d^2-1/2*f*(f*x +e)*polylog(3,(a-I*b)/(a+I*b)/exp(2*I*(d*x+c)))/d^2-1/4*I*f^2*polylog(4,ex p(-2*I*(d*x+c)))/d^3+1/4*I*f^2*polylog(4,(a-I*b)/(a+I*b)/exp(2*I*(d*x+c))) /d^3
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1432\) vs. \(2(313)=626\).
Time = 11.55 (sec) , antiderivative size = 1432, normalized size of antiderivative = 4.58 \[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx =\text {Too large to display} \] Input:
Integrate[(e + f*x)^2*Log[a + b*Cot[c + d*x]],x]
Output:
(x*(3*e^2 + 3*e*f*x + f^2*x^2)*Log[a + b*Cot[c + d*x]])/3 - (e*E^(I*c)*f*C sc[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*Log[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))]))/(6*d^2) - (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*PolyLog[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))]))/(12*d^3) + ((I/12)*(a^2 + b^2)*d*((12*e^2*x^2)/(a + I*b) + (8*e*f*x^3)/(a + I*b) + (2*f^2*x^4)/(a + I*b) + (12*e^2*(a*(-1 + E^((2*I)*c)) + I*b*(1 + E^((2*I)*c)))*x*Log[1 + ( -a + I*b)/((a + I*b)*E^((2*I)*(c + d*x)))])/((a - I*b)*((-I)*a + b)*d) + ( 12*e*(a*(-1 + E^((2*I)*c)) + I*b*(1 + E^((2*I)*c)))*f*x^2*Log[1 + (-a + I* b)/((a + I*b)*E^((2*I)*(c + d*x)))])/((a - I*b)*((-I)*a + b)*d) + (4*(a*(- 1 + E^((2*I)*c)) + I*b*(1 + E^((2*I)*c)))*f^2*x^3*Log[1 + (-a + I*b)/((...
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)^2 \log (a+b \cot (c+d x)) \, dx\) |
\(\Big \downarrow \) 3031 |
\(\displaystyle \frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}-\frac {\int -\frac {b d (e+f x)^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{3 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {b d (e+f x)^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{3 f}+\frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b d \int \frac {(e+f x)^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx}{3 f}+\frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {b d \int \left (\frac {\csc ^2(c+d x) e^3}{a+b \cot (c+d x)}+\frac {3 f x \csc ^2(c+d x) e^2}{a+b \cot (c+d x)}+\frac {3 f^2 x^2 \csc ^2(c+d x) e}{a+b \cot (c+d x)}+\frac {f^3 x^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}\right )dx}{3 f}+\frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b d \left (3 e^2 f \int \frac {x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+3 e f^2 \int \frac {x^2 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+f^3 \int \frac {x^3 \csc ^2(c+d x)}{a+b \cot (c+d x)}dx-\frac {e^3 \log (a+b \cot (c+d x))}{b d}\right )}{3 f}+\frac {(e+f x)^3 \log (a+b \cot (c+d x))}{3 f}\) |
Input:
Int[(e + f*x)^2*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 = 10.33 (sec) , antiderivative size = 5774, normalized size of antiderivative = 18.45
Input:
int((f*x+e)^2*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. 1465 vs. \(2 (253) = 506\).
Time = 0.19 (sec) , antiderivative size = 1465, normalized size of antiderivative = 4.68 \[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*log(a+b*cot(d*x+c)),x, algorithm="fricas")
Output:
1/24*(-3*I*f^2*polylog(4, ((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*I*f^2*polylog(4, ((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*I*f^2*polylog(4, cos(2*d*x + 2*c) + I*sin(2*d*x + 2*c)) - 3*I*f^2*polylog(4, cos(2*d*x + 2*c) - I*sin(2*d*x + 2*c)) - 6*(-I* d^2*f^2*x^2 - 2*I*d^2*e*f*x - I*d^2*e^2)*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) - 6*(I*d^2*f^2*x^2 + 2*I*d^2*e*f*x + I*d^2*e^2)*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)*s in(2*d*x + 2*c))/(a^2 + b^2) + 1) - 6*(I*d^2*f^2*x^2 + 2*I*d^2*e*f*x + I*d ^2*e^2)*dilog(cos(2*d*x + 2*c) + I*sin(2*d*x + 2*c)) - 6*(-I*d^2*f^2*x^2 - 2*I*d^2*e*f*x - I*d^2*e^2)*dilog(cos(2*d*x + 2*c) - I*sin(2*d*x + 2*c)) + 4*(3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*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)) + 4*(3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*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)) - 4*(d^3*f^2*x^3 + 3*d^3*e*f*x^2 + 3*d^3*e^2*x + 3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*log((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)) - 4*(d^3*f^2*x^3 + 3*d^3 *e*f*x^2 + 3*d^3*e^2*x + 3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*log((a^2 ...
\[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\int \left (e + f x\right )^{2} \log {\left (a + b \cot {\left (c + d x \right )} \right )}\, dx \] Input:
integrate((f*x+e)**2*ln(a+b*cot(d*x+c)),x)
Output:
Integral((e + f*x)**2*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. 1146 vs. \(2 (253) = 506\).
Time = 0.19 (sec) , antiderivative size = 1146, normalized size of antiderivative = 3.66 \[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*log(a+b*cot(d*x+c)),x, algorithm="maxima")
Output:
1/18*(6*(3*(d*x + c)*e^2 + 3*((d*x + c)^2 - 2*(d*x + c)*c)*e*f/d + ((d*x + c)^3 - 3*(d*x + c)^2*c + 3*(d*x + c)*c^2)*f^2/d^2)*log(b*cot(d*x + c) + a ) - (6*I*f^2*polylog(4, (I*a - b)*e^(2*I*d*x + 2*I*c)/(I*a + b)) - 36*I*f^ 2*polylog(4, -e^(I*d*x + I*c)) - 36*I*f^2*polylog(4, e^(I*d*x + I*c)) - 2* (-4*I*(d*x + c)^3*f^2 + 9*(-I*d*e*f + I*c*f^2)*(d*x + c)^2 + 9*(-I*d^2*e^2 + 2*I*c*d*e*f - I*c^2*f^2)*(d*x + c))*arctan2(-(2*a*b*cos(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)^3*f^2 + 3*(I*d*e*f - I*c*f^2)*(d*x + c)^2 + 3*(I*d^2*e^2 - 2*I*c*d*e*f + I*c^2*f^ 2)*(d*x + c))*arctan2(sin(d*x + c), cos(d*x + c) + 1) - 6*(-I*(d*x + c)^3* f^2 + 3*(-I*d*e*f + I*c*f^2)*(d*x + c)^2 + 3*(-I*d^2*e^2 + 2*I*c*d*e*f - I *c^2*f^2)*(d*x + c))*arctan2(sin(d*x + c), -cos(d*x + c) + 1) - 3*(3*I*d^2 *e^2 - 6*I*c*d*e*f + 4*I*(d*x + c)^2*f^2 + 3*I*c^2*f^2 + 6*(I*d*e*f - I*c* f^2)*(d*x + c))*dilog((I*a - b)*e^(2*I*d*x + 2*I*c)/(I*a + b)) - 18*(-I*d^ 2*e^2 + 2*I*c*d*e*f - I*(d*x + c)^2*f^2 - I*c^2*f^2 + 2*(-I*d*e*f + I*c*f^ 2)*(d*x + c))*dilog(-e^(I*d*x + I*c)) - 18*(-I*d^2*e^2 + 2*I*c*d*e*f - I*( d*x + c)^2*f^2 - I*c^2*f^2 + 2*(-I*d*e*f + I*c*f^2)*(d*x + c))*dilog(e^(I* d*x + I*c)) - 3*((d*x + c)^3*f^2 + 3*(d*e*f - c*f^2)*(d*x + c)^2 + 3*(d^2* e^2 - 2*c*d*e*f + c^2*f^2)*(d*x + c))*log(cos(d*x + c)^2 + sin(d*x + c)^2 + 2*cos(d*x + c) + 1) - 3*((d*x + c)^3*f^2 + 3*(d*e*f - c*f^2)*(d*x + c...
\[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\int { {\left (f x + e\right )}^{2} \log \left (b \cot \left (d x + c\right ) + a\right ) \,d x } \] Input:
integrate((f*x+e)^2*log(a+b*cot(d*x+c)),x, algorithm="giac")
Output:
integrate((f*x + e)^2*log(b*cot(d*x + c) + a), x)
Timed out. \[ \int (e+f x)^2 \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 )}^2 \,d x \] Input:
int(log(a + b*cot(c + d*x))*(e + f*x)^2,x)
Output:
int(log(a + b*cot(c + d*x))*(e + f*x)^2, x)
\[ \int (e+f x)^2 \log (a+b \cot (c+d x)) \, dx=\int \left (f x +e \right )^{2} \mathrm {log}\left (a +b \cot \left (d x +c \right )\right )d x \] Input:
int((f*x+e)^2*log(a+b*cot(d*x+c)),x)
Output:
int((f*x+e)^2*log(a+b*cot(d*x+c)),x)