Integrand size = 23, antiderivative size = 89 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\cot ^2(e+f x)}{2 a f}-\frac {\log (\cos (e+f x))}{(a-b) f}-\frac {(a+b) \log (\tan (e+f x))}{a^2 f}-\frac {b^2 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^2 (a-b) f} \] Output:
-1/2*cot(f*x+e)^2/a/f-ln(cos(f*x+e))/(a-b)/f-(a+b)*ln(tan(f*x+e))/a^2/f-1/ 2*b^2*ln(a+b*tan(f*x+e)^2)/a^2/(a-b)/f
Time = 0.17 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.71 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {\cot ^2(e+f x)}{a}+\frac {b^2 \log \left (b+a \cot ^2(e+f x)\right )}{a^2 (a-b)}+\frac {2 \log (\sin (e+f x))}{a-b}}{2 f} \] Input:
Integrate[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]
Output:
-1/2*(Cot[e + f*x]^2/a + (b^2*Log[b + a*Cot[e + f*x]^2])/(a^2*(a - b)) + ( 2*Log[Sin[e + f*x]])/(a - b))/f
Time = 0.51 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 93, 2009}
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 \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x)^3 \left (a+b \tan (e+f x)^2\right )}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {\int \frac {\cot ^3(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\int \frac {\cot ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )}d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {\int \left (-\frac {b^3}{a^2 (a-b) \left (b \tan ^2(e+f x)+a\right )}+\frac {\cot ^2(e+f x)}{a}+\frac {(-a-b) \cot (e+f x)}{a^2}+\frac {1}{(a-b) \left (\tan ^2(e+f x)+1\right )}\right )d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {b^2 \log \left (a+b \tan ^2(e+f x)\right )}{a^2 (a-b)}-\frac {(a+b) \log \left (\tan ^2(e+f x)\right )}{a^2}+\frac {\log \left (\tan ^2(e+f x)+1\right )}{a-b}-\frac {\cot (e+f x)}{a}}{2 f}\) |
Input:
Int[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]
Output:
(-(Cot[e + f*x]/a) - ((a + b)*Log[Tan[e + f*x]^2])/a^2 + Log[1 + Tan[e + f *x]^2]/(a - b) - (b^2*Log[a + b*Tan[e + f*x]^2])/(a^2*(a - b)))/(2*f)
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Time = 0.97 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.91
method | result | size |
parallelrisch | \(\frac {-b^{2} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )+\ln \left (\sec \left (f x +e \right )^{2}\right ) a^{2}-\left (\left (2 a +2 b \right ) \ln \left (\tan \left (f x +e \right )\right )+a \cot \left (f x +e \right )^{2}\right ) \left (a -b \right )}{2 a^{2} f \left (a -b \right )}\) | \(81\) |
derivativedivides | \(\frac {-\frac {b^{2} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{2} \left (a -b \right )}-\frac {1}{2 a \tan \left (f x +e \right )^{2}}+\frac {\left (-b -a \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 a -2 b}}{f}\) | \(85\) |
default | \(\frac {-\frac {b^{2} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{2} \left (a -b \right )}-\frac {1}{2 a \tan \left (f x +e \right )^{2}}+\frac {\left (-b -a \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 a -2 b}}{f}\) | \(85\) |
norman | \(-\frac {1}{2 a f \tan \left (f x +e \right )^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a -b \right )}-\frac {\left (a +b \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{2} f}-\frac {b^{2} \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{2} \left (a -b \right ) f}\) | \(90\) |
risch | \(-\frac {i x}{a -b}+\frac {2 i x}{a}+\frac {2 i e}{a f}+\frac {2 i b x}{a^{2}}+\frac {2 i b e}{a^{2} f}+\frac {2 i b^{2} x}{a^{2} \left (a -b \right )}+\frac {2 i b^{2} e}{a^{2} f \left (a -b \right )}+\frac {2 \,{\mathrm e}^{2 i \left (f x +e \right )}}{f a \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{a f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b}{a^{2} f}-\frac {b^{2} \ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a -b}+1\right )}{2 a^{2} f \left (a -b \right )}\) | \(208\) |
Input:
int(cot(f*x+e)^3/(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)
Output:
1/2*(-b^2*ln(a+b*tan(f*x+e)^2)+ln(sec(f*x+e)^2)*a^2-((2*a+2*b)*ln(tan(f*x+ e))+a*cot(f*x+e)^2)*(a-b))/a^2/f/(a-b)
Time = 0.12 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.44 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {b^{2} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} + {\left (a^{2} - b^{2}\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 )^{2} + {\left (a^{2} - a b\right )} \tan \left (f x + e\right )^{2} + a^{2} - a b}{2 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}} \] Input:
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="fricas")
Output:
-1/2*(b^2*log((b*tan(f*x + e)^2 + a)/(tan(f*x + e)^2 + 1))*tan(f*x + e)^2 + (a^2 - b^2)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1))*tan(f*x + e)^2 + (a ^2 - a*b)*tan(f*x + e)^2 + a^2 - a*b)/((a^3 - a^2*b)*f*tan(f*x + e)^2)
Leaf count of result is larger than twice the leaf count of optimal. 733 vs. \(2 (71) = 142\).
Time = 8.42 (sec) , antiderivative size = 733, normalized size of antiderivative = 8.24 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx =\text {Too large to display} \] Input:
integrate(cot(f*x+e)**3/(a+b*tan(f*x+e)**2),x)
Output:
Piecewise((zoo*x, Eq(a, 0) & Eq(b, 0) & Eq(e, 0) & Eq(f, 0)), ((log(tan(e + f*x)**2 + 1)/(2*f) - log(tan(e + f*x))/f - 1/(2*f*tan(e + f*x)**2))/a, E q(b, 0)), ((-log(tan(e + f*x)**2 + 1)/(2*f) + log(tan(e + f*x))/f + 1/(2*f *tan(e + f*x)**2) - 1/(4*f*tan(e + f*x)**4))/b, Eq(a, 0)), (2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**4/(2*a*f*tan(e + f*x)**4 + 2*a*f*tan(e + f*x)** 2) + 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(2*a*f*tan(e + f*x)**4 + 2 *a*f*tan(e + f*x)**2) - 4*log(tan(e + f*x))*tan(e + f*x)**4/(2*a*f*tan(e + f*x)**4 + 2*a*f*tan(e + f*x)**2) - 4*log(tan(e + f*x))*tan(e + f*x)**2/(2 *a*f*tan(e + f*x)**4 + 2*a*f*tan(e + f*x)**2) - 2*tan(e + f*x)**2/(2*a*f*t an(e + f*x)**4 + 2*a*f*tan(e + f*x)**2) - 1/(2*a*f*tan(e + f*x)**4 + 2*a*f *tan(e + f*x)**2), Eq(a, b)), (zoo*x/a, Eq(e, -f*x)), (x*cot(e)**3/(a + b* tan(e)**2), Eq(f, 0)), (a**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(2*a **3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*x)**2) - 2*a**2*log(tan(e + f *x))*tan(e + f*x)**2/(2*a**3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*x)** 2) - a**2/(2*a**3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*x)**2) + a*b/(2 *a**3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*x)**2) - b**2*log(-sqrt(-a/ b) + tan(e + f*x))*tan(e + f*x)**2/(2*a**3*f*tan(e + f*x)**2 - 2*a**2*b*f* tan(e + f*x)**2) - b**2*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(2* a**3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*x)**2) + 2*b**2*log(tan(e + f*x))*tan(e + f*x)**2/(2*a**3*f*tan(e + f*x)**2 - 2*a**2*b*f*tan(e + f*...
Time = 0.04 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.76 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {b^{2} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{3} - a^{2} b} + \frac {{\left (a + b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{2}} + \frac {1}{a \sin \left (f x + e\right )^{2}}}{2 \, f} \] Input:
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="maxima")
Output:
-1/2*(b^2*log(-(a - b)*sin(f*x + e)^2 + a)/(a^3 - a^2*b) + (a + b)*log(sin (f*x + e)^2)/a^2 + 1/(a*sin(f*x + e)^2))/f
Time = 0.95 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.36 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {b^{3} \log \left ({\left | b \tan \left (f x + e\right )^{2} + a \right |}\right )}{2 \, {\left (a^{3} b f - a^{2} b^{2} f\right )}} + \frac {\log \left (\tan \left (f x + e\right )^{2} + 1\right )}{2 \, {\left (a f - b f\right )}} - \frac {{\left (a + b\right )} \log \left (\tan \left (f x + e\right )^{2}\right )}{2 \, a^{2} f} + \frac {a \tan \left (f x + e\right )^{2} + b \tan \left (f x + e\right )^{2} - a}{2 \, a^{2} f \tan \left (f x + e\right )^{2}} \] Input:
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="giac")
Output:
-1/2*b^3*log(abs(b*tan(f*x + e)^2 + a))/(a^3*b*f - a^2*b^2*f) + 1/2*log(ta n(f*x + e)^2 + 1)/(a*f - b*f) - 1/2*(a + b)*log(tan(f*x + e)^2)/(a^2*f) + 1/2*(a*tan(f*x + e)^2 + b*tan(f*x + e)^2 - a)/(a^2*f*tan(f*x + e)^2)
Time = 7.59 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,\left (a-b\right )}-\frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{2\,a\,f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a+b\right )}{a^2\,f}-\frac {b^2\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}{2\,a^2\,f\,\left (a-b\right )} \] Input:
int(cot(e + f*x)^3/(a + b*tan(e + f*x)^2),x)
Output:
log(tan(e + f*x)^2 + 1)/(2*f*(a - b)) - cot(e + f*x)^2/(2*a*f) - (log(tan( e + f*x))*(a + b))/(a^2*f) - (b^2*log(a + b*tan(e + f*x)^2))/(2*a^2*f*(a - b))
Time = 10.14 (sec) , antiderivative size = 226, normalized size of antiderivative = 2.54 \[ \int \frac {\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \sin \left (f x +e \right )^{2} a^{2}-2 \,\mathrm {log}\left (-2 \sqrt {a -b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\sqrt {a}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\sqrt {a}\right ) \sin \left (f x +e \right )^{2} b^{2}-2 \,\mathrm {log}\left (2 \sqrt {a -b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\sqrt {a}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\sqrt {a}\right ) \sin \left (f x +e \right )^{2} b^{2}-4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{2} a^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{2} b^{2}+\sin \left (f x +e \right )^{2} a^{2}-\sin \left (f x +e \right )^{2} a b -2 a^{2}+2 a b}{4 \sin \left (f x +e \right )^{2} a^{2} f \left (a -b \right )} \] Input:
int(cot(f*x+e)^3/(a+b*tan(f*x+e)^2),x)
Output:
(4*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*a**2 - 2*log( - 2*sqrt(a - b)*tan((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*sin(e + f*x) **2*b**2 - 2*log(2*sqrt(a - b)*tan((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2) **2 + sqrt(a))*sin(e + f*x)**2*b**2 - 4*log(tan((e + f*x)/2))*sin(e + f*x) **2*a**2 + 4*log(tan((e + f*x)/2))*sin(e + f*x)**2*b**2 + sin(e + f*x)**2* a**2 - sin(e + f*x)**2*a*b - 2*a**2 + 2*a*b)/(4*sin(e + f*x)**2*a**2*f*(a - b))