Integrand size = 21, antiderivative size = 53 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {(a-b) \cot ^2(e+f x)}{2 f}-\frac {a \cot ^4(e+f x)}{4 f}+\frac {(a-b) \log (\sin (e+f x))}{f} \] Output:
1/2*(a-b)*cot(f*x+e)^2/f-1/4*a*cot(f*x+e)^4/f+(a-b)*ln(sin(f*x+e))/f
Time = 0.03 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.34 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {a \csc ^2(e+f x)}{f}-\frac {b \csc ^2(e+f x)}{2 f}-\frac {a \csc ^4(e+f x)}{4 f}+\frac {a \log (\sin (e+f x))}{f}-\frac {b \log (\sin (e+f x))}{f} \] Input:
Integrate[Cot[e + f*x]^5*(a + b*Tan[e + f*x]^2),x]
Output:
(a*Csc[e + f*x]^2)/f - (b*Csc[e + f*x]^2)/(2*f) - (a*Csc[e + f*x]^4)/(4*f) + (a*Log[Sin[e + f*x]])/f - (b*Log[Sin[e + f*x]])/f
Time = 0.56 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 4112, 25, 27, 3042, 25, 3954, 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 \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (e+f x)^2}{\tan (e+f x)^5}dx\) |
\(\Big \downarrow \) 4112 |
\(\displaystyle \int -\left ((a-b) \cot ^3(e+f x)\right )dx-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int (a-b) \cot ^3(e+f x)dx-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -(a-b) \int \cot ^3(e+f x)dx-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -(a-b) \int -\tan \left (e+f x+\frac {\pi }{2}\right )^3dx-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle (a-b) \int \tan \left (\frac {1}{2} (2 e+\pi )+f x\right )^3dx-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (\frac {\cot ^2(e+f x)}{2 f}-\int -\cot (e+f x)dx\right )-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle (a-b) \left (\int \cot (e+f x)dx+\frac {\cot ^2(e+f x)}{2 f}\right )-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \left (\int -\tan \left (e+f x+\frac {\pi }{2}\right )dx+\frac {\cot ^2(e+f x)}{2 f}\right )-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle (a-b) \left (\frac {\cot ^2(e+f x)}{2 f}-\int \tan \left (\frac {1}{2} (2 e+\pi )+f x\right )dx\right )-\frac {a \cot ^4(e+f x)}{4 f}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle (a-b) \left (\frac {\cot ^2(e+f x)}{2 f}+\frac {\log (-\sin (e+f x))}{f}\right )-\frac {a \cot ^4(e+f x)}{4 f}\) |
Input:
Int[Cot[e + f*x]^5*(a + b*Tan[e + f*x]^2),x]
Output:
-1/4*(a*Cot[e + f*x]^4)/f + (a - b)*(Cot[e + f*x]^2/(2*f) + Log[-Sin[e + f *x]]/f)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
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_)])^(m_)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 + a^2*C)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[ e + f*x])^(m + 1)*Simp[a*(A - C) - (A*b - b*C)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] && NeQ[A*b^2 + a^2*C, 0] && LtQ[m, -1] && NeQ[ a^2 + b^2, 0]
Time = 0.90 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )+a \left (-\frac {\cot \left (f x +e \right )^{4}}{4}+\frac {\cot \left (f x +e \right )^{2}}{2}+\ln \left (\sin \left (f x +e \right )\right )\right )}{f}\) | \(58\) |
default | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )+a \left (-\frac {\cot \left (f x +e \right )^{4}}{4}+\frac {\cot \left (f x +e \right )^{2}}{2}+\ln \left (\sin \left (f x +e \right )\right )\right )}{f}\) | \(58\) |
parallelrisch | \(\frac {\left (-2 a +2 b \right ) \ln \left (\sec \left (f x +e \right )^{2}\right )+\left (4 a -4 b \right ) \ln \left (\tan \left (f x +e \right )\right )-\cot \left (f x +e \right )^{2} \left (a \cot \left (f x +e \right )^{2}-2 a +2 b \right )}{4 f}\) | \(66\) |
norman | \(\frac {-\frac {a}{4 f}+\frac {\left (a -b \right ) \tan \left (f x +e \right )^{2}}{2 f}}{\tan \left (f x +e \right )^{4}}+\frac {\left (a -b \right ) \ln \left (\tan \left (f x +e \right )\right )}{f}-\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(73\) |
risch | \(-i x a +i x b -\frac {2 i a e}{f}+\frac {2 i b e}{f}-\frac {2 \left (2 a \,{\mathrm e}^{6 i \left (f x +e \right )}-b \,{\mathrm e}^{6 i \left (f x +e \right )}-2 a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b}{f}\) | \(154\) |
Input:
int(cot(f*x+e)^5*(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)
Output:
1/f*(b*(-1/2*cot(f*x+e)^2-ln(sin(f*x+e)))+a*(-1/4*cot(f*x+e)^4+1/2*cot(f*x +e)^2+ln(sin(f*x+e))))
Time = 0.13 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.60 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a - b\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + {\left (3 \, a - 2 \, b\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} - a}{4 \, f \tan \left (f x + e\right )^{4}} \] Input:
integrate(cot(f*x+e)^5*(a+b*tan(f*x+e)^2),x, algorithm="fricas")
Output:
1/4*(2*(a - b)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1))*tan(f*x + e)^4 + ( 3*a - 2*b)*tan(f*x + e)^4 + 2*(a - b)*tan(f*x + e)^2 - a)/(f*tan(f*x + e)^ 4)
Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (42) = 84\).
Time = 1.23 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.34 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\begin {cases} \tilde {\infty } a x & \text {for}\: e = 0 \wedge f = 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \cot ^{5}{\left (e \right )} & \text {for}\: f = 0 \\\tilde {\infty } a x & \text {for}\: e = - f x \\- \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \log {\left (\tan {\left (e + f x \right )} \right )}}{f} + \frac {a}{2 f \tan ^{2}{\left (e + f x \right )}} - \frac {a}{4 f \tan ^{4}{\left (e + f x \right )}} + \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - \frac {b \log {\left (\tan {\left (e + f x \right )} \right )}}{f} - \frac {b}{2 f \tan ^{2}{\left (e + f x \right )}} & \text {otherwise} \end {cases} \] Input:
integrate(cot(f*x+e)**5*(a+b*tan(f*x+e)**2),x)
Output:
Piecewise((zoo*a*x, Eq(e, 0) & Eq(f, 0)), (x*(a + b*tan(e)**2)*cot(e)**5, Eq(f, 0)), (zoo*a*x, Eq(e, -f*x)), (-a*log(tan(e + f*x)**2 + 1)/(2*f) + a* log(tan(e + f*x))/f + a/(2*f*tan(e + f*x)**2) - a/(4*f*tan(e + f*x)**4) + b*log(tan(e + f*x)**2 + 1)/(2*f) - b*log(tan(e + f*x))/f - b/(2*f*tan(e + f*x)**2), True))
Time = 0.03 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {2 \, {\left (2 \, a - b\right )} \sin \left (f x + e\right )^{2} - a}{\sin \left (f x + e\right )^{4}}}{4 \, f} \] Input:
integrate(cot(f*x+e)^5*(a+b*tan(f*x+e)^2),x, algorithm="maxima")
Output:
1/4*(2*(a - b)*log(sin(f*x + e)^2) + (2*(2*a - b)*sin(f*x + e)^2 - a)/sin( f*x + e)^4)/f
Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (49) = 98\).
Time = 1.21 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.89 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {{\left (a - b\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{2 \, f} + \frac {{\left (a - b\right )} \log \left (\tan \left (f x + e\right )^{2}\right )}{2 \, f} - \frac {3 \, a \tan \left (f x + e\right )^{4} - 3 \, b \tan \left (f x + e\right )^{4} - 2 \, a \tan \left (f x + e\right )^{2} + 2 \, b \tan \left (f x + e\right )^{2} + a}{4 \, f \tan \left (f x + e\right )^{4}} \] Input:
integrate(cot(f*x+e)^5*(a+b*tan(f*x+e)^2),x, algorithm="giac")
Output:
-1/2*(a - b)*log(tan(f*x + e)^2 + 1)/f + 1/2*(a - b)*log(tan(f*x + e)^2)/f - 1/4*(3*a*tan(f*x + e)^4 - 3*b*tan(f*x + e)^4 - 2*a*tan(f*x + e)^2 + 2*b *tan(f*x + e)^2 + a)/(f*tan(f*x + e)^4)
Time = 8.01 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.40 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a-b\right )}{f}-\frac {\frac {a}{4}-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f\,{\mathrm {tan}\left (e+f\,x\right )}^4}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \] Input:
int(cot(e + f*x)^5*(a + b*tan(e + f*x)^2),x)
Output:
(log(tan(e + f*x))*(a - b))/f - (a/4 - tan(e + f*x)^2*(a/2 - b/2))/(f*tan( e + f*x)^4) - (log(tan(e + f*x)^2 + 1)*(a/2 - b/2))/f
Time = 0.15 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.89 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {-32 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{4} a +32 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{4} b +32 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{4} a -32 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{4} b -13 \sin \left (f x +e \right )^{4} a +8 \sin \left (f x +e \right )^{4} b +32 \sin \left (f x +e \right )^{2} a -16 \sin \left (f x +e \right )^{2} b -8 a}{32 \sin \left (f x +e \right )^{4} f} \] Input:
int(cot(f*x+e)^5*(a+b*tan(f*x+e)^2),x)
Output:
( - 32*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**4*a + 32*log(tan((e + f* x)/2)**2 + 1)*sin(e + f*x)**4*b + 32*log(tan((e + f*x)/2))*sin(e + f*x)**4 *a - 32*log(tan((e + f*x)/2))*sin(e + f*x)**4*b - 13*sin(e + f*x)**4*a + 8 *sin(e + f*x)**4*b + 32*sin(e + f*x)**2*a - 16*sin(e + f*x)**2*b - 8*a)/(3 2*sin(e + f*x)**4*f)