Integrand size = 20, antiderivative size = 333 \[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {24 d^4 \cos (a+b x)}{b^5}-\frac {12 d^2 (c+d x)^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^4 \cos (a+b x)}{b}+\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {4 i d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {12 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {24 i d^3 (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )}{b^5}-\frac {24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )}{b^5}+\frac {24 d^3 (c+d x) \sin (a+b x)}{b^4}-\frac {4 d (c+d x)^3 \sin (a+b x)}{b^2} \] Output:
-2*(d*x+c)^4*arctanh(exp(I*(b*x+a)))/b+24*d^4*cos(b*x+a)/b^5-12*d^2*(d*x+c )^2*cos(b*x+a)/b^3+(d*x+c)^4*cos(b*x+a)/b+4*I*d*(d*x+c)^3*polylog(2,-exp(I *(b*x+a)))/b^2-4*I*d*(d*x+c)^3*polylog(2,exp(I*(b*x+a)))/b^2-12*d^2*(d*x+c )^2*polylog(3,-exp(I*(b*x+a)))/b^3+12*d^2*(d*x+c)^2*polylog(3,exp(I*(b*x+a )))/b^3-24*I*d^3*(d*x+c)*polylog(4,-exp(I*(b*x+a)))/b^4+24*I*d^3*(d*x+c)*p olylog(4,exp(I*(b*x+a)))/b^4+24*d^4*polylog(5,-exp(I*(b*x+a)))/b^5-24*d^4* polylog(5,exp(I*(b*x+a)))/b^5+24*d^3*(d*x+c)*sin(b*x+a)/b^4-4*d*(d*x+c)^3* sin(b*x+a)/b^2
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(837\) vs. \(2(333)=666\).
Time = 0.82 (sec) , antiderivative size = 837, normalized size of antiderivative = 2.51 \[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\frac {b^4 c^4 \cos (a+b x)-12 b^2 c^2 d^2 \cos (a+b x)+24 d^4 \cos (a+b x)+4 b^4 c^3 d x \cos (a+b x)-24 b^2 c d^3 x \cos (a+b x)+6 b^4 c^2 d^2 x^2 \cos (a+b x)-12 b^2 d^4 x^2 \cos (a+b x)+4 b^4 c d^3 x^3 \cos (a+b x)+b^4 d^4 x^4 \cos (a+b x)+b^4 c^4 \log \left (1-e^{i (a+b x)}\right )+4 b^4 c^3 d x \log \left (1-e^{i (a+b x)}\right )+6 b^4 c^2 d^2 x^2 \log \left (1-e^{i (a+b x)}\right )+4 b^4 c d^3 x^3 \log \left (1-e^{i (a+b x)}\right )+b^4 d^4 x^4 \log \left (1-e^{i (a+b x)}\right )-b^4 c^4 \log \left (1+e^{i (a+b x)}\right )-4 b^4 c^3 d x \log \left (1+e^{i (a+b x)}\right )-6 b^4 c^2 d^2 x^2 \log \left (1+e^{i (a+b x)}\right )-4 b^4 c d^3 x^3 \log \left (1+e^{i (a+b x)}\right )-b^4 d^4 x^4 \log \left (1+e^{i (a+b x)}\right )+4 i b^3 d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-4 i b^3 d (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )-12 b^2 c^2 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )-24 b^2 c d^3 x \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )-12 b^2 d^4 x^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )+12 b^2 c^2 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+24 b^2 c d^3 x \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+12 b^2 d^4 x^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )-24 i b c d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )-24 i b d^4 x \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )+24 i b c d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )+24 i b d^4 x \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )+24 d^4 \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )-24 d^4 \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )-4 b^3 c^3 d \sin (a+b x)+24 b c d^3 \sin (a+b x)-12 b^3 c^2 d^2 x \sin (a+b x)+24 b d^4 x \sin (a+b x)-12 b^3 c d^3 x^2 \sin (a+b x)-4 b^3 d^4 x^3 \sin (a+b x)}{b^5} \] Input:
Integrate[(c + d*x)^4*Cos[a + b*x]*Cot[a + b*x],x]
Output:
(b^4*c^4*Cos[a + b*x] - 12*b^2*c^2*d^2*Cos[a + b*x] + 24*d^4*Cos[a + b*x] + 4*b^4*c^3*d*x*Cos[a + b*x] - 24*b^2*c*d^3*x*Cos[a + b*x] + 6*b^4*c^2*d^2 *x^2*Cos[a + b*x] - 12*b^2*d^4*x^2*Cos[a + b*x] + 4*b^4*c*d^3*x^3*Cos[a + b*x] + b^4*d^4*x^4*Cos[a + b*x] + b^4*c^4*Log[1 - E^(I*(a + b*x))] + 4*b^4 *c^3*d*x*Log[1 - E^(I*(a + b*x))] + 6*b^4*c^2*d^2*x^2*Log[1 - E^(I*(a + b* x))] + 4*b^4*c*d^3*x^3*Log[1 - E^(I*(a + b*x))] + b^4*d^4*x^4*Log[1 - E^(I *(a + b*x))] - b^4*c^4*Log[1 + E^(I*(a + b*x))] - 4*b^4*c^3*d*x*Log[1 + E^ (I*(a + b*x))] - 6*b^4*c^2*d^2*x^2*Log[1 + E^(I*(a + b*x))] - 4*b^4*c*d^3* x^3*Log[1 + E^(I*(a + b*x))] - b^4*d^4*x^4*Log[1 + E^(I*(a + b*x))] + (4*I )*b^3*d*(c + d*x)^3*PolyLog[2, -E^(I*(a + b*x))] - (4*I)*b^3*d*(c + d*x)^3 *PolyLog[2, E^(I*(a + b*x))] - 12*b^2*c^2*d^2*PolyLog[3, -E^(I*(a + b*x))] - 24*b^2*c*d^3*x*PolyLog[3, -E^(I*(a + b*x))] - 12*b^2*d^4*x^2*PolyLog[3, -E^(I*(a + b*x))] + 12*b^2*c^2*d^2*PolyLog[3, E^(I*(a + b*x))] + 24*b^2*c *d^3*x*PolyLog[3, E^(I*(a + b*x))] + 12*b^2*d^4*x^2*PolyLog[3, E^(I*(a + b *x))] - (24*I)*b*c*d^3*PolyLog[4, -E^(I*(a + b*x))] - (24*I)*b*d^4*x*PolyL og[4, -E^(I*(a + b*x))] + (24*I)*b*c*d^3*PolyLog[4, E^(I*(a + b*x))] + (24 *I)*b*d^4*x*PolyLog[4, E^(I*(a + b*x))] + 24*d^4*PolyLog[5, -E^(I*(a + b*x ))] - 24*d^4*PolyLog[5, E^(I*(a + b*x))] - 4*b^3*c^3*d*Sin[a + b*x] + 24*b *c*d^3*Sin[a + b*x] - 12*b^3*c^2*d^2*x*Sin[a + b*x] + 24*b*d^4*x*Sin[a + b *x] - 12*b^3*c*d^3*x^2*Sin[a + b*x] - 4*b^3*d^4*x^3*Sin[a + b*x])/b^5
Time = 1.75 (sec) , antiderivative size = 376, normalized size of antiderivative = 1.13, number of steps used = 20, number of rules used = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.950, Rules used = {4908, 3042, 3777, 3042, 3777, 25, 3042, 3777, 3042, 3777, 25, 3042, 3118, 4671, 3011, 7163, 7163, 2720, 7143}
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)^4 \cos (a+b x) \cot (a+b x) \, dx\) |
\(\Big \downarrow \) 4908 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\int (c+d x)^4 \sin (a+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\int (c+d x)^4 \sin (a+b x)dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\frac {4 d \int (c+d x)^3 \cos (a+b x)dx}{b}+\int (c+d x)^4 \csc (a+b x)dx+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {4 d \int (c+d x)^3 \sin \left (a+b x+\frac {\pi }{2}\right )dx}{b}+\int (c+d x)^4 \csc (a+b x)dx+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\frac {4 d \left (\frac {3 d \int -(c+d x)^2 \sin (a+b x)dx}{b}+\frac {(c+d x)^3 \sin (a+b x)}{b}\right )}{b}+\int (c+d x)^4 \csc (a+b x)dx+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \int (c+d x)^2 \sin (a+b x)dx}{b}\right )}{b}+\int (c+d x)^4 \csc (a+b x)dx+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \int (c+d x)^2 \sin (a+b x)dx}{b}\right )}{b}+\int (c+d x)^4 \csc (a+b x)dx+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \int (c+d x) \cos (a+b x)dx}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \int (c+d x) \sin \left (a+b x+\frac {\pi }{2}\right )dx}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \int -\sin (a+b x)dx}{b}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \sin (a+b x)dx}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \sin (a+b x)dx}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3118 |
\(\displaystyle \int (c+d x)^4 \csc (a+b x)dx-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {4 d \int (c+d x)^3 \log \left (1-e^{i (a+b x)}\right )dx}{b}+\frac {4 d \int (c+d x)^3 \log \left (1+e^{i (a+b x)}\right )dx}{b}-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {3 i d \int (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {3 i d \int (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 7163 |
\(\displaystyle \frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \int (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \int (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 7163 |
\(\displaystyle \frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {i d \int \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {i d \int \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle -\frac {2 (c+d x)^4 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {d \operatorname {PolyLog}\left (5,-e^{i (a+b x)}\right )}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {4 d \left (\frac {i (c+d x)^3 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {3 i d \left (\frac {2 i d \left (\frac {d \operatorname {PolyLog}\left (5,e^{i (a+b x)}\right )}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b}\right )}{b}-\frac {i (c+d x)^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {4 d \left (\frac {(c+d x)^3 \sin (a+b x)}{b}-\frac {3 d \left (\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^2 \cos (a+b x)}{b}\right )}{b}\right )}{b}+\frac {(c+d x)^4 \cos (a+b x)}{b}\) |
Input:
Int[(c + d*x)^4*Cos[a + b*x]*Cot[a + b*x],x]
Output:
(-2*(c + d*x)^4*ArcTanh[E^(I*(a + b*x))])/b + ((c + d*x)^4*Cos[a + b*x])/b + (4*d*((I*(c + d*x)^3*PolyLog[2, -E^(I*(a + b*x))])/b - ((3*I)*d*(((-I)* (c + d*x)^2*PolyLog[3, -E^(I*(a + b*x))])/b + ((2*I)*d*(((-I)*(c + d*x)*Po lyLog[4, -E^(I*(a + b*x))])/b + (d*PolyLog[5, -E^(I*(a + b*x))])/b^2))/b)) /b))/b - (4*d*((I*(c + d*x)^3*PolyLog[2, E^(I*(a + b*x))])/b - ((3*I)*d*(( (-I)*(c + d*x)^2*PolyLog[3, E^(I*(a + b*x))])/b + ((2*I)*d*(((-I)*(c + d*x )*PolyLog[4, E^(I*(a + b*x))])/b + (d*PolyLog[5, E^(I*(a + b*x))])/b^2))/b ))/b))/b - (4*d*(((c + d*x)^3*Sin[a + b*x])/b - (3*d*(-(((c + d*x)^2*Cos[a + b*x])/b) + (2*d*((d*Cos[a + b*x])/b^2 + ((c + d*x)*Sin[a + b*x])/b))/b) )/b))/b
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( -(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*C os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
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[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d _.)*(x_))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^ (p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x] /; Fr eeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. )*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F])) Int[(e + f*x) ^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c , d, e, f, n, p}, x] && GtQ[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1294 vs. \(2 (311 ) = 622\).
Time = 1.36 (sec) , antiderivative size = 1295, normalized size of antiderivative = 3.89
Input:
int((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x,method=_RETURNVERBOSE)
Output:
-2/b*c^4*arctanh(exp(I*(b*x+a)))+1/2*(d^4*x^4*b^4+4*b^4*c*d^3*x^3+6*b^4*c^ 2*d^2*x^2+4*b^4*c^3*d*x-4*I*b^3*d^4*x^3+b^4*c^4-12*b^2*d^4*x^2-12*I*b^3*c* d^3*x^2-24*b^2*c*d^3*x-12*I*b^3*c^2*d^2*x-12*b^2*c^2*d^2-4*I*b^3*c^3*d+24* I*b*d^4*x+24*d^4+24*I*b*c*d^3)/b^5*exp(-I*(b*x+a))+1/b^5*d^4*ln(exp(I*(b*x +a))+1)*a^4-1/b^5*d^4*ln(1-exp(I*(b*x+a)))*a^4+12/b^3*d^4*polylog(3,exp(I* (b*x+a)))*x^2-12/b^3*d^4*polylog(3,-exp(I*(b*x+a)))*x^2-2/b^5*d^4*a^4*arct anh(exp(I*(b*x+a)))-12/b^3*d^2*c^2*polylog(3,-exp(I*(b*x+a)))+12/b^3*d^2*c ^2*polylog(3,exp(I*(b*x+a)))+1/b*d^4*ln(1-exp(I*(b*x+a)))*x^4-1/b*d^4*ln(e xp(I*(b*x+a))+1)*x^4-4/b*c^3*d*ln(exp(I*(b*x+a))+1)*x+4/b*c^3*d*ln(1-exp(I *(b*x+a)))*x-6/b*d^2*c^2*ln(exp(I*(b*x+a))+1)*x^2+6/b*d^2*c^2*ln(1-exp(I*( b*x+a)))*x^2-4/b*c*d^3*ln(exp(I*(b*x+a))+1)*x^3+4/b*c*d^3*ln(1-exp(I*(b*x+ a)))*x^3+6/b^3*d^2*c^2*ln(exp(I*(b*x+a))+1)*a^2-6/b^3*d^2*c^2*ln(1-exp(I*( b*x+a)))*a^2-4/b^2*c^3*d*ln(exp(I*(b*x+a))+1)*a+4/b^2*c^3*d*ln(1-exp(I*(b* x+a)))*a-4/b^4*c*d^3*ln(exp(I*(b*x+a))+1)*a^3+4/b^4*c*d^3*ln(1-exp(I*(b*x+ a)))*a^3-24/b^3*c*d^3*polylog(3,-exp(I*(b*x+a)))*x+24/b^3*c*d^3*polylog(3, exp(I*(b*x+a)))*x+8/b^4*c*d^3*a^3*arctanh(exp(I*(b*x+a)))-12/b^3*c^2*d^2*a ^2*arctanh(exp(I*(b*x+a)))+8/b^2*c^3*d*a*arctanh(exp(I*(b*x+a)))-4*I/b^2*d ^4*polylog(2,exp(I*(b*x+a)))*x^3-12*I/b^2*c*d^3*polylog(2,exp(I*(b*x+a)))* x^2+12*I/b^2*d^2*c^2*polylog(2,-exp(I*(b*x+a)))*x-12*I/b^2*d^2*c^2*polylog (2,exp(I*(b*x+a)))*x+12*I/b^2*c*d^3*polylog(2,-exp(I*(b*x+a)))*x^2+4*I/...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1367 vs. \(2 (305) = 610\).
Time = 0.15 (sec) , antiderivative size = 1367, normalized size of antiderivative = 4.11 \[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="fricas")
Output:
-1/2*(24*d^4*polylog(5, cos(b*x + a) + I*sin(b*x + a)) + 24*d^4*polylog(5, cos(b*x + a) - I*sin(b*x + a)) - 24*d^4*polylog(5, -cos(b*x + a) + I*sin( b*x + a)) - 24*d^4*polylog(5, -cos(b*x + a) - I*sin(b*x + a)) - 2*(b^4*d^4 *x^4 + 4*b^4*c*d^3*x^3 + b^4*c^4 - 12*b^2*c^2*d^2 + 24*d^4 + 6*(b^4*c^2*d^ 2 - 2*b^2*d^4)*x^2 + 4*(b^4*c^3*d - 6*b^2*c*d^3)*x)*cos(b*x + a) + 4*(I*b^ 3*d^4*x^3 + 3*I*b^3*c*d^3*x^2 + 3*I*b^3*c^2*d^2*x + I*b^3*c^3*d)*dilog(cos (b*x + a) + I*sin(b*x + a)) + 4*(-I*b^3*d^4*x^3 - 3*I*b^3*c*d^3*x^2 - 3*I* b^3*c^2*d^2*x - I*b^3*c^3*d)*dilog(cos(b*x + a) - I*sin(b*x + a)) + 4*(I*b ^3*d^4*x^3 + 3*I*b^3*c*d^3*x^2 + 3*I*b^3*c^2*d^2*x + I*b^3*c^3*d)*dilog(-c os(b*x + a) + I*sin(b*x + a)) + 4*(-I*b^3*d^4*x^3 - 3*I*b^3*c*d^3*x^2 - 3* I*b^3*c^2*d^2*x - I*b^3*c^3*d)*dilog(-cos(b*x + a) - I*sin(b*x + a)) + (b^ 4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x + b^4*c^4) *log(cos(b*x + a) + I*sin(b*x + a) + 1) + (b^4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6*b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x + b^4*c^4)*log(cos(b*x + a) - I*sin(b*x + a) + 1) - (b^4*c^4 - 4*a*b^3*c^3*d + 6*a^2*b^2*c^2*d^2 - 4*a^3*b*c*d^3 + a^4*d^4)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) - (b^4*c^4 - 4*a*b^3*c^3*d + 6*a^2*b^2*c^2*d^2 - 4*a^3*b*c*d^3 + a^4*d^4)*log(-1/2*cos( b*x + a) - 1/2*I*sin(b*x + a) + 1/2) - (b^4*d^4*x^4 + 4*b^4*c*d^3*x^3 + 6* b^4*c^2*d^2*x^2 + 4*b^4*c^3*d*x + 4*a*b^3*c^3*d - 6*a^2*b^2*c^2*d^2 + 4*a^ 3*b*c*d^3 - a^4*d^4)*log(-cos(b*x + a) + I*sin(b*x + a) + 1) - (b^4*d^4...
\[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int \left (c + d x\right )^{4} \cos {\left (a + b x \right )} \cot {\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)**4*cos(b*x+a)*cot(b*x+a),x)
Output:
Integral((c + d*x)**4*cos(a + b*x)*cot(a + b*x), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1548 vs. \(2 (305) = 610\).
Time = 0.25 (sec) , antiderivative size = 1548, normalized size of antiderivative = 4.65 \[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="maxima")
Output:
1/2*(c^4*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1)) - 4*a*c^3*d*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1 ))/b + 6*a^2*c^2*d^2*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1))/b^2 - 4*a^3*c*d^3*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + lo g(cos(b*x + a) - 1))/b^3 + a^4*d^4*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1))/b^4 + (48*d^4*polylog(5, -e^(I*b*x + I*a)) - 48* d^4*polylog(5, e^(I*b*x + I*a)) + 2*(-I*(b*x + a)^4*d^4 + 4*(-I*b*c*d^3 + I*a*d^4)*(b*x + a)^3 + 6*(-I*b^2*c^2*d^2 + 2*I*a*b*c*d^3 - I*a^2*d^4)*(b*x + a)^2 + 4*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^2 - 3*I*a^2*b*c*d^3 + I*a^3*d^ 4)*(b*x + a))*arctan2(sin(b*x + a), cos(b*x + a) + 1) + 2*(-I*(b*x + a)^4* d^4 + 4*(-I*b*c*d^3 + I*a*d^4)*(b*x + a)^3 + 6*(-I*b^2*c^2*d^2 + 2*I*a*b*c *d^3 - I*a^2*d^4)*(b*x + a)^2 + 4*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^2 - 3*I* a^2*b*c*d^3 + I*a^3*d^4)*(b*x + a))*arctan2(sin(b*x + a), -cos(b*x + a) + 1) + 2*((b*x + a)^4*d^4 - 12*b^2*c^2*d^2 + 24*a*b*c*d^3 - 12*(a^2 - 2)*d^4 + 4*(b*c*d^3 - a*d^4)*(b*x + a)^3 + 6*(b^2*c^2*d^2 - 2*a*b*c*d^3 + (a^2 - 2)*d^4)*(b*x + a)^2 + 4*(b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*(a^2 - 2)*b*c*d^ 3 - (a^3 - 6*a)*d^4)*(b*x + a))*cos(b*x + a) + 8*(I*b^3*c^3*d - 3*I*a*b^2* c^2*d^2 + 3*I*a^2*b*c*d^3 + I*(b*x + a)^3*d^4 - I*a^3*d^4 + 3*(I*b*c*d^3 - I*a*d^4)*(b*x + a)^2 + 3*(I*b^2*c^2*d^2 - 2*I*a*b*c*d^3 + I*a^2*d^4)*(b*x + a))*dilog(-e^(I*b*x + I*a)) + 8*(-I*b^3*c^3*d + 3*I*a*b^2*c^2*d^2 - ...
\[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int { {\left (d x + c\right )}^{4} \cos \left (b x + a\right ) \cot \left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x, algorithm="giac")
Output:
integrate((d*x + c)^4*cos(b*x + a)*cot(b*x + a), x)
Timed out. \[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\int \cos \left (a+b\,x\right )\,\mathrm {cot}\left (a+b\,x\right )\,{\left (c+d\,x\right )}^4 \,d x \] Input:
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^4,x)
Output:
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^4, x)
\[ \int (c+d x)^4 \cos (a+b x) \cot (a+b x) \, dx=\frac {\cos \left (b x +a \right ) c^{4}+\left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x^{4}d x \right ) b \,d^{4}+4 \left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x^{3}d x \right ) b c \,d^{3}+6 \left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x^{2}d x \right ) b \,c^{2} d^{2}+4 \left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x d x \right ) b \,c^{3} d +\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) c^{4}-c^{4}}{b} \] Input:
int((d*x+c)^4*cos(b*x+a)*cot(b*x+a),x)
Output:
(cos(a + b*x)*c**4 + int(cos(a + b*x)*cot(a + b*x)*x**4,x)*b*d**4 + 4*int( cos(a + b*x)*cot(a + b*x)*x**3,x)*b*c*d**3 + 6*int(cos(a + b*x)*cot(a + b* x)*x**2,x)*b*c**2*d**2 + 4*int(cos(a + b*x)*cot(a + b*x)*x,x)*b*c**3*d + l og(tan((a + b*x)/2))*c**4 - c**4)/b