\(\int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx\) [718]

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

Optimal result

Integrand size = 41, antiderivative size = 128 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {(A+5 i B) c^3 x}{a^2}+\frac {(i A-5 B) c^3 \log (\cos (e+f x))}{a^2 f}-\frac {2 (i A-B) c^3}{a^2 f (i-\tan (e+f x))^2}+\frac {4 (A+2 i B) c^3}{a^2 f (i-\tan (e+f x))}-\frac {i B c^3 \tan (e+f x)}{a^2 f} \] Output:

(A+5*I*B)*c^3*x/a^2+(I*A-5*B)*c^3*ln(cos(f*x+e))/a^2/f-2*(I*A-B)*c^3/a^2/f 
/(I-tan(f*x+e))^2+4*(A+2*I*B)*c^3/a^2/f/(I-tan(f*x+e))-I*B*c^3*tan(f*x+e)/ 
a^2/f
 

Mathematica [A] (verified)

Time = 5.41 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.72 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {\frac {B (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2}+\frac {(-i A+5 B) c^3 \left (\log (i-\tan (e+f x))+\frac {-2-4 i \tan (e+f x)}{(-i+\tan (e+f x))^2}\right )}{a^2}}{f} \] Input:

Integrate[((A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3)/(a + I*a*Tan[e + 
 f*x])^2,x]
 

Output:

((B*(c - I*c*Tan[e + f*x])^3)/(a + I*a*Tan[e + f*x])^2 + (((-I)*A + 5*B)*c 
^3*(Log[I - Tan[e + f*x]] + (-2 - (4*I)*Tan[e + f*x])/(-I + Tan[e + f*x])^ 
2))/a^2)/f
 

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.73, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3042, 4071, 27, 86, 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 {(c-i c \tan (e+f x))^3 (A+B \tan (e+f x))}{(a+i a \tan (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c-i c \tan (e+f x))^3 (A+B \tan (e+f x))}{(a+i a \tan (e+f x))^2}dx\)

\(\Big \downarrow \) 4071

\(\displaystyle \frac {a c \int \frac {c^2 (1-i \tan (e+f x))^2 (A+B \tan (e+f x))}{a^3 (i \tan (e+f x)+1)^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {c^3 \int \frac {(1-i \tan (e+f x))^2 (A+B \tan (e+f x))}{(i \tan (e+f x)+1)^3}d\tan (e+f x)}{a^2 f}\)

\(\Big \downarrow \) 86

\(\displaystyle \frac {c^3 \int \left (\frac {4 i (A+i B)}{(\tan (e+f x)-i)^3}-i B-\frac {i (A+5 i B)}{\tan (e+f x)-i}+\frac {4 (A+2 i B)}{(\tan (e+f x)-i)^2}\right )d\tan (e+f x)}{a^2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {c^3 \left (-\frac {2 (-B+i A)}{(-\tan (e+f x)+i)^2}+\frac {4 (A+2 i B)}{-\tan (e+f x)+i}-(-5 B+i A) \log (-\tan (e+f x)+i)-i B \tan (e+f x)\right )}{a^2 f}\)

Input:

Int[((A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3)/(a + I*a*Tan[e + f*x]) 
^2,x]
 

Output:

(c^3*(-((I*A - 5*B)*Log[I - Tan[e + f*x]]) - (2*(I*A - B))/(I - Tan[e + f* 
x])^2 + (4*(A + (2*I)*B))/(I - Tan[e + f*x]) - I*B*Tan[e + f*x]))/(a^2*f)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

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 4071
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x 
, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c 
+ a*d, 0] && EqQ[a^2 + b^2, 0]
 
Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.56

method result size
derivativedivides \(-\frac {i B \,c^{3} \tan \left (f x +e \right )}{a^{2} f}-\frac {2 i c^{3} A}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {2 c^{3} B}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i c^{3} A \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \,a^{2}}+\frac {5 c^{3} B \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \,a^{2}}+\frac {c^{3} A \arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2}}+\frac {5 i c^{3} B \arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2}}-\frac {8 i c^{3} B}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}-\frac {4 c^{3} A}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}\) \(200\)
default \(-\frac {i B \,c^{3} \tan \left (f x +e \right )}{a^{2} f}-\frac {2 i c^{3} A}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {2 c^{3} B}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i c^{3} A \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \,a^{2}}+\frac {5 c^{3} B \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \,a^{2}}+\frac {c^{3} A \arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2}}+\frac {5 i c^{3} B \arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2}}-\frac {8 i c^{3} B}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}-\frac {4 c^{3} A}{f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}\) \(200\)
risch \(\frac {3 c^{3} {\mathrm e}^{-2 i \left (f x +e \right )} B}{a^{2} f}-\frac {i c^{3} {\mathrm e}^{-2 i \left (f x +e \right )} A}{a^{2} f}-\frac {c^{3} {\mathrm e}^{-4 i \left (f x +e \right )} B}{2 a^{2} f}+\frac {i c^{3} {\mathrm e}^{-4 i \left (f x +e \right )} A}{2 a^{2} f}+\frac {10 i c^{3} B x}{a^{2}}+\frac {2 c^{3} A x}{a^{2}}+\frac {10 i c^{3} B e}{a^{2} f}+\frac {2 c^{3} A e}{a^{2} f}+\frac {2 c^{3} B}{f \,a^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {5 c^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) B}{a^{2} f}+\frac {i c^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) A}{a^{2} f}\) \(210\)
norman \(\frac {\frac {\left (5 i c^{3} B +A \,c^{3}\right ) x}{a}+\frac {-2 i c^{3} A +6 B \,c^{3}}{a f}+\frac {\left (5 i c^{3} B +A \,c^{3}\right ) x \tan \left (f x +e \right )^{4}}{a}+\frac {2 \left (5 i c^{3} B +A \,c^{3}\right ) x \tan \left (f x +e \right )^{2}}{a}-\frac {2 \left (5 i c^{3} B +2 A \,c^{3}\right ) \tan \left (f x +e \right )^{3}}{a f}+\frac {2 \left (-3 i c^{3} A +5 B \,c^{3}\right ) \tan \left (f x +e \right )^{2}}{a f}-\frac {5 i c^{3} \tan \left (f x +e \right ) B}{f a}-\frac {i c^{3} B \tan \left (f x +e \right )^{5}}{a f}}{a \left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (-i c^{3} A +5 B \,c^{3}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 a^{2} f}\) \(244\)

Input:

int((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x,method=_R 
ETURNVERBOSE)
 

Output:

-I*B*c^3*tan(f*x+e)/a^2/f-2*I/f*c^3/a^2/(-I+tan(f*x+e))^2*A+2/f*c^3/a^2/(- 
I+tan(f*x+e))^2*B-1/2*I/f*c^3/a^2*A*ln(1+tan(f*x+e)^2)+5/2/f*c^3/a^2*B*ln( 
1+tan(f*x+e)^2)+1/f*c^3/a^2*A*arctan(tan(f*x+e))+5*I/f*c^3/a^2*B*arctan(ta 
n(f*x+e))-8*I/f*c^3/a^2/(-I+tan(f*x+e))*B-4/f*c^3/a^2/(-I+tan(f*x+e))*A
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.38 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {4 \, {\left (A + 5 i \, B\right )} c^{3} f x e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, A - B\right )} c^{3} + 2 \, {\left (2 \, {\left (A + 5 i \, B\right )} c^{3} f x - {\left (i \, A - 5 \, B\right )} c^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left ({\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{2 \, {\left (a^{2} f e^{\left (6 i \, f x + 6 i \, e\right )} + a^{2} f e^{\left (4 i \, f x + 4 i \, e\right )}\right )}} \] Input:

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, al 
gorithm="fricas")
 

Output:

1/2*(4*(A + 5*I*B)*c^3*f*x*e^(6*I*f*x + 6*I*e) + (-I*A + 5*B)*c^3*e^(2*I*f 
*x + 2*I*e) + (I*A - B)*c^3 + 2*(2*(A + 5*I*B)*c^3*f*x - (I*A - 5*B)*c^3)* 
e^(4*I*f*x + 4*I*e) - 2*((-I*A + 5*B)*c^3*e^(6*I*f*x + 6*I*e) + (-I*A + 5* 
B)*c^3*e^(4*I*f*x + 4*I*e))*log(e^(2*I*f*x + 2*I*e) + 1))/(a^2*f*e^(6*I*f* 
x + 6*I*e) + a^2*f*e^(4*I*f*x + 4*I*e))
                                                                                    
                                                                                    
 

Sympy [A] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 309, normalized size of antiderivative = 2.41 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {2 B c^{3}}{a^{2} f e^{2 i e} e^{2 i f x} + a^{2} f} + \begin {cases} \frac {\left (\left (i A a^{2} c^{3} f e^{2 i e} - B a^{2} c^{3} f e^{2 i e}\right ) e^{- 4 i f x} + \left (- 2 i A a^{2} c^{3} f e^{4 i e} + 6 B a^{2} c^{3} f e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{2 a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {2 A c^{3} + 10 i B c^{3}}{a^{2}} + \frac {\left (2 A c^{3} e^{4 i e} - 2 A c^{3} e^{2 i e} + 2 A c^{3} + 10 i B c^{3} e^{4 i e} - 6 i B c^{3} e^{2 i e} + 2 i B c^{3}\right ) e^{- 4 i e}}{a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {i c^{3} \left (A + 5 i B\right ) \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{2} f} + \frac {x \left (2 A c^{3} + 10 i B c^{3}\right )}{a^{2}} \] Input:

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**3/(a+I*a*tan(f*x+e))**2,x)
 

Output:

2*B*c**3/(a**2*f*exp(2*I*e)*exp(2*I*f*x) + a**2*f) + Piecewise((((I*A*a**2 
*c**3*f*exp(2*I*e) - B*a**2*c**3*f*exp(2*I*e))*exp(-4*I*f*x) + (-2*I*A*a** 
2*c**3*f*exp(4*I*e) + 6*B*a**2*c**3*f*exp(4*I*e))*exp(-2*I*f*x))*exp(-6*I* 
e)/(2*a**4*f**2), Ne(a**4*f**2*exp(6*I*e), 0)), (x*(-(2*A*c**3 + 10*I*B*c* 
*3)/a**2 + (2*A*c**3*exp(4*I*e) - 2*A*c**3*exp(2*I*e) + 2*A*c**3 + 10*I*B* 
c**3*exp(4*I*e) - 6*I*B*c**3*exp(2*I*e) + 2*I*B*c**3)*exp(-4*I*e)/a**2), T 
rue)) + I*c**3*(A + 5*I*B)*log(exp(2*I*f*x) + exp(-2*I*e))/(a**2*f) + x*(2 
*A*c**3 + 10*I*B*c**3)/a**2
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, al 
gorithm="maxima")
 

Output:

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 

Giac [A] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.77 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=-\frac {i \, B c^{3} \tan \left (f x + e\right )}{a^{2} f} + \frac {{\left (-i \, A c^{3} + 5 \, B c^{3}\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2} f} - \frac {2 \, {\left (-i \, A c^{3} + 3 \, B c^{3} + 2 \, {\left (A c^{3} + 2 i \, B c^{3}\right )} \tan \left (f x + e\right )\right )}}{a^{2} f {\left (\tan \left (f x + e\right ) - i\right )}^{2}} \] Input:

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, al 
gorithm="giac")
 

Output:

-I*B*c^3*tan(f*x + e)/(a^2*f) + (-I*A*c^3 + 5*B*c^3)*log(tan(f*x + e) - I) 
/(a^2*f) - 2*(-I*A*c^3 + 3*B*c^3 + 2*(A*c^3 + 2*I*B*c^3)*tan(f*x + e))/(a^ 
2*f*(tan(f*x + e) - I)^2)
 

Mupad [B] (verification not implemented)

Time = 5.77 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.52 \[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {c^3\,\left (6\,B-A\,2{}\mathrm {i}+4\,A\,\mathrm {tan}\left (e+f\,x\right )+B\,\mathrm {tan}\left (e+f\,x\right )\,7{}\mathrm {i}-A\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}+5\,B\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+2\,B\,{\mathrm {tan}\left (e+f\,x\right )}^2+B\,{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}+A\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}-5\,B\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+2\,A\,\mathrm {tan}\left (e+f\,x\right )\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+B\,\mathrm {tan}\left (e+f\,x\right )\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,10{}\mathrm {i}\right )}{a^2\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2} \] Input:

int(((A + B*tan(e + f*x))*(c - c*tan(e + f*x)*1i)^3)/(a + a*tan(e + f*x)*1 
i)^2,x)
 

Output:

(c^3*(6*B - A*2i + 4*A*tan(e + f*x) + B*tan(e + f*x)*7i - A*log(- tan(e + 
f*x)*1i - 1)*1i + 5*B*log(- tan(e + f*x)*1i - 1) + 2*B*tan(e + f*x)^2 + B* 
tan(e + f*x)^3*1i + A*tan(e + f*x)^2*log(- tan(e + f*x)*1i - 1)*1i - 5*B*t 
an(e + f*x)^2*log(- tan(e + f*x)*1i - 1) + 2*A*tan(e + f*x)*log(- tan(e + 
f*x)*1i - 1) + B*tan(e + f*x)*log(- tan(e + f*x)*1i - 1)*10i))/(a^2*f*(tan 
(e + f*x)*1i + 1)^2)
 

Reduce [F]

\[ \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {c^{3} \left (-\left (\int \frac {\tan \left (f x +e \right )^{4}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) b i -\left (\int \frac {\tan \left (f x +e \right )^{3}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) a i +3 \left (\int \frac {\tan \left (f x +e \right )^{3}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) b +3 \left (\int \frac {\tan \left (f x +e \right )^{2}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) a +3 \left (\int \frac {\tan \left (f x +e \right )^{2}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) b i +3 \left (\int \frac {\tan \left (f x +e \right )}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) a i -\left (\int \frac {\tan \left (f x +e \right )}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) b -\left (\int \frac {1}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) a \right )}{a^{2}} \] Input:

int((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x)
 

Output:

(c**3*( - int(tan(e + f*x)**4/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)* 
b*i - int(tan(e + f*x)**3/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*a*i 
+ 3*int(tan(e + f*x)**3/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*b + 3* 
int(tan(e + f*x)**2/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*a + 3*int( 
tan(e + f*x)**2/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*b*i + 3*int(ta 
n(e + f*x)/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*a*i - int(tan(e + f 
*x)/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*b - int(1/(tan(e + f*x)**2 
 - 2*tan(e + f*x)*i - 1),x)*a))/a**2