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

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

Optimal result

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

-I*(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)^(3/2)/f+I*(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) 
^(3/2)/f+2*d^(5/2)*arctanh(d^(1/2)*(a+b*tan(f*x+e))^(1/2)/b^(1/2)/(c+d*tan 
(f*x+e))^(1/2))/b^(3/2)/f-2*(-a*d+b*c)^2*(c+d*tan(f*x+e))^(1/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. \(580\) vs. \(2(273)=546\).

Time = 6.13 (sec) , antiderivative size = 580, normalized size of antiderivative = 2.12 \[ \int \frac {(c+d \tan (e+f x))^{5/2}}{(a+b \tan (e+f x))^{3/2}} \, dx=-\frac {i \left (\frac {(c+i d) \left ((a+i b)^{3/2} d^{3/2} \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d}}\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}+\sqrt {b c-a d} \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}} \left (-b (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 ) \sqrt {a+b \tan (e+f x)}+\sqrt {a+i b} (b c-a d) \sqrt {c+d \tan (e+f x)}\right )\right )}{(a+i b)^{3/2}}-\frac {(c-i d) \left ((-a+i b)^{3/2} d^{3/2} \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b c-a d}}\right ) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}+\sqrt {b c-a d} \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}} \left (-b (-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 ) \sqrt {a+b \tan (e+f x)}+\sqrt {-a+i b} (-b c+a d) \sqrt {c+d \tan (e+f x)}\right )\right )}{(-a+i b)^{3/2}}\right )}{b \sqrt {b c-a d} f \sqrt {a+b \tan (e+f x)} \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}} \] Input:

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

Output:

((-I)*(((c + I*d)*((a + I*b)^(3/2)*d^(3/2)*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan 
[e + f*x]])/Sqrt[b*c - a*d]]*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f 
*x]] + Sqrt[b*c - a*d]*Sqrt[(b*(c + d*Tan[e + f*x]))/(b*c - a*d)]*(-(b*(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 + b*Tan[e + f*x]]) + Sqrt[a + I*b]*(b 
*c - a*d)*Sqrt[c + d*Tan[e + f*x]])))/(a + I*b)^(3/2) - ((c - I*d)*((-a + 
I*b)^(3/2)*d^(3/2)*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/Sqrt[b*c - a 
*d]]*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]] + Sqrt[b*c - a*d]*S 
qrt[(b*(c + d*Tan[e + f*x]))/(b*c - a*d)]*(-(b*(-c + I*d)^(3/2)*ArcTanh[(S 
qrt[-c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + I*b]*Sqrt[c + d*Tan[e + 
 f*x]])]*Sqrt[a + b*Tan[e + f*x]]) + Sqrt[-a + I*b]*(-(b*c) + a*d)*Sqrt[c 
+ d*Tan[e + f*x]])))/(-a + I*b)^(3/2)))/(b*Sqrt[b*c - a*d]*f*Sqrt[a + b*Ta 
n[e + f*x]]*Sqrt[(b*(c + d*Tan[e + f*x]))/(b*c - a*d)])
 

Rubi [A] (verified)

Time = 1.36 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.10, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {3042, 4048, 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}}{(a+b \tan (e+f x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d \tan (e+f x))^{5/2}}{(a+b \tan (e+f x))^{3/2}}dx\)

\(\Big \downarrow \) 4048

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4138

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

\(\Big \downarrow \) 2348

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 (b c-a d)^2 \sqrt {c+d \tan (e+f x)}}{b f \left (a^2+b^2\right ) \sqrt {a+b \tan (e+f x)}}+\frac {\frac {2 d^{5/2} \left (a^2+b^2\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}}-\frac {b (-b+i a) (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}}+\frac {b (b+i a) (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}}}{b f \left (a^2+b^2\right )}\)

Input:

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

Output:

(-(((I*a - b)*b*(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]) + (b*(I*a 
 + b)*(c + I*d)^(5/2)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sq 
rt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[a + I*b] + (2*(a^2 + b^2)*d^( 
5/2)*ArcTanh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b]*Sqrt[c + d*Tan[e 
+ f*x]])])/Sqrt[b])/(b*(a^2 + b^2)*f) - (2*(b*c - a*d)^2*Sqrt[c + d*Tan[e 
+ f*x]])/(b*(a^2 + b^2)*f*Sqrt[a + b*Tan[e + f*x]])
 

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 4048
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*c - a*d)^2*(a + b*Tan[e + f*x])^(m 
 - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Simp[1 
/(d*(n + 1)*(c^2 + d^2))   Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + 
f*x])^(n + 1)*Simp[a^2*d*(b*d*(m - 2) - a*c*(n + 1)) + b*(b*c - 2*a*d)*(b*c 
*(m - 2) + a*d*(n + 1)) - d*(n + 1)*(3*a^2*b*c - b^3*c - a^3*d + 3*a*b^2*d) 
*Tan[e + f*x] - b*(a*d*(2*b*c - a*d)*(m + n - 1) - b^2*(c^2*(m - 2) - d^2*( 
n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[ 
b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 2] && LtQ 
[n, -1] && IntegerQ[2*m]
 

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 )\right )^{\frac {3}{2}}}d x\]

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 21367 vs. \(2 (213) = 426\).

Time = 23.37 (sec) , antiderivative size = 42795, normalized size of antiderivative = 156.76 \[ \int \frac {(c+d \tan (e+f x))^{5/2}}{(a+b \tan (e+f x))^{3/2}} \, dx=\text {Too large to display} \] Input:

integrate((c+d*tan(f*x+e))^(5/2)/(a+b*tan(f*x+e))^(3/2),x, algorithm="fric 
as")
 

Output:

Too large to include
 

Sympy [F]

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

integrate((c+d*tan(f*x+e))**(5/2)/(a+b*tan(f*x+e))**(3/2),x)
 

Output:

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

Maxima [F]

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

integrate((c+d*tan(f*x+e))^(5/2)/(a+b*tan(f*x+e))^(3/2),x, algorithm="maxi 
ma")
 

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(4*sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*c*d**2 + int((sqrt(ta 
n(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*d**3*f - int((sqr 
t(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*d**2*f + i 
nt((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(ta 
n(e + f*x)**2*b**2 + 2*tan(e + f*x)*a*b + a**2),x)*a**2*d**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*b*c*d**2*f + 2*int((sqrt(tan( 
e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x))/(tan(e + f*x)**3*b* 
*2*d + 2*tan(e + f*x)**2*a*b*d + tan(e + f*x)**2*b**2*c + tan(e + f*x)*a** 
2*d + 2*tan(e + f*x)*a*b*c + a**2*c),x)*tan(e + f*x)*a*b*c**2*d**2*f - 2*i 
nt((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x))/(tan(e 
 + f*x)**3*b**2*d + 2*tan(e + f*x)**2*a*b*d + tan(e + f*x)**2*b**2*c + tan 
(e + f*x)*a**2*d + 2*tan(e + f*x)*a*b*c + a**2*c),x)*tan(e + f*x)*b**2*c** 
3*d*f + 2*int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f 
*x))/(tan(e + f*x)**3*b**2*d + 2*tan(e + f*x)**2*a*b*d + tan(e + f*x)**2*b 
**2*c + tan(e + f*x)*a**2*d + 2*tan(e + f*x)*a*b*c + a**2*c),x)*a**2*c**2* 
d**2*f - 2*int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + 
f*x))/(tan(e + f*x)**3*b**2*d + 2*tan(e + f*x)**2*a*b*d + tan(e + f*x)*...