\(\int \frac {(c+d \tan (e+f x))^{3/2} (A+B \tan (e+f x)+C \tan ^2(e+f x))}{(a+b \tan (e+f x))^{3/2}} \, dx\) [138]

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

Optimal result

Integrand size = 49, antiderivative size = 382 \[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx=-\frac {(i A+B-i C) (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{(a-i b)^{3/2} f}-\frac {(B-i (A-C)) (c+i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{(a+i b)^{3/2} f}+\frac {\sqrt {d} (3 b c C+2 b B d-3 a C d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{b^{5/2} f}+\frac {\left (2 A b^2-2 a b B+3 a^2 C+b^2 C\right ) d \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b^2 \left (a^2+b^2\right ) f}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b \left (a^2+b^2\right ) f \sqrt {a+b \tan (e+f x)}} \] Output:

-(I*A+B-I*C)*(c-I*d)^(3/2)*arctanh((c-I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a 
-I*b)^(1/2)/(c+d*tan(f*x+e))^(1/2))/(a-I*b)^(3/2)/f-(B-I*(A-C))*(c+I*d)^(3 
/2)*arctanh((c+I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a+I*b)^(1/2)/(c+d*tan(f* 
x+e))^(1/2))/(a+I*b)^(3/2)/f+d^(1/2)*(2*B*b*d-3*C*a*d+3*C*b*c)*arctanh(d^( 
1/2)*(a+b*tan(f*x+e))^(1/2)/b^(1/2)/(c+d*tan(f*x+e))^(1/2))/b^(5/2)/f+(2*A 
*b^2-2*B*a*b+3*C*a^2+C*b^2)*d*(a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2 
)/b^2/(a^2+b^2)/f-2*(A*b^2-a*(B*b-C*a))*(c+d*tan(f*x+e))^(3/2)/b/(a^2+b^2) 
/f/(a+b*tan(f*x+e))^(1/2)
 

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1664\) vs. \(2(382)=764\).

Time = 6.80 (sec) , antiderivative size = 1664, normalized size of antiderivative = 4.36 \[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx =\text {Too large to display} \] Input:

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

Output:

(C*(c + d*Tan[e + f*x])^(3/2))/(b*f*Sqrt[a + b*Tan[e + f*x]]) + ((-2*b*(I* 
A + B - I*C)*(-c + I*d)^(3/2)*ArcTanh[(Sqrt[-c + I*d]*Sqrt[a + b*Tan[e + f 
*x]])/(Sqrt[-a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/((-a + I*b)^(3/2)*f) + ( 
2*b*(I*A - B - I*C)*(c + I*d)^(3/2)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[ 
e + f*x]])/(Sqrt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/((a + I*b)^(3/2)*f) 
- (2*b*(A + I*B - C)*(I*c - d)*Sqrt[c + d*Tan[e + f*x]])/((a + I*b)*f*Sqrt 
[a + b*Tan[e + f*x]]) + (2*b*(A - I*B - C)*(I*c + d)*Sqrt[c + d*Tan[e + f* 
x]])/((a - I*b)*f*Sqrt[a + b*Tan[e + f*x]]) + (6*c*C*Sqrt[c + d*Tan[e + f* 
x]]*(1 + (b*d*(a + b*Tan[e + f*x]))/((b*c - a*d)*((b^2*c)/(b*c - a*d) - (a 
*b*d)/(b*c - a*d))))^(3/2)*(1 - (Sqrt[b]*Sqrt[d]*ArcSinh[(Sqrt[b]*Sqrt[d]* 
Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b*c - a*d]*Sqrt[(b^2*c)/(b*c - a*d) - (a*b 
*d)/(b*c - a*d)])]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b*c - a*d]*Sqrt[(b^2*c) 
/(b*c - a*d) - (a*b*d)/(b*c - a*d)]*Sqrt[1 + (b*d*(a + b*Tan[e + f*x]))/(( 
b*c - a*d)*((b^2*c)/(b*c - a*d) - (a*b*d)/(b*c - a*d)))])))/(Sqrt[b/((b^2* 
c)/(b*c - a*d) - (a*b*d)/(b*c - a*d))]*f*Sqrt[a + b*Tan[e + f*x]]*Sqrt[(b* 
(c + d*Tan[e + f*x]))/(b*c - a*d)]*(-1 - (b*d*(a + b*Tan[e + f*x]))/((b*c 
- a*d)*((b^2*c)/(b*c - a*d) - (a*b*d)/(b*c - a*d))))) + (4*B*d*Sqrt[c + d* 
Tan[e + f*x]]*(1 + (b*d*(a + b*Tan[e + f*x]))/((b*c - a*d)*((b^2*c)/(b*c - 
 a*d) - (a*b*d)/(b*c - a*d))))^(3/2)*(1 - (Sqrt[b]*Sqrt[d]*ArcSinh[(Sqrt[b 
]*Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b*c - a*d]*Sqrt[(b^2*c)/(b*c ...
 

Rubi [A] (verified)

Time = 4.25 (sec) , antiderivative size = 420, normalized size of antiderivative = 1.10, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.204, Rules used = {3042, 4128, 27, 3042, 4130, 27, 3042, 4138, 2348, 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+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan (e+f x)^2\right )}{(a+b \tan (e+f x))^{3/2}}dx\)

\(\Big \downarrow \) 4128

\(\displaystyle \frac {2 \int \frac {\sqrt {c+d \tan (e+f x)} \left (\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d \tan ^2(e+f x)-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-3 a d)+A b (a c+3 b d)\right )}{2 \sqrt {a+b \tan (e+f x)}}dx}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\sqrt {c+d \tan (e+f x)} \left (\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d \tan ^2(e+f x)-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-3 a d)+A b (a c+3 b d)\right )}{\sqrt {a+b \tan (e+f x)}}dx}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\sqrt {c+d \tan (e+f x)} \left (\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d \tan (e+f x)^2-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-3 a d)+A b (a c+3 b d)\right )}{\sqrt {a+b \tan (e+f x)}}dx}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 4130

\(\displaystyle \frac {\frac {\int -\frac {-2 \left (2 a A c d-2 a c C d-A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )+b \left (C c^2+2 B d c-C d^2\right )\right ) \tan (e+f x) b^2-2 c ((b B-a C) (b c-3 a d)+A b (a c+3 b d)) b-\left (a^2+b^2\right ) d (3 b c C-3 a d C+2 b B d) \tan ^2(e+f x)+\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d (b c+a d)}{2 \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{b}+\frac {d \left (3 a^2 C-2 a b B+2 A b^2+b^2 C\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {d \left (3 a^2 C-2 a b B+2 A b^2+b^2 C\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}-\frac {\int \frac {-2 \left (2 a A c d-2 a c C d-A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )+b \left (C c^2+2 B d c-C d^2\right )\right ) \tan (e+f x) b^2-2 c ((b B-a C) (b c-3 a d)+A b (a c+3 b d)) b-\left (a^2+b^2\right ) d (3 b c C-3 a d C+2 b B d) \tan ^2(e+f x)+\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {d \left (3 a^2 C-2 a b B+2 A b^2+b^2 C\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}-\frac {\int \frac {-2 \left (2 a A c d-2 a c C d-A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )+b \left (C c^2+2 B d c-C d^2\right )\right ) \tan (e+f x) b^2-2 c ((b B-a C) (b c-3 a d)+A b (a c+3 b d)) b-\left (a^2+b^2\right ) d (3 b c C-3 a d C+2 b B d) \tan (e+f x)^2+\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 4138

\(\displaystyle \frac {\frac {d \left (3 a^2 C-2 a b B+2 A b^2+b^2 C\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}-\frac {\int \frac {-2 \left (2 a A c d-2 a c C d-A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )+b \left (C c^2+2 B d c-C d^2\right )\right ) \tan (e+f x) b^2-2 c ((b B-a C) (b c-3 a d)+A b (a c+3 b d)) b-\left (a^2+b^2\right ) d (3 b c C-3 a d C+2 b B d) \tan ^2(e+f x)+\left (3 C a^2-2 b B a+2 A b^2+b^2 C\right ) d (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (\tan ^2(e+f x)+1\right )}d\tan (e+f x)}{2 b f}}{b \left (a^2+b^2\right )}-\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}\)

\(\Big \downarrow \) 2348

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{3/2}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}+\frac {\frac {d \left (3 a^2 C-2 a b B+2 A b^2+b^2 C\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}-\frac {-\frac {2 \sqrt {d} \left (a^2+b^2\right ) (-3 a C d+2 b B d+3 b c C) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {b}}+\frac {2 b^2 (-b+i a) (c-i d)^{3/2} (A-i B-C) \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a-i b}}-\frac {2 b^2 (a-i b) (c+i d)^{3/2} (i A-B-i C) \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+i b}}}{2 b f}}{b \left (a^2+b^2\right )}\)

Input:

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

Output:

(-2*(A*b^2 - a*(b*B - a*C))*(c + d*Tan[e + f*x])^(3/2))/(b*(a^2 + b^2)*f*S 
qrt[a + b*Tan[e + f*x]]) + (-1/2*((2*(I*a - b)*b^2*(A - I*B - C)*(c - I*d) 
^(3/2)*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a - I*b]*Sqr 
t[c + d*Tan[e + f*x]])])/Sqrt[a - I*b] - (2*(a - I*b)*b^2*(I*A - B - I*C)* 
(c + I*d)^(3/2)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + 
 I*b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[a + I*b] - (2*(a^2 + b^2)*Sqrt[d]*( 
3*b*c*C + 2*b*B*d - 3*a*C*d)*ArcTanh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(S 
qrt[b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[b])/(b*f) + ((2*A*b^2 - 2*a*b*B + 
3*a^2*C + b^2*C)*d*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/(b*f 
))/(b*(a^2 + b^2))
 

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 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2348
Int[(Px_)*((c_) + (d_.)*(x_))^(m_.)*((e_) + (f_.)*(x_))^(n_.)*((a_.) + (b_. 
)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Px*(c + d*x)^m*(e + f*x)^ 
n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[P 
x, x] && (IntegerQ[p] || (IntegerQ[2*p] && IntegerQ[m] && ILtQ[n, 0])) && 
!(IGtQ[m, 0] && IGtQ[n, 0])
 

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

rule 4128
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) 
 + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*d^2 + c*(c*C - B*d))*(a + b*Tan[e + 
 f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Sim 
p[1/(d*(n + 1)*(c^2 + d^2))   Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e 
 + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c*m + a*d* 
(n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b 
*(d*(B*c - A*d)*(m + n + 1) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], 
x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ 
[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
 

rule 4130
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) 
+ (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. 
) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ 
e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1))   Int[(a 
+ b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C 
*(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* 
m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, 
b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && 
 NeQ[c^2 + d^2, 0] && GtQ[m, 0] &&  !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ 
c, 0] && NeQ[a, 0])))
 

rule 4138
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) 
 + (f_.)*(x_)]^2), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S 
imp[ff/f   Subst[Int[(a + b*ff*x)^m*(c + d*ff*x)^n*((A + B*ff*x + C*ff^2*x^ 
2)/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f 
, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + 
 d^2, 0]
 
Maple [F(-1)]

Timed out.

\[\int \frac {\left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}} \left (A +B \tan \left (f x +e \right )+C \tan \left (f x +e \right )^{2}\right )}{\left (a +b \tan \left (f x +e \right )\right )^{\frac {3}{2}}}d x\]

Input:

int((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e) 
)^(3/2),x)
 

Output:

int((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e) 
)^(3/2),x)
 

Fricas [F(-1)]

Timed out. \[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx=\text {Timed out} \] Input:

integrate((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( 
f*x+e))^(3/2),x, algorithm="fricas")
 

Output:

Timed out
 

Sympy [F]

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

integrate((c+d*tan(f*x+e))**(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*ta 
n(f*x+e))**(3/2),x)
 

Output:

Integral((c + d*tan(e + f*x))**(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)* 
*2)/(a + b*tan(e + f*x))**(3/2), x)
 

Maxima [F(-1)]

Timed out. \[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx=\text {Timed out} \] Input:

integrate((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( 
f*x+e))^(3/2),x, algorithm="maxima")
 

Output:

Timed out
 

Giac [F]

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

integrate((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( 
f*x+e))^(3/2),x, algorithm="giac")
 

Output:

integrate((C*tan(f*x + e)^2 + B*tan(f*x + e) + A)*(d*tan(f*x + e) + c)^(3/ 
2)/(b*tan(f*x + e) + a)^(3/2), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx=\text {Hanged} \] Input:

int(((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/( 
a + b*tan(e + f*x))^(3/2),x)
 

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \frac {(c+d \tan (e+f x))^{3/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{3/2}} \, dx=\text {too large to display} \] Input:

int((c+d*tan(f*x+e))^(3/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e) 
)^(3/2),x)
 

Output:

(2*sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*a*d**2 + 2*sqrt(tan(e 
 + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*b*c*d + int((sqrt(tan(e + f*x)*d + 
 c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)**2*b**2 + 2*ta 
n(e + f*x)*a*b + a**2),x)*tan(e + f*x)*a*b*c*d**2*f - int((sqrt(tan(e + f* 
x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)**2*b**2 
+ 2*tan(e + f*x)*a*b + a**2),x)*tan(e + f*x)*b**2*c**2*d*f + int((sqrt(tan 
(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)** 
2*b**2 + 2*tan(e + f*x)*a*b + a**2),x)*a**2*c*d**2*f - int((sqrt(tan(e + f 
*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)**2*b**2 
 + 2*tan(e + f*x)*a*b + a**2),x)*a*b*c**2*d*f + int((sqrt(tan(e + f*x)*d + 
 c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)**2*b**2 + 2*ta 
n(e + f*x)*a*b + a**2),x)*tan(e + f*x)*a*b**2*d**2*f + int((sqrt(tan(e + f 
*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)**2*b**2 
 + 2*tan(e + f*x)*a*b + a**2),x)*tan(e + f*x)*a*b*c**2*d*f - int((sqrt(tan 
(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)** 
2*b**2 + 2*tan(e + f*x)*a*b + a**2),x)*tan(e + f*x)*b**3*c*d*f - int((sqrt 
(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f* 
x)**2*b**2 + 2*tan(e + f*x)*a*b + a**2),x)*tan(e + f*x)*b**2*c**3*f + int( 
(sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e 
 + f*x)**2*b**2 + 2*tan(e + f*x)*a*b + a**2),x)*a**2*b*d**2*f + int((sq...