\(\int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx\) [1121]

Optimal result
Mathematica [A] (verified)
Rubi [A] (warning: unable to verify)
Maple [B] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx=-\frac {2 i a \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d} f} \] Input:

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

Output:

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

Rubi [A] (warning: unable to verify)

Time = 0.27 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.80, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4020, 25, 27, 73, 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 {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4020

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

\(\displaystyle \frac {2 a \arctan \left (\frac {a \tan (e+f x)}{\sqrt {c-i d}}\right )}{f \sqrt {c-i d}}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 732 vs. \(2 (37 ) = 74\).

Time = 0.51 (sec) , antiderivative size = 733, normalized size of antiderivative = 15.93

method result size
derivativedivides \(\frac {a \left (\frac {\frac {\left (-i \sqrt {c^{2}+d^{2}}-i c +d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d -\frac {\left (-i \sqrt {c^{2}+d^{2}}-i c +d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}}+\frac {\frac {\left (2 i c^{2} \sqrt {c^{2}+d^{2}}+i d^{2} \sqrt {c^{2}+d^{2}}+2 i c^{3}+2 i c \,d^{2}-c d \sqrt {c^{2}+d^{2}}-c^{2} d -d^{3}\right ) \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2}-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{3}-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \,d^{2}+\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2} d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d^{3}+\frac {\left (2 i c^{2} \sqrt {c^{2}+d^{2}}+i d^{2} \sqrt {c^{2}+d^{2}}+2 i c^{3}+2 i c \,d^{2}-c d \sqrt {c^{2}+d^{2}}-c^{2} d -d^{3}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \left (\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}\right )}\right )}{f}\) \(733\)
default \(\frac {a \left (\frac {\frac {\left (-i \sqrt {c^{2}+d^{2}}-i c +d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d -\frac {\left (-i \sqrt {c^{2}+d^{2}}-i c +d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}}+\frac {\frac {\left (2 i c^{2} \sqrt {c^{2}+d^{2}}+i d^{2} \sqrt {c^{2}+d^{2}}+2 i c^{3}+2 i c \,d^{2}-c d \sqrt {c^{2}+d^{2}}-c^{2} d -d^{3}\right ) \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2}-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{3}-i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \,d^{2}+\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2} d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d^{3}+\frac {\left (2 i c^{2} \sqrt {c^{2}+d^{2}}+i d^{2} \sqrt {c^{2}+d^{2}}+2 i c^{3}+2 i c \,d^{2}-c d \sqrt {c^{2}+d^{2}}-c^{2} d -d^{3}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \left (\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}\right )}\right )}{f}\) \(733\)
parts \(\text {Expression too large to display}\) \(1894\)

Input:

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

Output:

1/f*a*(1/(2*(c^2+d^2)^(1/2)+2*c)^(1/2)/(c^2+d^2)^(1/2)*(1/2*(-I*(c^2+d^2)^ 
(1/2)-I*c+d)*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2 
*c)^(1/2)+(c^2+d^2)^(1/2))+2*(-I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c+(2*(c^2+d 
^2)^(1/2)+2*c)^(1/2)*d-1/2*(-I*(c^2+d^2)^(1/2)-I*c+d)*(2*(c^2+d^2)^(1/2)+2 
*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)+ 
(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)))+1/(2*(c^2+d 
^2)^(1/2)+2*c)^(1/2)/(c^2+d^2)^(1/2)/((c^2+d^2)^(1/2)*c+c^2+d^2)*(1/2*(2*I 
*(c^2+d^2)^(1/2)*c^2+I*d^2*(c^2+d^2)^(1/2)+2*I*c^3+2*I*c*d^2-c*d*(c^2+d^2) 
^(1/2)-c^2*d-d^3)*ln(d*tan(f*x+e)+c-(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1 
/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+2*(-I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d 
^2)^(1/2)*c^2-I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c^3-I*(2*(c^2+d^2)^(1/2)+2*c 
)^(1/2)*c*d^2+(c^2+d^2)^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*d+(2*(c^2+d^ 
2)^(1/2)+2*c)^(1/2)*c^2*d+(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*d^3+1/2*(2*I*(c^2+ 
d^2)^(1/2)*c^2+I*d^2*(c^2+d^2)^(1/2)+2*I*c^3+2*I*c*d^2-c*d*(c^2+d^2)^(1/2) 
-c^2*d-d^3)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*a 
rctan((2*(c+d*tan(f*x+e))^(1/2)-(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2 
)^(1/2)-2*c)^(1/2))))
 

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. 275 vs. \(2 (34) = 68\).

Time = 0.09 (sec) , antiderivative size = 275, normalized size of antiderivative = 5.98 \[ \int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx=\frac {1}{4} \, \sqrt {-\frac {4 i \, a^{2}}{{\left (i \, c + d\right )} f^{2}}} \log \left (\frac {{\left (2 \, a c + {\left ({\left (i \, c + d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, c + d\right )} f\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 {4 i \, a^{2}}{{\left (i \, c + d\right )} f^{2}}} + 2 \, {\left (a c - i \, a d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) - \frac {1}{4} \, \sqrt {-\frac {4 i \, a^{2}}{{\left (i \, c + d\right )} f^{2}}} \log \left (\frac {{\left (2 \, a c + {\left ({\left (-i \, c - d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, c - d\right )} f\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 {4 i \, a^{2}}{{\left (i \, c + d\right )} f^{2}}} + 2 \, {\left (a c - i \, a d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) \] Input:

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

Output:

1/4*sqrt(-4*I*a^2/((I*c + d)*f^2))*log((2*a*c + ((I*c + d)*f*e^(2*I*f*x + 
2*I*e) + (I*c + d)*f)*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(-4*I*a^2/((I*c + d)*f^2)) + 2*(a*c - I*a*d)*e^( 
2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/a) - 1/4*sqrt(-4*I*a^2/((I*c + d)*f 
^2))*log((2*a*c + ((-I*c - d)*f*e^(2*I*f*x + 2*I*e) + (-I*c - d)*f)*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(- 
4*I*a^2/((I*c + d)*f^2)) + 2*(a*c - I*a*d)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f* 
x - 2*I*e)/a)
 

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 6484 vs. \(2 (34) = 68\).

Time = 0.36 (sec) , antiderivative size = 6484, normalized size of antiderivative = 140.96 \[ \int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/4*(sqrt(2*c^2 + 2*d^2)*(2*a*arctan2((d^2*cos(2*f*x + 2*e) - c*d*sin(2*f 
*x + 2*e) + ((c^4 + 2*c^2*d^2 + d^4)*cos(2*f*x + 2*e)^4 + (c^4 + 2*c^2*d^2 
 + d^4)*sin(2*f*x + 2*e)^4 + c^4 + 2*c^2*d^2 + d^4 + 4*(c^4 + c^2*d^2)*cos 
(2*f*x + 2*e)^3 + 4*(c^3*d + c*d^3)*sin(2*f*x + 2*e)^3 + 2*(3*c^4 + 2*c^2* 
d^2 - d^4)*cos(2*f*x + 2*e)^2 + 2*(c^4 + 2*c^2*d^2 + d^4 + (c^4 + 2*c^2*d^ 
2 + d^4)*cos(2*f*x + 2*e)^2 + 2*(c^4 + c^2*d^2)*cos(2*f*x + 2*e))*sin(2*f* 
x + 2*e)^2 + 4*(c^4 + c^2*d^2)*cos(2*f*x + 2*e) + 4*(c^3*d + c*d^3 + (c^3* 
d + c*d^3)*cos(2*f*x + 2*e)^2 + 2*(c^3*d + c*d^3)*cos(2*f*x + 2*e))*sin(2* 
f*x + 2*e))^(1/4)*d*sin(1/2*arctan2(-2*(c*d*cos(2*f*x + 2*e)^2 - c*d*sin(2 
*f*x + 2*e)^2 + c*d*cos(2*f*x + 2*e) - (c^2 + (c^2 - d^2)*cos(2*f*x + 2*e) 
)*sin(2*f*x + 2*e))/d^2, (2*c^2*cos(2*f*x + 2*e) + (c^2 - d^2)*cos(2*f*x + 
 2*e)^2 - (c^2 - d^2)*sin(2*f*x + 2*e)^2 + c^2 + d^2 + 2*(2*c*d*cos(2*f*x 
+ 2*e) + c*d)*sin(2*f*x + 2*e))/d^2)))/d^2, -(c*cos(2*f*x + 2*e) + d*sin(2 
*f*x + 2*e) - ((c^4 + 2*c^2*d^2 + d^4)*cos(2*f*x + 2*e)^4 + (c^4 + 2*c^2*d 
^2 + d^4)*sin(2*f*x + 2*e)^4 + c^4 + 2*c^2*d^2 + d^4 + 4*(c^4 + c^2*d^2)*c 
os(2*f*x + 2*e)^3 + 4*(c^3*d + c*d^3)*sin(2*f*x + 2*e)^3 + 2*(3*c^4 + 2*c^ 
2*d^2 - d^4)*cos(2*f*x + 2*e)^2 + 2*(c^4 + 2*c^2*d^2 + d^4 + (c^4 + 2*c^2* 
d^2 + d^4)*cos(2*f*x + 2*e)^2 + 2*(c^4 + c^2*d^2)*cos(2*f*x + 2*e))*sin(2* 
f*x + 2*e)^2 + 4*(c^4 + c^2*d^2)*cos(2*f*x + 2*e) + 4*(c^3*d + c*d^3 + (c^ 
3*d + c*d^3)*cos(2*f*x + 2*e)^2 + 2*(c^3*d + c*d^3)*cos(2*f*x + 2*e))*s...
 

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (34) = 68\).

Time = 0.49 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.48 \[ \int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx=\frac {2 i \, \sqrt {2} a \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{\sqrt {2} c \sqrt {-c + \sqrt {c^{2} + d^{2}}} - i \, \sqrt {2} \sqrt {-c + \sqrt {c^{2} + d^{2}}} d - \sqrt {2} \sqrt {c^{2} + d^{2}} \sqrt {-c + \sqrt {c^{2} + d^{2}}}}\right )}{\sqrt {-c + \sqrt {c^{2} + d^{2}}} f {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} \] Input:

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

Output:

2*I*sqrt(2)*a*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt( 
d*tan(f*x + e) + c))/(sqrt(2)*c*sqrt(-c + sqrt(c^2 + d^2)) - I*sqrt(2)*sqr 
t(-c + sqrt(c^2 + d^2))*d - sqrt(2)*sqrt(c^2 + d^2)*sqrt(-c + sqrt(c^2 + d 
^2))))/(sqrt(-c + sqrt(c^2 + d^2))*f*(-I*d/(c - sqrt(c^2 + d^2)) + 1))
 

Mupad [B] (verification not implemented)

Time = 3.52 (sec) , antiderivative size = 2947, normalized size of antiderivative = 64.07 \[ \int \frac {a+i a \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx=\text {Too large to display} \] Input:

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

Output:

2*atanh((8*c*d^2*(- (-16*a^4*d^2*f^4)^(1/2)/(16*(c^2*f^4 + d^2*f^4)) - (a^ 
2*c*f^2)/(4*(c^2*f^4 + d^2*f^4)))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-16*a^ 
4*d^2*f^4)^(1/2))/((16*a^3*c*d^5*f^5)/(c^2*f^4 + d^2*f^4) + (4*a*d^5*f^4*( 
-16*a^4*d^2*f^4)^(1/2))/(c^2*f^5 + d^2*f^5) + (16*a^3*c^3*d^3*f^5)/(c^2*f^ 
4 + d^2*f^4) + (4*a*c^2*d^3*f^4*(-16*a^4*d^2*f^4)^(1/2))/(c^2*f^5 + d^2*f^ 
5)) - (32*a^2*d^2*(- (-16*a^4*d^2*f^4)^(1/2)/(16*(c^2*f^4 + d^2*f^4)) - (a 
^2*c*f^2)/(4*(c^2*f^4 + d^2*f^4)))^(1/2)*(c + d*tan(e + f*x))^(1/2))/((16* 
a^3*c*d^3*f^3)/(c^2*f^4 + d^2*f^4) + (4*a*d^3*f^2*(-16*a^4*d^2*f^4)^(1/2)) 
/(c^2*f^5 + d^2*f^5)) + (32*a^2*c^2*d^2*f^2*(- (-16*a^4*d^2*f^4)^(1/2)/(16 
*(c^2*f^4 + d^2*f^4)) - (a^2*c*f^2)/(4*(c^2*f^4 + d^2*f^4)))^(1/2)*(c + d* 
tan(e + f*x))^(1/2))/((16*a^3*c*d^5*f^5)/(c^2*f^4 + d^2*f^4) + (4*a*d^5*f^ 
4*(-16*a^4*d^2*f^4)^(1/2))/(c^2*f^5 + d^2*f^5) + (16*a^3*c^3*d^3*f^5)/(c^2 
*f^4 + d^2*f^4) + (4*a*c^2*d^3*f^4*(-16*a^4*d^2*f^4)^(1/2))/(c^2*f^5 + d^2 
*f^5)))*(- (-16*a^4*d^2*f^4)^(1/2)/(16*(c^2*f^4 + d^2*f^4)) - (a^2*c*f^2)/ 
(4*(c^2*f^4 + d^2*f^4)))^(1/2) - 2*atanh((32*a^2*d^2*((-16*a^4*d^2*f^4)^(1 
/2)/(16*(c^2*f^4 + d^2*f^4)) - (a^2*c*f^2)/(4*(c^2*f^4 + d^2*f^4)))^(1/2)* 
(c + d*tan(e + f*x))^(1/2))/((16*a^3*c*d^3*f^3)/(c^2*f^4 + d^2*f^4) - (4*a 
*d^3*f^2*(-16*a^4*d^2*f^4)^(1/2))/(c^2*f^5 + d^2*f^5)) + (8*c*d^2*((-16*a^ 
4*d^2*f^4)^(1/2)/(16*(c^2*f^4 + d^2*f^4)) - (a^2*c*f^2)/(4*(c^2*f^4 + d^2* 
f^4)))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-16*a^4*d^2*f^4)^(1/2))/((16*a...
 

Reduce [F]

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

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

Output:

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