Integrand size = 21, antiderivative size = 61 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-((a-b) x)-\frac {(a-b) \cot (e+f x)}{f}+\frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {a \cot ^5(e+f x)}{5 f} \] Output:
-(a-b)*x-(a-b)*cot(f*x+e)/f+1/3*(a-b)*cot(f*x+e)^3/f-1/5*a*cot(f*x+e)^5/f
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.13 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {a \cot ^5(e+f x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(e+f x)\right )}{5 f}-\frac {b \cot ^3(e+f x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(e+f x)\right )}{3 f} \] Input:
Integrate[Cot[e + f*x]^6*(a + b*Tan[e + f*x]^2),x]
Output:
-1/5*(a*Cot[e + f*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[e + f*x]^2])/ f - (b*Cot[e + f*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, -Tan[e + f*x]^2])/( 3*f)
Time = 0.56 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.84, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4112, 25, 27, 3042, 3954, 3042, 3954, 24}
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 ^6(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)^6}dx\) |
\(\Big \downarrow \) 4112 |
\(\displaystyle \int -\left ((a-b) \cot ^4(e+f x)\right )dx-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int (a-b) \cot ^4(e+f x)dx-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -(a-b) \int \cot ^4(e+f x)dx-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -(a-b) \int \tan \left (e+f x+\frac {\pi }{2}\right )^4dx-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle -(a-b) \left (-\int \cot ^2(e+f x)dx-\frac {\cot ^3(e+f x)}{3 f}\right )-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -(a-b) \left (-\int \tan \left (e+f x+\frac {\pi }{2}\right )^2dx-\frac {\cot ^3(e+f x)}{3 f}\right )-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle -(a-b) \left (\int 1dx-\frac {\cot ^3(e+f x)}{3 f}+\frac {\cot (e+f x)}{f}\right )-\frac {a \cot ^5(e+f x)}{5 f}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -(a-b) \left (-\frac {\cot ^3(e+f x)}{3 f}+\frac {\cot (e+f x)}{f}+x\right )-\frac {a \cot ^5(e+f x)}{5 f}\) |
Input:
Int[Cot[e + f*x]^6*(a + b*Tan[e + f*x]^2),x]
Output:
-1/5*(a*Cot[e + f*x]^5)/f - (a - b)*(x + Cot[e + f*x]/f - Cot[e + f*x]^3/( 3*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[((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.84 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.90
method | result | size |
parallelrisch | \(\frac {-3 \cot \left (f x +e \right )^{5} a +5 \cot \left (f x +e \right )^{3} \left (a -b \right )+15 \left (-a +b \right ) \cot \left (f x +e \right )-15 f x \left (a -b \right )}{15 f}\) | \(55\) |
derivativedivides | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{3}}{3}+\cot \left (f x +e \right )+f x +e \right )+a \left (-\frac {\cot \left (f x +e \right )^{5}}{5}+\frac {\cot \left (f x +e \right )^{3}}{3}-\cot \left (f x +e \right )-f x -e \right )}{f}\) | \(67\) |
default | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{3}}{3}+\cot \left (f x +e \right )+f x +e \right )+a \left (-\frac {\cot \left (f x +e \right )^{5}}{5}+\frac {\cot \left (f x +e \right )^{3}}{3}-\cot \left (f x +e \right )-f x -e \right )}{f}\) | \(67\) |
norman | \(\frac {\left (-a +b \right ) x \tan \left (f x +e \right )^{5}-\frac {a}{5 f}+\frac {\left (a -b \right ) \tan \left (f x +e \right )^{2}}{3 f}-\frac {\left (a -b \right ) \tan \left (f x +e \right )^{4}}{f}}{\tan \left (f x +e \right )^{5}}\) | \(68\) |
risch | \(-a x +b x -\frac {2 i \left (45 a \,{\mathrm e}^{8 i \left (f x +e \right )}-30 b \,{\mathrm e}^{8 i \left (f x +e \right )}-90 a \,{\mathrm e}^{6 i \left (f x +e \right )}+90 b \,{\mathrm e}^{6 i \left (f x +e \right )}+140 a \,{\mathrm e}^{4 i \left (f x +e \right )}-110 b \,{\mathrm e}^{4 i \left (f x +e \right )}-70 a \,{\mathrm e}^{2 i \left (f x +e \right )}+70 b \,{\mathrm e}^{2 i \left (f x +e \right )}+23 a -20 b \right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{5}}\) | \(131\) |
Input:
int(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)
Output:
1/15*(-3*cot(f*x+e)^5*a+5*cot(f*x+e)^3*(a-b)+15*(-a+b)*cot(f*x+e)-15*f*x*( a-b))/f
Time = 0.07 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.05 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {15 \, {\left (a - b\right )} f x \tan \left (f x + e\right )^{5} + 15 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{15 \, f \tan \left (f x + e\right )^{5}} \] Input:
integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="fricas")
Output:
-1/15*(15*(a - b)*f*x*tan(f*x + e)^5 + 15*(a - b)*tan(f*x + e)^4 - 5*(a - b)*tan(f*x + e)^2 + 3*a)/(f*tan(f*x + e)^5)
Leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (46) = 92\).
Time = 1.68 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.54 \[ \int \cot ^6(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 ^{6}{\left (e \right )} & \text {for}\: f = 0 \\\tilde {\infty } a x & \text {for}\: e = - f x \\- a x - \frac {a}{f \tan {\left (e + f x \right )}} + \frac {a}{3 f \tan ^{3}{\left (e + f x \right )}} - \frac {a}{5 f \tan ^{5}{\left (e + f x \right )}} + b x + \frac {b}{f \tan {\left (e + f x \right )}} - \frac {b}{3 f \tan ^{3}{\left (e + f x \right )}} & \text {otherwise} \end {cases} \] Input:
integrate(cot(f*x+e)**6*(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)**6, Eq(f, 0)), (zoo*a*x, Eq(e, -f*x)), (-a*x - a/(f*tan(e + f*x)) + a/(3*f*tan (e + f*x)**3) - a/(5*f*tan(e + f*x)**5) + b*x + b/(f*tan(e + f*x)) - b/(3* f*tan(e + f*x)**3), True))
Time = 0.12 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {15 \, {\left (f x + e\right )} {\left (a - b\right )} + \frac {15 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{\tan \left (f x + e\right )^{5}}}{15 \, f} \] Input:
integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="maxima")
Output:
-1/15*(15*(f*x + e)*(a - b) + (15*(a - b)*tan(f*x + e)^4 - 5*(a - b)*tan(f *x + e)^2 + 3*a)/tan(f*x + e)^5)/f
Time = 0.71 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.26 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {{\left (f x + e\right )} {\left (a - b\right )}}{f} - \frac {15 \, a \tan \left (f x + e\right )^{4} - 15 \, b \tan \left (f x + e\right )^{4} - 5 \, a \tan \left (f x + e\right )^{2} + 5 \, b \tan \left (f x + e\right )^{2} + 3 \, a}{15 \, f \tan \left (f x + e\right )^{5}} \] Input:
integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="giac")
Output:
-(f*x + e)*(a - b)/f - 1/15*(15*a*tan(f*x + e)^4 - 15*b*tan(f*x + e)^4 - 5 *a*tan(f*x + e)^2 + 5*b*tan(f*x + e)^2 + 3*a)/(f*tan(f*x + e)^5)
Time = 8.23 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.93 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-x\,\left (a-b\right )-\frac {\left (a-b\right )\,{\mathrm {tan}\left (e+f\,x\right )}^4+\left (\frac {b}{3}-\frac {a}{3}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^2+\frac {a}{5}}{f\,{\mathrm {tan}\left (e+f\,x\right )}^5} \] Input:
int(cot(e + f*x)^6*(a + b*tan(e + f*x)^2),x)
Output:
- x*(a - b) - (a/5 - tan(e + f*x)^2*(a/3 - b/3) + tan(e + f*x)^4*(a - b))/ (f*tan(e + f*x)^5)
Time = 0.15 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.92 \[ \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {-23 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} a +20 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} b +11 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a -5 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b -3 \cos \left (f x +e \right ) a -15 \sin \left (f x +e \right )^{5} a f x +15 \sin \left (f x +e \right )^{5} b f x}{15 \sin \left (f x +e \right )^{5} f} \] Input:
int(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x)
Output:
( - 23*cos(e + f*x)*sin(e + f*x)**4*a + 20*cos(e + f*x)*sin(e + f*x)**4*b + 11*cos(e + f*x)*sin(e + f*x)**2*a - 5*cos(e + f*x)*sin(e + f*x)**2*b - 3 *cos(e + f*x)*a - 15*sin(e + f*x)**5*a*f*x + 15*sin(e + f*x)**5*b*f*x)/(15 *sin(e + f*x)**5*f)