\(\int \frac {\cot (e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\) [227]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 103 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\log (\cos (e+f x))}{(a-b)^2 f}+\frac {\log (\tan (e+f x))}{a^2 f}+\frac {(2 a-b) b \log \left (a+b \tan ^2(e+f x)\right )}{2 a^2 (a-b)^2 f}-\frac {b}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )} \] Output:

ln(cos(f*x+e))/(a-b)^2/f+ln(tan(f*x+e))/a^2/f+1/2*(2*a-b)*b*ln(a+b*tan(f*x 
+e)^2)/a^2/(a-b)^2/f-1/2*b/a/(a-b)/f/(a+b*tan(f*x+e)^2)
 

Mathematica [A] (verified)

Time = 1.26 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.87 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {2 \log (\cos (e+f x))}{(a-b)^2}+\frac {2 \log (\tan (e+f x))+\frac {b \left ((2 a-b) \log \left (a+b \tan ^2(e+f x)\right )+\frac {a (-a+b)}{a+b \tan ^2(e+f x)}\right )}{(a-b)^2}}{a^2}}{2 f} \] Input:

Integrate[Cot[e + f*x]/(a + b*Tan[e + f*x]^2)^2,x]
 

Output:

((2*Log[Cos[e + f*x]])/(a - b)^2 + (2*Log[Tan[e + f*x]] + (b*((2*a - b)*Lo 
g[a + b*Tan[e + f*x]^2] + (a*(-a + b))/(a + b*Tan[e + f*x]^2)))/(a - b)^2) 
/a^2)/(2*f)
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, 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 (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan (e+f x) \left (a+b \tan (e+f x)^2\right )^2}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\cot (e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^2}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\cot (e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^2}d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 93

\(\displaystyle \frac {\int \left (\frac {(2 a-b) b^2}{a^2 (a-b)^2 \left (b \tan ^2(e+f x)+a\right )}+\frac {b^2}{a (a-b) \left (b \tan ^2(e+f x)+a\right )^2}+\frac {\cot (e+f x)}{a^2}-\frac {1}{(a-b)^2 \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 a-b) \log \left (a+b \tan ^2(e+f x)\right )}{a^2 (a-b)^2}+\frac {\log \left (\tan ^2(e+f x)\right )}{a^2}-\frac {b}{a (a-b) \left (a+b \tan ^2(e+f x)\right )}-\frac {\log \left (\tan ^2(e+f x)+1\right )}{(a-b)^2}}{2 f}\)

Input:

Int[Cot[e + f*x]/(a + b*Tan[e + f*x]^2)^2,x]
 

Output:

(Log[Tan[e + f*x]^2]/a^2 - Log[1 + Tan[e + f*x]^2]/(a - b)^2 + ((2*a - b)* 
b*Log[a + b*Tan[e + f*x]^2])/(a^2*(a - b)^2) - b/(a*(a - b)*(a + b*Tan[e + 
 f*x]^2)))/(2*f)
 

Defintions of rubi rules used

rule 93
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]
 

rule 354
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]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
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]))
 
Maple [A] (verified)

Time = 1.17 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.99

method result size
derivativedivides \(\frac {\frac {b^{2} \left (-\frac {a \left (a -b \right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {\left (2 a -b \right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}\right )}{2 a^{2} \left (a -b \right )^{2}}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{2}}+\frac {\ln \left (\tan \left (f x +e \right )\right )}{a^{2}}}{f}\) \(102\)
default \(\frac {\frac {b^{2} \left (-\frac {a \left (a -b \right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {\left (2 a -b \right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}\right )}{2 a^{2} \left (a -b \right )^{2}}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{2}}+\frac {\ln \left (\tan \left (f x +e \right )\right )}{a^{2}}}{f}\) \(102\)
norman \(\frac {b^{2} \tan \left (f x +e \right )^{2}}{2 a^{2} f \left (a -b \right ) \left (a +b \tan \left (f x +e \right )^{2}\right )}+\frac {\ln \left (\tan \left (f x +e \right )\right )}{a^{2} f}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{2}-2 a b +b^{2}\right )}+\frac {b \left (2 a -b \right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{2} f \left (a^{2}-2 a b +b^{2}\right )}\) \(127\)
parallelrisch \(\frac {2 \left (a +b \tan \left (f x +e \right )^{2}\right ) \left (a -\frac {b}{2}\right ) b \ln \left (a +b \tan \left (f x +e \right )^{2}\right )+\left (-\tan \left (f x +e \right )^{2} a^{2} b -a^{3}\right ) \ln \left (\sec \left (f x +e \right )^{2}\right )+2 \left (\left (a -b \right ) \left (a +b \tan \left (f x +e \right )^{2}\right ) \ln \left (\tan \left (f x +e \right )\right )-\frac {a b}{2}\right ) \left (a -b \right )}{2 \left (a -b \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right ) a^{2} f}\) \(131\)
risch \(\frac {i x}{a^{2}-2 a b +b^{2}}-\frac {2 i x}{a^{2}}-\frac {2 i e}{a^{2} f}-\frac {4 i b x}{a \left (a^{2}-2 a b +b^{2}\right )}-\frac {4 i b e}{a f \left (a^{2}-2 a b +b^{2}\right )}+\frac {2 i b^{2} x}{a^{2} \left (a^{2}-2 a b +b^{2}\right )}+\frac {2 i b^{2} e}{a^{2} f \left (a^{2}-2 a b +b^{2}\right )}-\frac {2 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}}{a f \left (-a +b \right )^{2} \left (-a \,{\mathrm e}^{4 i \left (f x +e \right )}+b \,{\mathrm e}^{4 i \left (f x +e \right )}-2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \,{\mathrm e}^{2 i \left (f x +e \right )}-a +b \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{a^{2} f}+\frac {b \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 )}{a f \left (a^{2}-2 a b +b^{2}\right )}-\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^{2}-2 a b +b^{2}\right )}\) \(341\)

Input:

int(cot(f*x+e)/(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
 

Output:

1/f*(1/2*b^2/a^2/(a-b)^2*(-a*(a-b)/b/(a+b*tan(f*x+e)^2)+(2*a-b)/b*ln(a+b*t 
an(f*x+e)^2))-1/2/(a-b)^2*ln(1+tan(f*x+e)^2)+1/a^2*ln(tan(f*x+e)))
 

Fricas [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.91 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {a b^{2} \tan \left (f x + e\right )^{2} + a b^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2} + {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + {\left (2 \, a^{2} b - a b^{2} + {\left (2 \, a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, {\left ({\left (a^{4} b - 2 \, a^{3} b^{2} + a^{2} b^{3}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} f\right )}} \] Input:

integrate(cot(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")
 

Output:

1/2*(a*b^2*tan(f*x + e)^2 + a*b^2 + (a^3 - 2*a^2*b + a*b^2 + (a^2*b - 2*a* 
b^2 + b^3)*tan(f*x + e)^2)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1)) + (2*a 
^2*b - a*b^2 + (2*a*b^2 - b^3)*tan(f*x + e)^2)*log((b*tan(f*x + e)^2 + a)/ 
(tan(f*x + e)^2 + 1)))/((a^4*b - 2*a^3*b^2 + a^2*b^3)*f*tan(f*x + e)^2 + ( 
a^5 - 2*a^4*b + a^3*b^2)*f)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2377 vs. \(2 (80) = 160\).

Time = 69.11 (sec) , antiderivative size = 2377, normalized size of antiderivative = 23.08 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Too large to display} \] Input:

integrate(cot(f*x+e)/(a+b*tan(f*x+e)**2)**2,x)
 

Output:

Piecewise((zoo*x*cot(e)/tan(e)**4, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((-log 
(tan(e + f*x)**2 + 1)/(2*f) + log(tan(e + f*x))/f)/a**2, Eq(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**2, Eq(a, 0)), (-2*log(tan(e + f*x)**2 + 1) 
*tan(e + f*x)**4/(4*a**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4* 
a**2*f) - 4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*a**2*f*tan(e + f*x 
)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f) - 2*log(tan(e + f*x)**2 + 1)/( 
4*a**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f) + 4*log(ta 
n(e + f*x))*tan(e + f*x)**4/(4*a**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f 
*x)**2 + 4*a**2*f) + 8*log(tan(e + f*x))*tan(e + f*x)**2/(4*a**2*f*tan(e + 
 f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f) + 4*log(tan(e + f*x))/(4*a 
**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f) + 2*tan(e + f 
*x)**2/(4*a**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f) + 
3/(4*a**2*f*tan(e + f*x)**4 + 8*a**2*f*tan(e + f*x)**2 + 4*a**2*f), Eq(a, 
b)), (zoo*(-log(tan(e + f*x)**2 + 1)/(2*f) + log(tan(e + f*x))/f), Eq(b, - 
a/tan(e + f*x)**2)), (x*cot(e)/(a + b*tan(e)**2)**2, Eq(f, 0)), (-a**3*log 
(tan(e + f*x)**2 + 1)/(2*a**5*f + 2*a**4*b*f*tan(e + f*x)**2 - 4*a**4*b*f 
- 4*a**3*b**2*f*tan(e + f*x)**2 + 2*a**3*b**2*f + 2*a**2*b**3*f*tan(e + f* 
x)**2) + 2*a**3*log(tan(e + f*x))/(2*a**5*f + 2*a**4*b*f*tan(e + f*x)**2 - 
 4*a**4*b*f - 4*a**3*b**2*f*tan(e + f*x)**2 + 2*a**3*b**2*f + 2*a**2*b*...
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.20 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {b^{2}}{a^{4} - 2 \, a^{3} b + a^{2} b^{2} - {\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} \sin \left (f x + e\right )^{2}} + \frac {{\left (2 \, a b - b^{2}\right )} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{4} - 2 \, a^{3} b + a^{2} b^{2}} + \frac {\log \left (\sin \left (f x + e\right )^{2}\right )}{a^{2}}}{2 \, f} \] Input:

integrate(cot(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")
 

Output:

1/2*(b^2/(a^4 - 2*a^3*b + a^2*b^2 - (a^4 - 3*a^3*b + 3*a^2*b^2 - a*b^3)*si 
n(f*x + e)^2) + (2*a*b - b^2)*log(-(a - b)*sin(f*x + e)^2 + a)/(a^4 - 2*a^ 
3*b + a^2*b^2) + log(sin(f*x + e)^2)/a^2)/f
                                                                                    
                                                                                    
 

Giac [A] (verification not implemented)

Time = 0.62 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.77 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {{\left (2 \, a b^{2} - b^{3}\right )} \log \left ({\left | b \tan \left (f x + e\right )^{2} + a \right |}\right )}{2 \, {\left (a^{4} b f - 2 \, a^{3} b^{2} f + a^{2} b^{3} f\right )}} - \frac {\log \left (\tan \left (f x + e\right )^{2} + 1\right )}{2 \, {\left (a^{2} f - 2 \, a b f + b^{2} f\right )}} - \frac {2 \, a b^{2} \tan \left (f x + e\right )^{2} - b^{3} \tan \left (f x + e\right )^{2} + 3 \, a^{2} b - 2 \, a b^{2}}{2 \, {\left (a^{4} f - 2 \, a^{3} b f + a^{2} b^{2} f\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}} + \frac {\log \left (\tan \left (f x + e\right )^{2}\right )}{2 \, a^{2} f} \] Input:

integrate(cot(f*x+e)/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")
 

Output:

1/2*(2*a*b^2 - b^3)*log(abs(b*tan(f*x + e)^2 + a))/(a^4*b*f - 2*a^3*b^2*f 
+ a^2*b^3*f) - 1/2*log(tan(f*x + e)^2 + 1)/(a^2*f - 2*a*b*f + b^2*f) - 1/2 
*(2*a*b^2*tan(f*x + e)^2 - b^3*tan(f*x + e)^2 + 3*a^2*b - 2*a*b^2)/((a^4*f 
 - 2*a^3*b*f + a^2*b^2*f)*(b*tan(f*x + e)^2 + a)) + 1/2*log(tan(f*x + e)^2 
)/(a^2*f)
 

Mupad [B] (verification not implemented)

Time = 8.19 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.01 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )}{a^2\,f}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,{\left (a-b\right )}^2}-\frac {b}{2\,a\,f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )\,\left (a-b\right )}+\frac {b\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )\,\left (2\,a-b\right )}{2\,a^2\,f\,{\left (a-b\right )}^2} \] Input:

int(cot(e + f*x)/(a + b*tan(e + f*x)^2)^2,x)
 

Output:

log(tan(e + f*x))/(a^2*f) - log(tan(e + f*x)^2 + 1)/(2*f*(a - b)^2) - b/(2 
*a*f*(a + b*tan(e + f*x)^2)*(a - b)) + (b*log(a + b*tan(e + f*x)^2)*(2*a - 
 b))/(2*a^2*f*(a - b)^2)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 775, normalized size of antiderivative = 7.52 \[ \int \frac {\cot (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx =\text {Too large to display} \] Input:

int(cot(f*x+e)/(a+b*tan(f*x+e)^2)^2,x)
 

Output:

( - 2*log(tan((e + f*x)/2)**2 + 1)*sin(e + f*x)**2*a**3 + 2*log(tan((e + f 
*x)/2)**2 + 1)*sin(e + f*x)**2*a**2*b + 2*log(tan((e + f*x)/2)**2 + 1)*a** 
3 + 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*a**2*b - 3*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*a*b**2 + log( - 
 2*sqrt(a - b)*tan((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*s 
in(e + f*x)**2*b**3 - 2*log( - 2*sqrt(a - b)*tan((e + f*x)/2) + sqrt(a)*ta 
n((e + f*x)/2)**2 + sqrt(a))*a**2*b + log( - 2*sqrt(a - b)*tan((e + f*x)/2 
) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*a*b**2 + 2*log(2*sqrt(a - b)*ta 
n((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*sin(e + f*x)**2*a* 
*2*b - 3*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*a*b**2 + log(2*sqrt(a - b)*tan((e + f*x)/2) + s 
qrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*sin(e + f*x)**2*b**3 - 2*log(2*sqrt( 
a - b)*tan((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a))*a**2*b + 
log(2*sqrt(a - b)*tan((e + f*x)/2) + sqrt(a)*tan((e + f*x)/2)**2 + sqrt(a) 
)*a*b**2 + 2*log(tan((e + f*x)/2))*sin(e + f*x)**2*a**3 - 6*log(tan((e + f 
*x)/2))*sin(e + f*x)**2*a**2*b + 6*log(tan((e + f*x)/2))*sin(e + f*x)**2*a 
*b**2 - 2*log(tan((e + f*x)/2))*sin(e + f*x)**2*b**3 - 2*log(tan((e + f*x) 
/2))*a**3 + 4*log(tan((e + f*x)/2))*a**2*b - 2*log(tan((e + f*x)/2))*a*b** 
2 - sin(e + f*x)**2*a*b**2 + sin(e + f*x)**2*b**3)/(2*a**2*f*(sin(e + f...