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

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

Optimal result

Integrand size = 26, antiderivative size = 62 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=-\frac {2 (-1)^{3/4} a \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{d^{3/2} f}-\frac {2 a}{d f \sqrt {d \tan (e+f x)}} \] Output:

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

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.18 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.63 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=-\frac {2 a \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},i \tan (e+f x)\right )}{d f \sqrt {d \tan (e+f x)}} \] Input:

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

Output:

(-2*a*Hypergeometric2F1[-1/2, 1, 1/2, I*Tan[e + f*x]])/(d*f*Sqrt[d*Tan[e + 
 f*x]])
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3042, 4012, 3042, 4016, 218}

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 {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4012

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4016

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

\(\Big \downarrow \) 218

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

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

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

rule 4016
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ 
)]], x_Symbol] :> Simp[2*(c^2/f)   Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b 
*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.32 (sec) , antiderivative size = 294, normalized size of antiderivative = 4.74

method result size
derivativedivides \(\frac {a \left (\frac {\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 \left (d^{2}\right )^{\frac {1}{4}}}}{d}-\frac {2}{d \sqrt {d \tan \left (f x +e \right )}}\right )}{f}\) \(294\)
default \(\frac {a \left (\frac {\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 \left (d^{2}\right )^{\frac {1}{4}}}}{d}-\frac {2}{d \sqrt {d \tan \left (f x +e \right )}}\right )}{f}\) \(294\)
parts \(\frac {2 a d \left (-\frac {1}{d^{2} \sqrt {d \tan \left (f x +e \right )}}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d^{2} \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f}+\frac {i a \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 f \,d^{2}}\) \(298\)

Input:

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

Output:

1/f*a*(2/d*(1/8*I/d*(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*t 
an(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x 
+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e 
))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))-1/8/(d^ 
2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2 
)+(d^2)^(1/2))/(d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2 
)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2 
^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)))-2/d/(d*tan(f*x+e))^(1/2))
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.09 (sec) , antiderivative size = 339, normalized size of antiderivative = 5.47 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=-\frac {{\left (d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - d^{2} f\right )} \sqrt {\frac {4 i \, a^{2}}{d^{3} f^{2}}} \log \left (\frac {{\left (-2 i \, a d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d^{2} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {4 i \, a^{2}}{d^{3} f^{2}}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) - {\left (d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - d^{2} f\right )} \sqrt {\frac {4 i \, a^{2}}{d^{3} f^{2}}} \log \left (\frac {{\left (-2 i \, a d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, d^{2} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {4 i \, a^{2}}{d^{3} f^{2}}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) + 8 \, {\left (i \, a e^{\left (2 i \, f x + 2 i \, e\right )} + i \, a\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, {\left (d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - d^{2} f\right )}} \] Input:

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

Output:

-1/4*((d^2*f*e^(2*I*f*x + 2*I*e) - d^2*f)*sqrt(4*I*a^2/(d^3*f^2))*log((-2* 
I*a*d*e^(2*I*f*x + 2*I*e) + (I*d^2*f*e^(2*I*f*x + 2*I*e) + I*d^2*f)*sqrt(( 
-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(4*I*a^2/(d 
^3*f^2)))*e^(-2*I*f*x - 2*I*e)/a) - (d^2*f*e^(2*I*f*x + 2*I*e) - d^2*f)*sq 
rt(4*I*a^2/(d^3*f^2))*log((-2*I*a*d*e^(2*I*f*x + 2*I*e) + (-I*d^2*f*e^(2*I 
*f*x + 2*I*e) - I*d^2*f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x 
 + 2*I*e) + 1))*sqrt(4*I*a^2/(d^3*f^2)))*e^(-2*I*f*x - 2*I*e)/a) + 8*(I*a* 
e^(2*I*f*x + 2*I*e) + I*a)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f 
*x + 2*I*e) + 1)))/(d^2*f*e^(2*I*f*x + 2*I*e) - d^2*f)
 

Sympy [F]

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

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

Output:

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

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.11 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.77 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=\frac {a {\left (\frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} - \frac {8 \, a}{\sqrt {d \tan \left (f x + e\right )}}}{4 \, d f} \] Input:

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

Output:

1/4*(a*((2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d) + 2*sqrt(d*t 
an(f*x + e)))/sqrt(d))/sqrt(d) + (2*I - 2)*sqrt(2)*arctan(-1/2*sqrt(2)*(sq 
rt(2)*sqrt(d) - 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) + (I + 1)*sqrt(2) 
*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) + d)/sqrt(d) - 
(I + 1)*sqrt(2)*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) 
+ d)/sqrt(d)) - 8*a/sqrt(d*tan(f*x + e)))/(d*f)
 

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.18 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.23 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=\frac {2 i \, a {\left (\frac {i \, \sqrt {2} \arctan \left (\frac {2 \, \sqrt {d \tan \left (f x + e\right )} {\left | d \right |}}{i \, \sqrt {2} d^{\frac {3}{2}} + \sqrt {2} \sqrt {d} {\left | d \right |}}\right )}{\sqrt {d} {\left (\frac {i \, d}{{\left | d \right |}} + 1\right )}} + \frac {i}{\sqrt {d \tan \left (f x + e\right )}}\right )}}{d f} \] Input:

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

Output:

2*I*a*(I*sqrt(2)*arctan(2*sqrt(d*tan(f*x + e))*abs(d)/(I*sqrt(2)*d^(3/2) + 
 sqrt(2)*sqrt(d)*abs(d)))/(sqrt(d)*(I*d/abs(d) + 1)) + I/sqrt(d*tan(f*x + 
e)))/(d*f)
 

Mupad [B] (verification not implemented)

Time = 1.49 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.81 \[ \int \frac {a+i a \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx=\frac {2\,{\left (-1\right )}^{1/4}\,a\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{d^{3/2}\,f}-\frac {2\,a}{d\,f\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}} \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(d)*a*(int(sqrt(tan(e + f*x))/tan(e + f*x)**2,x) + int(sqrt(tan(e + f 
*x))/tan(e + f*x),x)*i))/d**2