Integrand size = 28, antiderivative size = 81 \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=\frac {(-1)^{3/4} \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a f}+\frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \] Output:
1/2*(-1)^(3/4)*d^(1/2)*arctan((-1)^(3/4)*(d*tan(f*x+e))^(1/2)/d^(1/2))/a/f +1/2*I*(d*tan(f*x+e))^(1/2)/f/(a+I*a*tan(f*x+e))
Time = 0.23 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.09 \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=\frac {2 \sqrt {d \tan (e+f x)}-(1+i) \sqrt {2} \sqrt {d} \text {arctanh}\left (\frac {(1+i) \sqrt {d \tan (e+f x)}}{\sqrt {2} \sqrt {d}}\right ) (-i+\tan (e+f x))}{4 a f (-i+\tan (e+f x))} \] Input:
Integrate[Sqrt[d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x]),x]
Output:
(2*Sqrt[d*Tan[e + f*x]] - (1 + I)*Sqrt[2]*Sqrt[d]*ArcTanh[((1 + I)*Sqrt[d* Tan[e + f*x]])/(Sqrt[2]*Sqrt[d])]*(-I + Tan[e + f*x]))/(4*a*f*(-I + Tan[e + f*x]))
Time = 0.39 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4032, 27, 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 {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)}dx\) |
\(\Big \downarrow \) 4032 |
\(\displaystyle \frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}-\frac {\int \frac {i a d^2-a d^2 \tan (e+f x)}{2 \sqrt {d \tan (e+f x)}}dx}{2 a^2 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}-\frac {\int \frac {i a d^2-a d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}dx}{4 a^2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}-\frac {\int \frac {i a d^2-a d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}dx}{4 a^2 d}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle \frac {d^3 \int \frac {1}{i a d^3+a \tan (e+f x) d^3}d\sqrt {d \tan (e+f x)}}{2 f}+\frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {(-1)^{3/4} \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a f}+\frac {i \sqrt {d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\) |
Input:
Int[Sqrt[d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x]),x]
Output:
((-1)^(3/4)*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]])/(2* a*f) + ((I/2)*Sqrt[d*Tan[e + f*x]])/(f*(a + I*a*Tan[e + f*x]))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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]
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]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(a*c + b*d))*((c + d*Tan[e + f*x])^n/(2*( b*c - a*d)*f*(a + b*Tan[e + f*x]))), x] + Simp[1/(2*a*(b*c - a*d)) Int[(c + d*Tan[e + f*x])^(n - 1)*Simp[a*c*d*(n - 1) + b*c^2 + b*d^2*n - d*(b*c - a*d)*(n - 1)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && Ne Q[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[0, n, 1]
Time = 1.42 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.85
method | result | size |
derivativedivides | \(\frac {d \sqrt {d \tan \left (f x +e \right )}}{2 f a \left (d \tan \left (f x +e \right )-i d \right )}+\frac {d \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {i d}}\right )}{2 f a \sqrt {i d}}\) | \(69\) |
default | \(\frac {d \sqrt {d \tan \left (f x +e \right )}}{2 f a \left (d \tan \left (f x +e \right )-i d \right )}+\frac {d \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {i d}}\right )}{2 f a \sqrt {i d}}\) | \(69\) |
Input:
int((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/2/f/a*d*(d*tan(f*x+e))^(1/2)/(d*tan(f*x+e)-I*d)+1/2/f/a*d/(I*d)^(1/2)*ar ctan((d*tan(f*x+e))^(1/2)/(I*d)^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (61) = 122\).
Time = 0.08 (sec) , antiderivative size = 288, normalized size of antiderivative = 3.56 \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=-\frac {{\left (a f \sqrt {\frac {i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-2 \, {\left (2 \, {\left (i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, a 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 {i \, d}{4 \, a^{2} f^{2}}} + i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - a f \sqrt {\frac {i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-2 \, {\left (2 \, {\left (-i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a 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 {i \, d}{4 \, a^{2} f^{2}}} + i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\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}} {\left (i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a f} \] Input:
integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="fricas")
Output:
-1/4*(a*f*sqrt(1/4*I*d/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(-2*(2*(I*a*f*e^( 2*I*f*x + 2*I*e) + I*a*f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f* x + 2*I*e) + 1))*sqrt(1/4*I*d/(a^2*f^2)) + I*d*e^(2*I*f*x + 2*I*e))*e^(-2* I*f*x - 2*I*e)) - a*f*sqrt(1/4*I*d/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(-2*( 2*(-I*a*f*e^(2*I*f*x + 2*I*e) - I*a*f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I* d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(1/4*I*d/(a^2*f^2)) + I*d*e^(2*I*f*x + 2 *I*e))*e^(-2*I*f*x - 2*I*e)) - sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2 *I*f*x + 2*I*e) + 1))*(I*e^(2*I*f*x + 2*I*e) + I))*e^(-2*I*f*x - 2*I*e)/(a *f)
\[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=- \frac {i \int \frac {\sqrt {d \tan {\left (e + f x \right )}}}{\tan {\left (e + f x \right )} - i}\, dx}{a} \] Input:
integrate((d*tan(f*x+e))**(1/2)/(a+I*a*tan(f*x+e)),x)
Output:
-I*Integral(sqrt(d*tan(e + f*x))/(tan(e + f*x) - I), x)/a
Exception generated. \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.16 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.17 \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=\frac {i \, {\left (-\frac {i \, \sqrt {2} d^{\frac {3}{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 )}{\frac {i \, d}{{\left | d \right |}} + 1} - \frac {i \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{d \tan \left (f x + e\right ) - i \, d}\right )}}{2 \, a d f} \] Input:
integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="giac")
Output:
1/2*I*(-I*sqrt(2)*d^(3/2)*arctan(2*sqrt(d*tan(f*x + e))*abs(d)/(I*sqrt(2)* d^(3/2) + sqrt(2)*sqrt(d)*abs(d)))/(I*d/abs(d) + 1) - I*sqrt(d*tan(f*x + e ))*d^2/(d*tan(f*x + e) - I*d))/(a*d*f)
Time = 1.14 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.88 \[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=-\frac {2\,\sqrt {\frac {1}{16}{}\mathrm {i}}\,\sqrt {d}\,\mathrm {atanh}\left (\frac {4\,\sqrt {\frac {1}{16}{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{a\,f}-\frac {d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,a\,f\,\left (-d\,\mathrm {tan}\left (e+f\,x\right )+d\,1{}\mathrm {i}\right )} \] Input:
int((d*tan(e + f*x))^(1/2)/(a + a*tan(e + f*x)*1i),x)
Output:
- (2*(1i/16)^(1/2)*d^(1/2)*atanh((4*(1i/16)^(1/2)*(d*tan(e + f*x))^(1/2))/ d^(1/2)))/(a*f) - (d*(d*tan(e + f*x))^(1/2))/(2*a*f*(d*1i - d*tan(e + f*x) ))
\[ \int \frac {\sqrt {d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx=\frac {\sqrt {d}\, \left (-2 \sqrt {\tan \left (f x +e \right )}\, i +\left (\int \frac {\sqrt {\tan \left (f x +e \right )}}{\tan \left (f x +e \right )^{2}-\tan \left (f x +e \right ) i}d x \right ) f +\left (\int \frac {\sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{2}}{\tan \left (f x +e \right )-i}d x \right ) f i +\left (\int \frac {\sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )}{\tan \left (f x +e \right )-i}d x \right ) f \right )}{a f} \] Input:
int((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x)
Output:
(sqrt(d)*( - 2*sqrt(tan(e + f*x))*i + int(sqrt(tan(e + f*x))/(tan(e + f*x) **2 - tan(e + f*x)*i),x)*f + int((sqrt(tan(e + f*x))*tan(e + f*x)**2)/(tan (e + f*x) - i),x)*f*i + int((sqrt(tan(e + f*x))*tan(e + f*x))/(tan(e + f*x ) - i),x)*f))/(a*f)