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

Optimal result
Mathematica [A] (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 = 507 \[ \int \frac {(c+d \tan (e+f x))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=-\frac {(i A+B-i C) (c-i d)^{5/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 )}{\sqrt {a-i b} f}+\frac {(i A-B-i C) (c+i d)^{5/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 )}{\sqrt {a+i b} f}-\frac {\left (5 a^3 C d^3-3 a^2 b d^2 (5 c C+2 B d)+a b^2 d \left (15 c^2 C+20 B c d+8 (A-C) d^2\right )-b^3 \left (5 c^3 C+30 B c^2 d+40 c (A-C) d^2-16 B d^3\right )\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{8 b^{7/2} \sqrt {d} f}+\frac {\left (8 b^2 d (B c+(A-C) d)+(b c-a d) (5 b c C+6 b B d-5 a C d)\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{8 b^3 f}+\frac {(5 b c C+6 b B d-5 a C d) \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{12 b^2 f}+\frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{3 b f} \] Output:

-(I*A+B-I*C)*(c-I*d)^(5/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)^(1/2)/f+(I*A-B-I*C)*(c+I*d)^(5 
/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)^(1/2)/f-1/8*(5*a^3*C*d^3-3*a^2*b*d^2*(2*B*d+5*C*c)+a* 
b^2*d*(15*c^2*C+20*B*c*d+8*(A-C)*d^2)-b^3*(5*c^3*C+30*B*c^2*d+40*c*(A-C)*d 
^2-16*B*d^3))*arctanh(d^(1/2)*(a+b*tan(f*x+e))^(1/2)/b^(1/2)/(c+d*tan(f*x+ 
e))^(1/2))/b^(7/2)/d^(1/2)/f+1/8*(8*b^2*d*(B*c+(A-C)*d)+(-a*d+b*c)*(6*B*b* 
d-5*C*a*d+5*C*b*c))*(a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)/b^3/f+1/ 
12*(6*B*b*d-5*C*a*d+5*C*b*c)*(a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(3/2) 
/b^2/f+1/3*C*(a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(5/2)/b/f
 

Mathematica [A] (verified)

Time = 7.81 (sec) , antiderivative size = 780, normalized size of antiderivative = 1.54 \[ \int \frac {(c+d \tan (e+f x))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{3 b f}+\frac {\frac {(5 b c C+6 b B d-5 a C d) \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{4 b f}+\frac {\frac {3 \left (8 b^2 d (B c+(A-C) d)+(b c-a d) (5 b c C+6 b B d-5 a C d)\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 b f}+\frac {\frac {6 b^3 \left (b (A-C) d \left (3 c^2-d^2\right )+b B \left (c^3-3 c d^2\right )+\sqrt {-b^2} \left (A c^3-c^3 C-3 B c^2 d-3 A c d^2+3 c C d^2+B d^3\right )\right ) \text {arctanh}\left (\frac {\sqrt {-c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {-a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a+\sqrt {-b^2}} \sqrt {-c+\frac {\sqrt {-b^2} d}{b}}}-\frac {6 b^3 \left (b (A-C) d \left (3 c^2-d^2\right )+b B \left (c^3-3 c d^2\right )-\sqrt {-b^2} \left (A c^3-c^3 C-3 B c^2 d-3 A c d^2+3 c C d^2+B d^3\right )\right ) \text {arctanh}\left (\frac {\sqrt {c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+\frac {\sqrt {-b^2} d}{b}}}-\frac {3 \sqrt {b} \sqrt {c-\frac {a d}{b}} \left (5 a^3 C d^3-3 a^2 b d^2 (5 c C+2 B d)+a b^2 d \left (15 c^2 C+20 B c d+8 (A-C) d^2\right )-b^3 \left (5 c^3 C+30 B c^2 d+40 c (A-C) d^2-16 B d^3\right )\right ) \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c-\frac {a d}{b}}}\right ) \sqrt {\frac {b c+b d \tan (e+f x)}{b c-a d}}}{4 \sqrt {d} \sqrt {c+d \tan (e+f x)}}}{b^2 f}}{2 b}}{3 b} \] Input:

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

Output:

(C*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(5/2))/(3*b*f) + (((5*b*c 
*C + 6*b*B*d - 5*a*C*d)*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(3/2 
))/(4*b*f) + ((3*(8*b^2*d*(B*c + (A - C)*d) + (b*c - a*d)*(5*b*c*C + 6*b*B 
*d - 5*a*C*d))*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/(4*b*f) 
+ ((6*b^3*(b*(A - C)*d*(3*c^2 - d^2) + b*B*(c^3 - 3*c*d^2) + Sqrt[-b^2]*(A 
*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3))*ArcTanh[(Sqrt[- 
c + (Sqrt[-b^2]*d)/b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + Sqrt[-b^2]]*Sqr 
t[c + d*Tan[e + f*x]])])/(Sqrt[-a + Sqrt[-b^2]]*Sqrt[-c + (Sqrt[-b^2]*d)/b 
]) - (6*b^3*(b*(A - C)*d*(3*c^2 - d^2) + b*B*(c^3 - 3*c*d^2) - Sqrt[-b^2]* 
(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3))*ArcTanh[(Sqrt 
[c + (Sqrt[-b^2]*d)/b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + Sqrt[-b^2]]*Sqr 
t[c + d*Tan[e + f*x]])])/(Sqrt[a + Sqrt[-b^2]]*Sqrt[c + (Sqrt[-b^2]*d)/b]) 
 - (3*Sqrt[b]*Sqrt[c - (a*d)/b]*(5*a^3*C*d^3 - 3*a^2*b*d^2*(5*c*C + 2*B*d) 
 + a*b^2*d*(15*c^2*C + 20*B*c*d + 8*(A - C)*d^2) - b^3*(5*c^3*C + 30*B*c^2 
*d + 40*c*(A - C)*d^2 - 16*B*d^3))*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x 
]])/(Sqrt[b]*Sqrt[c - (a*d)/b])]*Sqrt[(b*c + b*d*Tan[e + f*x])/(b*c - a*d) 
])/(4*Sqrt[d]*Sqrt[c + d*Tan[e + f*x]]))/(b^2*f))/(2*b))/(3*b)
 

Rubi [A] (verified)

Time = 5.87 (sec) , antiderivative size = 524, normalized size of antiderivative = 1.03, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.265, Rules used = {3042, 4130, 27, 3042, 4130, 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))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4130

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4138

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

\(\Big \downarrow \) 2348

\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{3 b f}+\frac {\frac {(-5 a C d+6 b B d+5 b c C) \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 b f}+\frac {3 \left (\frac {\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left ((b c-a d) (-5 a C d+6 b B d+5 b c C)+8 b^2 d (d (A-C)+B c)\right )}{b f}+\frac {\int \left (\frac {-16 B d^3 b^3+40 A c d^2 b^3-40 c C d^2 b^3+5 c^3 C b^3+30 B c^2 d b^3-8 a A d^3 b^2+8 a C d^3 b^2-20 a B c d^2 b^2-15 a c^2 C d b^2+6 a^2 B d^3 b+15 a^2 c C d^2 b-5 a^3 C d^3}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {-16 B c^3 b^3+16 A d^3 b^3-16 C d^3 b^3+48 B c d^2 b^3-48 A c^2 d b^3+48 c^2 C d b^3+i \left (16 A c^3 b^3+16 B d^3 b^3-48 A c d^2 b^3+48 c C d^2 b^3-16 c^3 C b^3-48 B c^2 d b^3\right )}{2 (i-\tan (e+f x)) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {16 B c^3 b^3-16 A d^3 b^3+16 C d^3 b^3-48 B c d^2 b^3+48 A c^2 d b^3-48 c^2 C d b^3+i \left (16 A c^3 b^3+16 B d^3 b^3-48 A c d^2 b^3+48 c C d^2 b^3-16 c^3 C b^3-48 B c^2 d b^3\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}\right )}{4 b}}{6 b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{3 b f}+\frac {\frac {(-5 a C d+6 b B d+5 b c C) \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 b f}+\frac {3 \left (\frac {\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left ((b c-a d) (-5 a C d+6 b B d+5 b c C)+8 b^2 d (d (A-C)+B c)\right )}{b f}+\frac {-\frac {2 \left (5 a^3 C d^3-3 a^2 b d^2 (2 B d+5 c C)+a b^2 d \left (8 d^2 (A-C)+20 B c d+15 c^2 C\right )-\left (b^3 \left (40 c d^2 (A-C)+30 B c^2 d-16 B d^3+5 c^3 C\right )\right )\right ) \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} \sqrt {d}}-\frac {16 b^3 (c-i d)^{5/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}}-\frac {16 b^3 (c+i d)^{5/2} (B-i (A-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}\right )}{4 b}}{6 b}\)

Input:

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

Output:

(C*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(5/2))/(3*b*f) + (((5*b*c 
*C + 6*b*B*d - 5*a*C*d)*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(3/2 
))/(2*b*f) + (3*(((-16*b^3*(I*A + B - I*C)*(c - I*d)^(5/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] - (16*b^3*(B - I*(A - C))*(c + I*d)^(5/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*(5*a^3*C*d^3 - 3*a^2*b*d^2*(5*c*C + 2*B*d) + a*b^2*d 
*(15*c^2*C + 20*B*c*d + 8*(A - C)*d^2) - b^3*(5*c^3*C + 30*B*c^2*d + 40*c* 
(A - C)*d^2 - 16*B*d^3))*ArcTanh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[ 
b]*Sqrt[c + d*Tan[e + f*x]])])/(Sqrt[b]*Sqrt[d]))/(2*b*f) + ((8*b^2*d*(B*c 
 + (A - C)*d) + (b*c - a*d)*(5*b*c*C + 6*b*B*d - 5*a*C*d))*Sqrt[a + b*Tan[ 
e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/(b*f)))/(4*b))/(6*b)
 

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 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 {5}{2}} \left (A +B \tan \left (f x +e \right )+C \tan \left (f x +e \right )^{2}\right )}{\sqrt {a +b \tan \left (f x +e \right )}}d x\]

Input:

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

Output:

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

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F]

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

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

Output:

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

Maxima [F(-1)]

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

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

Output:

Timed out
 

Giac [F]

\[ \int \frac {(c+d \tan (e+f x))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, 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 {5}{2}}}{\sqrt {b \tan \left (f x + e\right ) + a}} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

\text{Hanged}
 

Reduce [F]

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

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

Output:

int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**4)/(t 
an(e + f*x)*b + a),x)*c*d**2 + int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + 
f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)*b + a),x)*b*d**2 + 2*int((sqrt( 
tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x 
)*b + a),x)*c**2*d + int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a 
)*tan(e + f*x)**2)/(tan(e + f*x)*b + a),x)*a*d**2 + 2*int((sqrt(tan(e + f* 
x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)*b + a),x 
)*b*c*d + int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f 
*x)**2)/(tan(e + f*x)*b + a),x)*c**3 + 2*int((sqrt(tan(e + f*x)*d + c)*sqr 
t(tan(e + f*x)*b + a)*tan(e + f*x))/(tan(e + f*x)*b + a),x)*a*c*d + int((s 
qrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x))/(tan(e + f* 
x)*b + a),x)*b*c**2 + int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + 
a))/(tan(e + f*x)*b + a),x)*a*c**2