\(\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)} \, dx\) [101]

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

Optimal result

Integrand size = 47, antiderivative size = 271 \[ \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)} \, dx=-\frac {(i A+B-i C) (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(a-i b) f}-\frac {(A+i B-C) (c+i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) f}-\frac {2 \left (A b^2-a (b B-a C)\right ) (b c-a d)^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{b^{5/2} \left (a^2+b^2\right ) f}+\frac {2 (b c C+b B d-a C d) \sqrt {c+d \tan (e+f x)}}{b^2 f}+\frac {2 C (c+d \tan (e+f x))^{3/2}}{3 b f} \] Output:

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

Mathematica [A] (verified)

Time = 1.69 (sec) , antiderivative size = 266, normalized size of antiderivative = 0.98 \[ \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)} \, dx=\frac {\frac {3 i b \left (-\left ((a+i b) (A-i B-C) (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )\right )+(a-i b) (A+i B-C) (c+i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )\right )}{a^2+b^2}-\frac {6 \left (A b^2+a (-b B+a C)\right ) (b c-a d)^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{b^{3/2} \left (a^2+b^2\right )}+\frac {6 (b c C+b B d-a C d) \sqrt {c+d \tan (e+f x)}}{b}+2 C (c+d \tan (e+f x))^{3/2}}{3 b f} \] 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]),x]
 

Output:

(((3*I)*b*(-((a + I*b)*(A - I*B - C)*(c - I*d)^(3/2)*ArcTanh[Sqrt[c + d*Ta 
n[e + f*x]]/Sqrt[c - I*d]]) + (a - I*b)*(A + I*B - C)*(c + I*d)^(3/2)*ArcT 
anh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]]))/(a^2 + b^2) - (6*(A*b^2 + a* 
(-(b*B) + a*C))*(b*c - a*d)^(3/2)*ArcTanh[(Sqrt[b]*Sqrt[c + d*Tan[e + f*x] 
])/Sqrt[b*c - a*d]])/(b^(3/2)*(a^2 + b^2)) + (6*(b*c*C + b*B*d - a*C*d)*Sq 
rt[c + d*Tan[e + f*x]])/b + 2*C*(c + d*Tan[e + f*x])^(3/2))/(3*b*f)
 

Rubi [A] (warning: unable to verify)

Time = 4.42 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.01, number of steps used = 20, number of rules used = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.404, Rules used = {3042, 4130, 27, 3042, 4130, 27, 3042, 4136, 25, 3042, 4022, 3042, 4020, 25, 73, 221, 4117, 73, 221}

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)} \, 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)}dx\)

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4136

\(\displaystyle \frac {\frac {\frac {\int -\frac {b^2 \left (a \left (C c^2+2 B d c-C d^2-A \left (c^2-d^2\right )\right )-b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right )-b^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)}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}+\frac {(b c-a d)^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\tan ^2(e+f x)+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{b}+\frac {2 (-a C d+b B d+b c C) \sqrt {c+d \tan (e+f x)}}{b f}}{b}+\frac {2 C (c+d \tan (e+f x))^{3/2}}{3 b f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {(b c-a d)^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\tan ^2(e+f x)+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {\int \frac {b^2 \left (a \left (C c^2+2 B d c-C d^2-A \left (c^2-d^2\right )\right )-b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right )-b^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)}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{b}+\frac {2 (-a C d+b B d+b c C) \sqrt {c+d \tan (e+f x)}}{b f}}{b}+\frac {2 C (c+d \tan (e+f x))^{3/2}}{3 b f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {(b c-a d)^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {\int \frac {b^2 \left (a \left (C c^2+2 B d c-C d^2-A \left (c^2-d^2\right )\right )-b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right )-b^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)}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{b}+\frac {2 (-a C d+b B d+b c C) \sqrt {c+d \tan (e+f x)}}{b f}}{b}+\frac {2 C (c+d \tan (e+f x))^{3/2}}{3 b f}\)

\(\Big \downarrow \) 4022

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4020

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

\(\Big \downarrow \) 4117

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

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]),x]
 

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

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

rule 4020
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f)   Subst[Int[(a + (b/d)*x)^m/(d^2 + 
c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ 
b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
 

rule 4022
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2   Int[(a + b*Tan[e + f*x])^m*( 
1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2   Int[(a + b*Tan[e + f*x])^m 
*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c 
 - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]
 

rule 4117
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) 
+ (f_.)*(x_)])^(n_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> 
 Simp[A/f   Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; 
FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]
 

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 4136
Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) 
+ (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) 
+ (f_.)*(x_)]), x_Symbol] :> Simp[1/(a^2 + b^2)   Int[(c + d*Tan[e + f*x])^ 
n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Simp[ 
(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2)   Int[(c + d*Tan[e + f*x])^n*((1 + Tan[ 
e + f*x]^2)/(a + b*Tan[e + f*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[n, 0] &&  !LeQ[n, -1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(6054\) vs. \(2(234)=468\).

Time = 0.21 (sec) , antiderivative size = 6055, normalized size of antiderivative = 22.34

method result size
derivativedivides \(\text {Expression too large to display}\) \(6055\)
default \(\text {Expression too large to display}\) \(6055\)

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) 
),x,method=_RETURNVERBOSE)
 

Output:

result too large to display
 

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)} \, 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)),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)} \, 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 )}{a + b \tan {\left (e + f x \right )}}\, 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)),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)), x)
 

Maxima [F(-2)]

Exception generated. \[ \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)} \, dx=\text {Exception raised: ValueError} \] 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)),x, algorithm="maxima")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(a*d-b*c>0)', see `assume?` for m 
ore detail
 

Giac [F(-2)]

Exception generated. \[ \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)} \, dx=\text {Exception raised: TypeError} \] 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)),x, algorithm="giac")
 

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const 
index_m & i,const vecteur & l) Error: Bad Argument Value
 

Mupad [B] (verification not implemented)

Time = 52.30 (sec) , antiderivative size = 106783, normalized size of antiderivative = 394.03 \[ \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)} \, dx=\text {Too large to display} \] 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)),x)
 

Output:

atan(((((((32*(4*B*a*b^8*d^12*f^4 - 4*B*b^9*c*d^11*f^4 + 8*B*a^3*b^6*d^12* 
f^4 + 4*B*a^5*b^4*d^12*f^4 - 4*B*b^9*c^3*d^9*f^4 + 8*B*a*b^8*c^2*d^10*f^4 
+ 4*B*a*b^8*c^4*d^8*f^4 - 12*B*a^2*b^7*c*d^11*f^4 - 12*B*a^4*b^5*c*d^11*f^ 
4 - 4*B*a^6*b^3*c*d^11*f^4 - 12*B*a^2*b^7*c^3*d^9*f^4 + 16*B*a^3*b^6*c^2*d 
^10*f^4 + 8*B*a^3*b^6*c^4*d^8*f^4 - 12*B*a^4*b^5*c^3*d^9*f^4 + 8*B*a^5*b^4 
*c^2*d^10*f^4 + 4*B*a^5*b^4*c^4*d^8*f^4 - 4*B*a^6*b^3*c^3*d^9*f^4))/(b*f^5 
) - (32*(c + d*tan(e + f*x))^(1/2)*(-(((8*B^2*a^2*c^3*f^2 - 8*B^2*b^2*c^3* 
f^2 - 16*B^2*a*b*d^3*f^2 - 24*B^2*a^2*c*d^2*f^2 + 24*B^2*b^2*c*d^2*f^2 + 4 
8*B^2*a*b*c^2*d*f^2)^2/4 - (16*a^4*f^4 + 16*b^4*f^4 + 32*a^2*b^2*f^4)*(B^4 
*c^6 + B^4*d^6 + 3*B^4*c^2*d^4 + 3*B^4*c^4*d^2))^(1/2) - 4*B^2*a^2*c^3*f^2 
 + 4*B^2*b^2*c^3*f^2 + 8*B^2*a*b*d^3*f^2 + 12*B^2*a^2*c*d^2*f^2 - 12*B^2*b 
^2*c*d^2*f^2 - 24*B^2*a*b*c^2*d*f^2)/(16*(a^4*f^4 + b^4*f^4 + 2*a^2*b^2*f^ 
4)))^(1/2)*(16*b^10*d^10*f^4 + 16*a^2*b^8*d^10*f^4 - 16*a^4*b^6*d^10*f^4 - 
 16*a^6*b^4*d^10*f^4 + 24*b^10*c^2*d^8*f^4 + 40*a^2*b^8*c^2*d^8*f^4 + 8*a^ 
4*b^6*c^2*d^8*f^4 - 8*a^6*b^4*c^2*d^8*f^4 + 8*a*b^9*c*d^9*f^4 + 24*a^3*b^7 
*c*d^9*f^4 + 24*a^5*b^5*c*d^9*f^4 + 8*a^7*b^3*c*d^9*f^4))/(b*f^4))*(-(((8* 
B^2*a^2*c^3*f^2 - 8*B^2*b^2*c^3*f^2 - 16*B^2*a*b*d^3*f^2 - 24*B^2*a^2*c*d^ 
2*f^2 + 24*B^2*b^2*c*d^2*f^2 + 48*B^2*a*b*c^2*d*f^2)^2/4 - (16*a^4*f^4 + 1 
6*b^4*f^4 + 32*a^2*b^2*f^4)*(B^4*c^6 + B^4*d^6 + 3*B^4*c^2*d^4 + 3*B^4*c^4 
*d^2))^(1/2) - 4*B^2*a^2*c^3*f^2 + 4*B^2*b^2*c^3*f^2 + 8*B^2*a*b*d^3*f^...
 

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)} \, dx=\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}}{\tan \left (f x +e \right ) b +a}d x \right ) a c +\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}\, \tan \left (f x +e \right )^{3}}{\tan \left (f x +e \right ) b +a}d x \right ) c d +\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}\, \tan \left (f x +e \right )^{2}}{\tan \left (f x +e \right ) b +a}d x \right ) b d +\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}\, \tan \left (f x +e \right )^{2}}{\tan \left (f x +e \right ) b +a}d x \right ) c^{2}+\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}\, \tan \left (f x +e \right )}{\tan \left (f x +e \right ) b +a}d x \right ) a d +\left (\int \frac {\sqrt {d \tan \left (f x +e \right )+c}\, \tan \left (f x +e \right )}{\tan \left (f x +e \right ) b +a}d x \right ) b c \] 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) 
),x)
 

Output:

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