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

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

Optimal result

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

-1/4*I*(c-I*d)^(3/2)*arctanh(2^(1/2)*a^(1/2)*(c+d*tan(f*x+e))^(1/2)/(c-I*d 
)^(1/2)/(a+I*a*tan(f*x+e))^(1/2))*2^(1/2)/a^(3/2)/f+1/2*(I*c+d)*(c+d*tan(f 
*x+e))^(1/2)/a/f/(a+I*a*tan(f*x+e))^(1/2)+1/3*I*(c+d*tan(f*x+e))^(3/2)/f/( 
a+I*a*tan(f*x+e))^(3/2)
 

Mathematica [A] (verified)

Time = 2.20 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.36 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^{3/2}} \, dx=-\frac {i \left (4 a d (-i+\tan (e+f x)) (c+d \tan (e+f x))^{3/2}-4 a (c+d \tan (e+f x))^{5/2}-3 i \sqrt {-a (c-i d)} (c+i d) (-i+\tan (e+f x)) \left (\sqrt {2} (c-i d) \arctan \left (\frac {\sqrt {-a (c-i d)} \sqrt {a+i a \tan (e+f x)}}{\sqrt {2} a \sqrt {c+d \tan (e+f x)}}\right ) \sqrt {a+i a \tan (e+f x)}-2 \sqrt {-a (c-i d)} \sqrt {c+d \tan (e+f x)}\right )\right )}{12 a (c+i d) f (a+i a \tan (e+f x))^{3/2}} \] Input:

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

Output:

((-1/12*I)*(4*a*d*(-I + Tan[e + f*x])*(c + d*Tan[e + f*x])^(3/2) - 4*a*(c 
+ d*Tan[e + f*x])^(5/2) - (3*I)*Sqrt[-(a*(c - I*d))]*(c + I*d)*(-I + Tan[e 
 + f*x])*(Sqrt[2]*(c - I*d)*ArcTan[(Sqrt[-(a*(c - I*d))]*Sqrt[a + I*a*Tan[ 
e + f*x]])/(Sqrt[2]*a*Sqrt[c + d*Tan[e + f*x]])]*Sqrt[a + I*a*Tan[e + f*x] 
] - 2*Sqrt[-(a*(c - I*d))]*Sqrt[c + d*Tan[e + f*x]])))/(a*(c + I*d)*f*(a + 
 I*a*Tan[e + f*x])^(3/2))
 

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.02, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.219, Rules used = {3042, 4029, 3042, 4029, 3042, 4027, 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}}{(a+i a \tan (e+f x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4029

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4029

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4027

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

Defintions of rubi rules used

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 4027
Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) 
 + (f_.)*(x_)]], x_Symbol] :> Simp[-2*a*(b/f)   Subst[Int[1/(a*c - b*d - 2* 
a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x] /; 
FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && N 
eQ[c^2 + d^2, 0]
 

rule 4029
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e 
 + f*x])^n/(2*b*f*m)), x] - Simp[(a*c - b*d)/(2*b^2)   Int[(a + b*Tan[e + f 
*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, 
f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && Eq 
Q[m + n, 0] && LeQ[m, -2^(-1)]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1274 vs. \(2 (135 ) = 270\).

Time = 0.53 (sec) , antiderivative size = 1275, normalized size of antiderivative = 7.37

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

Input:

int((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^(3/2),x,method=_RETURNVERBOS 
E)
 

Output:

1/24/f*(c+d*tan(f*x+e))^(1/2)*(a*(1+I*tan(f*x+e)))^(1/2)/a^2*(-12*I*c^2*(a 
*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2)*tan(f*x+e)^2+9*I*2^(1/2)*(-a*(I* 
d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(- 
a*(I*d-c))^(1/2)*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2))/(I+tan(f*x+e 
)))*c^2*tan(f*x+e)^2-3*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2 
*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2))/( 
I+tan(f*x+e)))*2^(1/2)*(-a*(I*d-c))^(1/2)*c^2*tan(f*x+e)^3-3*ln((3*a*c+I*a 
*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(c+d* 
tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2))/(I+tan(f*x+e)))*2^(1/2)*(-a*(I*d-c))^ 
(1/2)*d^2*tan(f*x+e)^3-8*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2)*c*d*t 
an(f*x+e)^2-32*c^2*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2)*tan(f*x+e)- 
3*I*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan( 
f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^ 
(1/2))/(I+tan(f*x+e)))*d^2+20*I*c^2*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^ 
(1/2)+9*I*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a* 
d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x 
+e)))^(1/2))/(I+tan(f*x+e)))*d^2*tan(f*x+e)^2-3*I*2^(1/2)*(-a*(I*d-c))^(1/ 
2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c) 
)^(1/2)*(a*(c+d*tan(f*x+e))*(1+I*tan(f*x+e)))^(1/2))/(I+tan(f*x+e)))*c^2+9 
*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c...
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 488 vs. \(2 (129) = 258\).

Time = 0.13 (sec) , antiderivative size = 488, normalized size of antiderivative = 2.82 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^{3/2}} \, dx=-\frac {{\left (3 \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{3} f^{2}}} e^{\left (3 i \, f x + 3 i \, e\right )} \log \left (\frac {2 \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{3} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} {\left ({\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c + d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{i \, c + d}\right ) - 3 \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{3} f^{2}}} e^{\left (3 i \, f x + 3 i \, e\right )} \log \left (-\frac {2 \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{3} f^{2}}} e^{\left (i \, f x + i \, e\right )} - \sqrt {2} {\left ({\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c + d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{i \, c + d}\right ) + \sqrt {2} {\left (4 \, {\left (-i \, c - d\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - {\left (5 i \, c + 3 \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, c + d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-3 i \, f x - 3 i \, e\right )}}{12 \, a^{2} f} \] Input:

integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="fr 
icas")
 

Output:

-1/12*(3*sqrt(1/2)*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^3*f^ 
2))*e^(3*I*f*x + 3*I*e)*log((2*sqrt(1/2)*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3* 
c*d^2 + I*d^3)/(a^3*f^2))*e^(I*f*x + I*e) + sqrt(2)*((I*c + d)*e^(2*I*f*x 
+ 2*I*e) + I*c + d)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I 
*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))/(I*c + d)) - 3*sqrt 
(1/2)*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^3*f^2))*e^(3*I*f* 
x + 3*I*e)*log(-(2*sqrt(1/2)*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^ 
3)/(a^3*f^2))*e^(I*f*x + I*e) - sqrt(2)*((I*c + d)*e^(2*I*f*x + 2*I*e) + I 
*c + d)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e 
) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))/(I*c + d)) + sqrt(2)*(4*(-I*c - 
 d)*e^(4*I*f*x + 4*I*e) - (5*I*c + 3*d)*e^(2*I*f*x + 2*I*e) - I*c + d)*sqr 
t(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqr 
t(a/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-3*I*f*x - 3*I*e)/(a^2*f)
                                                                                    
                                                                                    
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\text {Exception raised: RuntimeError} \] Input:

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

Output:

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un 
defined.
 

Giac [F(-2)]

Exception generated. \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\text {Exception raised: TypeError} \] Input:

integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="gi 
ac")
 

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument TypeError: Bad 
Argument TypeError: Bad Argument TypeError: Bad Argument TypeRecursive ass 
umption s
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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