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

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

Optimal result

Integrand size = 29, antiderivative size = 163 \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=-\frac {i \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 {a-i b} \sqrt {c-i d} f}+\frac {i \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 {a+i b} \sqrt {c+i d} f} \] Output:

-I*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))/(a-I*b)^(1/2)/(c-I*d)^(1/2)/f+I*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))/(a+I*b)^(1/2)/(c+I*d) 
^(1/2)/f
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.02 \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=\frac {i \left (\frac {\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 {-a+i b} \sqrt {-c+i d}}+\frac {\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 {a+i b} \sqrt {c+i d}}\right )}{f} \] Input:

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

Output:

(I*(ArcTanh[(Sqrt[-c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + I*b]*Sqrt 
[c + d*Tan[e + f*x]])]/(Sqrt[-a + I*b]*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[a + I*b]*Sqrt[c + I*d])))/f
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {3042, 4058, 662, 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 \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4058

\(\displaystyle \frac {\int \frac {1}{\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)}{f}\)

\(\Big \downarrow \) 662

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {i \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 {a+i b} \sqrt {c+i d}}-\frac {i \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 {a-i b} \sqrt {c-i d}}}{f}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 662
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_) + (c_.)*(x_ 
)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n, 1/(a + c*x^ 
2), x], x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] &&  !IntegerQ[m] &&  !Inte 
gerQ[n]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4058
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), 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/(1 + ff^2*x^2)), x], x, 
 Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, 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 \frac {1}{\sqrt {a +b \tan \left (f x +e \right )}\, \sqrt {c +d \tan \left (f x +e \right )}}d x\]

Input:

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

Output:

int(1/(a+b*tan(f*x+e))^(1/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. 9943 vs. \(2 (119) = 238\).

Time = 7.96 (sec) , antiderivative size = 9943, normalized size of antiderivative = 61.00 \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(((2*b*d+2*a*c)^2>0)', see `assum 
e?` for mo
 

Giac [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx=\text {Hanged} \] Input:

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

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \frac {1}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}} \, dx =\text {Too large to display} \] Input:

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

Output:

(2*sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a) - 2*int((sqrt(tan(e + 
 f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/(tan(e + f*x)**2*a* 
b*d**2 + tan(e + f*x)**2*b**2*c*d + tan(e + f*x)*a**2*d**2 + 2*tan(e + f*x 
)*a*b*c*d + tan(e + f*x)*b**2*c**2 + a**2*c*d + a*b*c**2),x)*a*b*d**2*f - 
2*int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**3)/ 
(tan(e + f*x)**2*a*b*d**2 + tan(e + f*x)**2*b**2*c*d + tan(e + f*x)*a**2*d 
**2 + 2*tan(e + f*x)*a*b*c*d + tan(e + f*x)*b**2*c**2 + a**2*c*d + a*b*c** 
2),x)*b**2*c*d*f - int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)* 
tan(e + f*x)**2)/(tan(e + f*x)**2*a*b*d**2 + tan(e + f*x)**2*b**2*c*d + ta 
n(e + f*x)*a**2*d**2 + 2*tan(e + f*x)*a*b*c*d + tan(e + f*x)*b**2*c**2 + a 
**2*c*d + a*b*c**2),x)*a**2*d**2*f - 2*int((sqrt(tan(e + f*x)*d + c)*sqrt( 
tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)**2*a*b*d**2 + tan(e + f 
*x)**2*b**2*c*d + tan(e + f*x)*a**2*d**2 + 2*tan(e + f*x)*a*b*c*d + tan(e 
+ f*x)*b**2*c**2 + a**2*c*d + a*b*c**2),x)*a*b*c*d*f - int((sqrt(tan(e + f 
*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x)**2)/(tan(e + f*x)**2*a*b* 
d**2 + tan(e + f*x)**2*b**2*c*d + tan(e + f*x)*a**2*d**2 + 2*tan(e + f*x)* 
a*b*c*d + tan(e + f*x)*b**2*c**2 + a**2*c*d + a*b*c**2),x)*b**2*c**2*f - 2 
*int((sqrt(tan(e + f*x)*d + c)*sqrt(tan(e + f*x)*b + a)*tan(e + f*x))/(tan 
(e + f*x)**2*a*b*d**2 + tan(e + f*x)**2*b**2*c*d + tan(e + f*x)*a**2*d**2 
+ 2*tan(e + f*x)*a*b*c*d + tan(e + f*x)*b**2*c**2 + a**2*c*d + a*b*c**2...