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

Optimal result
Mathematica [A] (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 = 258 \[ \int (a+b \tan (e+f x))^{3/2} \sqrt {c+d \tan (e+f x)} \, dx=-\frac {i (a-i b)^{3/2} \sqrt {c-i d} \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 )}{f}+\frac {i (a+i b)^{3/2} \sqrt {c+i d} \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 )}{f}+\frac {\sqrt {b} (b c+3 a d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {b \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{f} \] Output:

-I*(a-I*b)^(3/2)*(c-I*d)^(1/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))/f+I*(a+I*b)^(3/2)*(c+I*d)^(1/2)*ar 
ctanh((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))/f+b^(1/2)*(3*a*d+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))/d^(1/2)/f+b*(a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+ 
e))^(1/2)/f
 

Mathematica [A] (verified)

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

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

Output:

(-(((b*c - a*d)^(3/2)*(b*c + 3*a*d)*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan[e + f* 
x]])/Sqrt[b*c - a*d]]*Sqrt[(b*(c + d*Tan[e + f*x]))/(b*c - a*d)])/Sqrt[d]) 
 + ((b*c - a*d)*(I*(a - I*b)^2*Sqrt[a + I*b]*Sqrt[-c + I*d]*Sqrt[c + I*d]* 
ArcTanh[(Sqrt[-c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + I*b]*Sqrt[c + 
 d*Tan[e + f*x]])]*Sqrt[c + d*Tan[e + f*x]] + Sqrt[-a + I*b]*((a + I*b)^2* 
((-I)*c + d)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + I* 
b]*Sqrt[c + d*Tan[e + f*x]])]*Sqrt[c + d*Tan[e + f*x]] - Sqrt[a + I*b]*b*S 
qrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x]))))/(Sqrt[-a + I 
*b]*Sqrt[a + I*b]*Sqrt[c + I*d]))/((-(b*c) + a*d)*f*Sqrt[c + d*Tan[e + f*x 
]])
 

Rubi [A] (verified)

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4053

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4138

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

\(\Big \downarrow \) 2348

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((-2*I)*(a - I*b)^(3/2)*Sqrt[c - I*d]*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Ta 
n[e + f*x]])/(Sqrt[a - I*b]*Sqrt[c + d*Tan[e + f*x]])] + (2*I)*(a + I*b)^( 
3/2)*Sqrt[c + I*d]*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[ 
a + I*b]*Sqrt[c + d*Tan[e + f*x]])] + (2*Sqrt[b]*(b*c + 3*a*d)*ArcTanh[(Sq 
rt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[ 
d])/(2*f) + (b*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/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 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 4053
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a + b*Tan[e + f*x])^(m - 1)*((c + 
d*Tan[e + f*x])^n/(f*(m + n - 1))), x] + Simp[1/(m + n - 1)   Int[(a + b*Ta 
n[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n - 1)*Simp[a^2*c*(m + n - 1) - b 
*(b*c*(m - 1) + a*d*n) + (2*a*b*c + a^2*d - b^2*d)*(m + n - 1)*Tan[e + f*x] 
 + b*(b*c*n + a*d*(2*m + n - 2))*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, 1] && GtQ[n, 0] && IntegerQ[2*n]
 

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

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 6790 vs. \(2 (198) = 396\).

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

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

Output:

Too large to include
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

int((a+b*tan(f*x+e))^(3/2)*(c+d*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),x)*b + 
int(sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a),x)*a