Integrand size = 17, antiderivative size = 33 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=-\frac {285 x}{2}+5 (3-2 \cot (x))^2+(3-2 \cot (x))^3-42 \cot (x)+4 \log (\sin (x)) \] Output:
-285/2*x+5*(3-2*cot(x))^2+(3-2*cot(x))^3-42*cot(x)+4*ln(sin(x))
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.67 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\frac {27 x}{2}+56 \csc ^2(x)-8 \cot ^3(x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(x)\right )-180 \cot (x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(x)\right )+4 \log (\sin (x)) \] Input:
Integrate[(1/2 - 3*Cot[x])*(3 - 2*Cot[x])^3,x]
Output:
(27*x)/2 + 56*Csc[x]^2 - 8*Cot[x]^3*Hypergeometric2F1[-3/2, 1, -1/2, -Tan[ x]^2] - 180*Cot[x]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[x]^2] + 4*Log[Sin[ x]]
Time = 0.37 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.588, Rules used = {3042, 4011, 3042, 4011, 3042, 4008, 25, 3042, 25, 3956}
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 \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (2 \tan \left (x+\frac {\pi }{2}\right )+3\right )^3 \left (3 \tan \left (x+\frac {\pi }{2}\right )+\frac {1}{2}\right )dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \left (-10 \cot (x)-\frac {9}{2}\right ) (3-2 \cot (x))^2dx+(3-2 \cot (x))^3\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (2 \tan \left (x+\frac {\pi }{2}\right )+3\right )^2 \left (10 \tan \left (x+\frac {\pi }{2}\right )-\frac {9}{2}\right )dx+(3-2 \cot (x))^3\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \left (-21 \cot (x)-\frac {67}{2}\right ) (3-2 \cot (x))dx+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (2 \tan \left (x+\frac {\pi }{2}\right )+3\right ) \left (21 \tan \left (x+\frac {\pi }{2}\right )-\frac {67}{2}\right )dx+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle -4 \int -\cot (x)dx-\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)\) |
\(\Big \downarrow \) 25 |
\(\displaystyle 4 \int \cot (x)dx-\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 \int -\tan \left (x+\frac {\pi }{2}\right )dx-\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -4 \int \tan \left (x+\frac {\pi }{2}\right )dx-\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle -\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)+4 \log (\sin (x))\) |
Input:
Int[(1/2 - 3*Cot[x])*(3 - 2*Cot[x])^3,x]
Output:
(-285*x)/2 + 5*(3 - 2*Cot[x])^2 + (3 - 2*Cot[x])^3 - 42*Cot[x] + 4*Log[Sin [x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Time = 0.17 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00
method | result | size |
parallelrisch | \(4 \ln \left (\tan \left (x \right )\right )-2 \ln \left (\sec \left (x \right )^{2}\right )-\frac {285 x}{2}-8 \cot \left (x \right )^{3}-156 \cot \left (x \right )+56 \cot \left (x \right )^{2}\) | \(33\) |
derivativedivides | \(-8 \cot \left (x \right )^{3}+56 \cot \left (x \right )^{2}-156 \cot \left (x \right )-2 \ln \left (\cot \left (x \right )^{2}+1\right )+\frac {285 \pi }{4}-\frac {285 \,\operatorname {arccot}\left (\cot \left (x \right )\right )}{2}\) | \(35\) |
default | \(-8 \cot \left (x \right )^{3}+56 \cot \left (x \right )^{2}-156 \cot \left (x \right )-2 \ln \left (\cot \left (x \right )^{2}+1\right )+\frac {285 \pi }{4}-\frac {285 \,\operatorname {arccot}\left (\cot \left (x \right )\right )}{2}\) | \(35\) |
norman | \(\frac {-8-156 \tan \left (x \right )^{2}-\frac {285 x \tan \left (x \right )^{3}}{2}+56 \tan \left (x \right )}{\tan \left (x \right )^{3}}+4 \ln \left (\tan \left (x \right )\right )-2 \ln \left (1+\tan \left (x \right )^{2}\right )\) | \(40\) |
parts | \(\frac {27 x}{2}-156 \cot \left (x \right )+78 \pi -156 \,\operatorname {arccot}\left (\cot \left (x \right )\right )+56 \cot \left (x \right )^{2}-56 \ln \left (\cot \left (x \right )^{2}+1\right )-8 \cot \left (x \right )^{3}-108 \ln \left (\sin \left (x \right )\right )\) | \(43\) |
risch | \(-\frac {285 x}{2}-4 i x +\frac {\left (-\frac {224}{1873}-\frac {264 i}{1873}\right ) \left (1873 \,{\mathrm e}^{4 i x}-1260 i {\mathrm e}^{2 i x}-3358 \,{\mathrm e}^{2 i x}+1221+1036 i\right )}{\left ({\mathrm e}^{2 i x}-1\right )^{3}}+4 \ln \left ({\mathrm e}^{2 i x}-1\right )\) | \(58\) |
Input:
int((1/2-3*cot(x))*(3-2*cot(x))^3,x,method=_RETURNVERBOSE)
Output:
4*ln(tan(x))-2*ln(sec(x)^2)-285/2*x-8*cot(x)^3-156*cot(x)+56*cot(x)^2
Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (33) = 66\).
Time = 0.07 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.15 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\frac {4 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, x\right ) + \frac {1}{2}\right ) \sin \left (2 \, x\right ) - 296 \, \cos \left (2 \, x\right )^{2} - {\left (285 \, x \cos \left (2 \, x\right ) - 285 \, x + 224\right )} \sin \left (2 \, x\right ) + 32 \, \cos \left (2 \, x\right ) + 328}{2 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \sin \left (2 \, x\right )} \] Input:
integrate((1/2-3*cot(x))*(3-2*cot(x))^3,x, algorithm="fricas")
Output:
1/2*(4*(cos(2*x) - 1)*log(-1/2*cos(2*x) + 1/2)*sin(2*x) - 296*cos(2*x)^2 - (285*x*cos(2*x) - 285*x + 224)*sin(2*x) + 32*cos(2*x) + 328)/((cos(2*x) - 1)*sin(2*x))
Time = 0.20 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.18 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=- \frac {285 x}{2} - 2 \log {\left (\tan ^{2}{\left (x \right )} + 1 \right )} + 4 \log {\left (\tan {\left (x \right )} \right )} - \frac {156}{\tan {\left (x \right )}} + \frac {56}{\tan ^{2}{\left (x \right )}} - \frac {8}{\tan ^{3}{\left (x \right )}} \] Input:
integrate((1/2-3*cot(x))*(3-2*cot(x))**3,x)
Output:
-285*x/2 - 2*log(tan(x)**2 + 1) + 4*log(tan(x)) - 156/tan(x) + 56/tan(x)** 2 - 8/tan(x)**3
Time = 0.10 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.09 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=-\frac {285}{2} \, x - \frac {4 \, {\left (39 \, \tan \left (x\right )^{2} - 14 \, \tan \left (x\right ) + 2\right )}}{\tan \left (x\right )^{3}} - 2 \, \log \left (\tan \left (x\right )^{2} + 1\right ) + 4 \, \log \left (\tan \left (x\right )\right ) \] Input:
integrate((1/2-3*cot(x))*(3-2*cot(x))^3,x, algorithm="maxima")
Output:
-285/2*x - 4*(39*tan(x)^2 - 14*tan(x) + 2)/tan(x)^3 - 2*log(tan(x)^2 + 1) + 4*log(tan(x))
Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (33) = 66\).
Time = 0.13 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.27 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\tan \left (\frac {1}{2} \, x\right )^{3} + 14 \, \tan \left (\frac {1}{2} \, x\right )^{2} - \frac {285}{2} \, x - \frac {22 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 225 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 42 \, \tan \left (\frac {1}{2} \, x\right ) + 3}{3 \, \tan \left (\frac {1}{2} \, x\right )^{3}} - 4 \, \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right ) + 4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) + 75 \, \tan \left (\frac {1}{2} \, x\right ) \] Input:
integrate((1/2-3*cot(x))*(3-2*cot(x))^3,x, algorithm="giac")
Output:
tan(1/2*x)^3 + 14*tan(1/2*x)^2 - 285/2*x - 1/3*(22*tan(1/2*x)^3 + 225*tan( 1/2*x)^2 - 42*tan(1/2*x) + 3)/tan(1/2*x)^3 - 4*log(tan(1/2*x)^2 + 1) + 4*l og(abs(tan(1/2*x))) + 75*tan(1/2*x)
Time = 0.31 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.27 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=x\,\left (-\frac {285}{2}-4{}\mathrm {i}\right )+4\,\ln \left ({\mathrm {e}}^{x\,2{}\mathrm {i}}-1\right )+\frac {64{}\mathrm {i}}{3\,{\mathrm {e}}^{x\,2{}\mathrm {i}}-3\,{\mathrm {e}}^{x\,4{}\mathrm {i}}+{\mathrm {e}}^{x\,6{}\mathrm {i}}-1}+\frac {-224+96{}\mathrm {i}}{1+{\mathrm {e}}^{x\,4{}\mathrm {i}}-2\,{\mathrm {e}}^{x\,2{}\mathrm {i}}}+\frac {-224-264{}\mathrm {i}}{{\mathrm {e}}^{x\,2{}\mathrm {i}}-1} \] Input:
int((2*cot(x) - 3)^3*(3*cot(x) - 1/2),x)
Output:
4*log(exp(x*2i) - 1) - x*(285/2 + 4i) + 64i/(3*exp(x*2i) - 3*exp(x*4i) + e xp(x*6i) - 1) - (224 - 96i)/(exp(x*4i) - 2*exp(x*2i) + 1) - (224 + 264i)/( exp(x*2i) - 1)
Time = 0.15 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.88 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\frac {-296 \cos \left (x \right ) \sin \left (x \right )^{2}-16 \cos \left (x \right )-8 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2}+1\right ) \sin \left (x \right )^{3}+8 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) \sin \left (x \right )^{3}-285 \sin \left (x \right )^{3} x -56 \sin \left (x \right )^{3}+112 \sin \left (x \right )}{2 \sin \left (x \right )^{3}} \] Input:
int((1/2-3*cot(x))*(3-2*cot(x))^3,x)
Output:
( - 296*cos(x)*sin(x)**2 - 16*cos(x) - 8*log(tan(x/2)**2 + 1)*sin(x)**3 + 8*log(tan(x/2))*sin(x)**3 - 285*sin(x)**3*x - 56*sin(x)**3 + 112*sin(x))/( 2*sin(x)**3)