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

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

Optimal result

Integrand size = 14, antiderivative size = 300 \[ \int \frac {1}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}{a+\sqrt {a^2+b^2}+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a^2+b^2} \sqrt {a+\sqrt {a^2+b^2}} d}+\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a^2+b^2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a^2+b^2} \sqrt {a-\sqrt {a^2+b^2}} d} \] Output:

1/2*b*arctanh(2^(1/2)*(a+(a^2+b^2)^(1/2))^(1/2)*(a+b*tan(d*x+c))^(1/2)/(a+ 
(a^2+b^2)^(1/2)+b*tan(d*x+c)))*2^(1/2)/(a^2+b^2)^(1/2)/(a+(a^2+b^2)^(1/2)) 
^(1/2)/d+1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)-2^(1/2)*(a+b*tan(d*x+c)) 
^(1/2))/(a-(a^2+b^2)^(1/2))^(1/2))*2^(1/2)/(a^2+b^2)^(1/2)/(a-(a^2+b^2)^(1 
/2))^(1/2)/d-1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)+2^(1/2)*(a+b*tan(d*x 
+c))^(1/2))/(a-(a^2+b^2)^(1/2))^(1/2))*2^(1/2)/(a^2+b^2)^(1/2)/(a-(a^2+b^2 
)^(1/2))^(1/2)/d
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.03 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.29 \[ \int \frac {1}{\sqrt {a+b \tan (c+d x)}} \, dx=-\frac {i \left (\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b}}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b}}\right )}{d} \] Input:

Integrate[1/Sqrt[a + b*Tan[c + d*x]],x]
 

Output:

((-I)*(ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]]/Sqrt[a - I*b] - Arc 
Tanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]]/Sqrt[a + I*b]))/d
 

Rubi [A] (warning: unable to verify)

Time = 0.63 (sec) , antiderivative size = 425, normalized size of antiderivative = 1.42, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {3042, 3966, 484, 1407, 1142, 25, 27, 1083, 219, 1103}

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 (c+d x)}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3966

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

\(\Big \downarrow \) 484

\(\displaystyle \frac {2 b \int \frac {1}{b^4 \tan ^4(c+d x)-2 a b^2 \tan ^2(c+d x)+a^2+b^2}d\sqrt {a+b \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 1407

\(\displaystyle \frac {2 b \left (\frac {\int \frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}-\sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\int \frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+\sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 1142

\(\displaystyle \frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {1}{2} \int -\frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {2 b \left (\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-b^2 \tan ^2(c+d x)}d\left (2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}\right )}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-b^2 \tan ^2(c+d x)}d\left (\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {2 b \left (\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}+2 \sqrt {a+b \tan (c+d x)}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

\(\Big \downarrow \) 1103

\(\displaystyle \frac {2 b \left (\frac {-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}-\frac {1}{2} \log \left (-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+b^2 \tan ^2(c+d x)\right )}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}+\frac {\frac {1}{2} \log \left (\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+b^2 \tan ^2(c+d x)\right )-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}+2 \sqrt {a+b \tan (c+d x)}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {a^2+b^2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\)

Input:

Int[1/Sqrt[a + b*Tan[c + d*x]],x]
 

Output:

(2*b*((-((Sqrt[a + Sqrt[a^2 + b^2]]*ArcTanh[(-(Sqrt[2]*Sqrt[a + Sqrt[a^2 + 
 b^2]]) + 2*Sqrt[a + b*Tan[c + d*x]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]])] 
)/Sqrt[a - Sqrt[a^2 + b^2]]) - Log[Sqrt[a^2 + b^2] + b^2*Tan[c + d*x]^2 - 
Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]]/2)/(2*Sqrt[2]* 
Sqrt[a^2 + b^2]*Sqrt[a + Sqrt[a^2 + b^2]]) + (-((Sqrt[a + Sqrt[a^2 + b^2]] 
*ArcTanh[(Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]] + 2*Sqrt[a + b*Tan[c + d*x]])/ 
(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]])])/Sqrt[a - Sqrt[a^2 + b^2]]) + Log[Sqr 
t[a^2 + b^2] + b^2*Tan[c + d*x]^2 + Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt 
[a + b*Tan[c + d*x]]]/2)/(2*Sqrt[2]*Sqrt[a^2 + b^2]*Sqrt[a + Sqrt[a^2 + b^ 
2]])))/d
 

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 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 484
Int[1/(Sqrt[(c_) + (d_.)*(x_)]*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[2* 
d   Subst[Int[1/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], 
 x] /; FreeQ[{a, b, c, d}, x]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 1407
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/ 
c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r)   Int[(r - x)/(q - r* 
x + x^2), x], x] + Simp[1/(2*c*q*r)   Int[(r + x)/(q + r*x + x^2), x], x]]] 
 /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]
 

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

rule 3966
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d   Su 
bst[Int[(a + x)^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c 
, d, n}, x] && NeQ[a^2 + b^2, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1551\) vs. \(2(244)=488\).

Time = 0.28 (sec) , antiderivative size = 1552, normalized size of antiderivative = 5.17

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

Input:

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

Output:

-1/4/d/b/(a^2+b^2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^( 
1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2-1/4/d*b 
/(a^2+b^2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a 
)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+1/4/d/b/(a^2+b^2)^( 
3/2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2 
)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^3+1/4/d*b/(a^2+b^2)^(3/ 
2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+ 
(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a+3/d*b/(a^2+b^2)^(3/2)/(2* 
(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2+b^2)^( 
1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^2+2/d*b^3/(a^2+b^2)^(3/2 
)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2+b 
^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/d/b/(a^2+b^2)^(1/2) 
/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2+b^ 
2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^2-1/d*b/(a^2+b^2)^(1 
/2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2 
+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/d/b/(a^2+b^2)^(3/ 
2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2+ 
b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^4+1/4/d/b/(a^2+b^2 
)*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+( 
a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2+1/4/d*b/(a^2+b^2)*ln(...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 717 vs. \(2 (246) = 492\).

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

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

Output:

1/2*sqrt(-((a^2 + b^2)*d^2*sqrt(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + a)/( 
(a^2 + b^2)*d^2))*log(sqrt(b*tan(d*x + c) + a)*b + ((a^3 + a*b^2)*d^3*sqrt 
(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + b^2*d)*sqrt(-((a^2 + b^2)*d^2*sqrt( 
-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + a)/((a^2 + b^2)*d^2))) - 1/2*sqrt(-( 
(a^2 + b^2)*d^2*sqrt(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + a)/((a^2 + b^2) 
*d^2))*log(sqrt(b*tan(d*x + c) + a)*b - ((a^3 + a*b^2)*d^3*sqrt(-b^2/((a^4 
 + 2*a^2*b^2 + b^4)*d^4)) + b^2*d)*sqrt(-((a^2 + b^2)*d^2*sqrt(-b^2/((a^4 
+ 2*a^2*b^2 + b^4)*d^4)) + a)/((a^2 + b^2)*d^2))) - 1/2*sqrt(((a^2 + b^2)* 
d^2*sqrt(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) - a)/((a^2 + b^2)*d^2))*log(s 
qrt(b*tan(d*x + c) + a)*b + ((a^3 + a*b^2)*d^3*sqrt(-b^2/((a^4 + 2*a^2*b^2 
 + b^4)*d^4)) - b^2*d)*sqrt(((a^2 + b^2)*d^2*sqrt(-b^2/((a^4 + 2*a^2*b^2 + 
 b^4)*d^4)) - a)/((a^2 + b^2)*d^2))) + 1/2*sqrt(((a^2 + b^2)*d^2*sqrt(-b^2 
/((a^4 + 2*a^2*b^2 + b^4)*d^4)) - a)/((a^2 + b^2)*d^2))*log(sqrt(b*tan(d*x 
 + c) + a)*b - ((a^3 + a*b^2)*d^3*sqrt(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) 
 - b^2*d)*sqrt(((a^2 + b^2)*d^2*sqrt(-b^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) - 
 a)/((a^2 + b^2)*d^2)))
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

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

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

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(b-a>0)', see `assume?` for more 
details)Is
 

Giac [F(-1)]

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

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

Output:

Timed out
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 2.41 (sec) , antiderivative size = 708, normalized size of antiderivative = 2.36 \[ \int \frac {1}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {\ln \left (16\,b^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+16\,b^3\,d\,\sqrt {-\frac {1}{d^2\,\left (a-b\,1{}\mathrm {i}\right )}}-\frac {16\,a\,b^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{a-b\,1{}\mathrm {i}}\right )\,\sqrt {-\frac {1}{a\,d^2-b\,d^2\,1{}\mathrm {i}}}}{2}-\ln \left (-16\,b^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+16\,b^3\,d\,\sqrt {-\frac {1}{d^2\,\left (a-b\,1{}\mathrm {i}\right )}}+\frac {16\,a\,b^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{a-b\,1{}\mathrm {i}}\right )\,\sqrt {-\frac {1}{4\,\left (a\,d^2-b\,d^2\,1{}\mathrm {i}\right )}}+2\,\mathrm {atanh}\left (\frac {32\,b^2\,\sqrt {-\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{-\frac {64\,a\,b^3\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {b^4\,d^2\,64{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}+\frac {a\,b^3\,\sqrt {-\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,128{}\mathrm {i}}{-\frac {256\,a^3\,b^3\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}-\frac {256\,a\,b^5\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {b^6\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a^2\,b^4\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}-\frac {128\,a^2\,b^2\,\sqrt {-\frac {a}{4\,a^2\,d^2+4\,b^2\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{-\frac {256\,a^3\,b^3\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}-\frac {256\,a\,b^5\,d^2}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {b^6\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}+\frac {a^2\,b^4\,d^2\,256{}\mathrm {i}}{4\,a^2\,d^3+4\,b^2\,d^3}}\right )\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{4\,a^2\,d^2+4\,b^2\,d^2}} \] Input:

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

Output:

(log(16*b^2*(a + b*tan(c + d*x))^(1/2) + 16*b^3*d*(-1/(d^2*(a - b*1i)))^(1 
/2) - (16*a*b^2*(a + b*tan(c + d*x))^(1/2))/(a - b*1i))*(-1/(a*d^2 - b*d^2 
*1i))^(1/2))/2 - log(16*b^3*d*(-1/(d^2*(a - b*1i)))^(1/2) - 16*b^2*(a + b* 
tan(c + d*x))^(1/2) + (16*a*b^2*(a + b*tan(c + d*x))^(1/2))/(a - b*1i))*(- 
1/(4*(a*d^2 - b*d^2*1i)))^(1/2) + 2*atanh((32*b^2*((b*1i)/(4*a^2*d^2 + 4*b 
^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^(1/2)*(a + b*tan(c + d*x))^(1/2))/((b 
^4*d^2*64i)/(4*a^2*d^3 + 4*b^2*d^3) - (64*a*b^3*d^2)/(4*a^2*d^3 + 4*b^2*d^ 
3)) + (a*b^3*((b*1i)/(4*a^2*d^2 + 4*b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^ 
(1/2)*(a + b*tan(c + d*x))^(1/2)*128i)/((b^6*d^2*256i)/(4*a^2*d^3 + 4*b^2* 
d^3) + (a^2*b^4*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) - (256*a^3*b^3*d^2)/(4*a 
^2*d^3 + 4*b^2*d^3) - (256*a*b^5*d^2)/(4*a^2*d^3 + 4*b^2*d^3)) - (128*a^2* 
b^2*((b*1i)/(4*a^2*d^2 + 4*b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^(1/2)*(a 
+ b*tan(c + d*x))^(1/2))/((b^6*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) + (a^2*b^ 
4*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) - (256*a^3*b^3*d^2)/(4*a^2*d^3 + 4*b^2 
*d^3) - (256*a*b^5*d^2)/(4*a^2*d^3 + 4*b^2*d^3)))*(-(a - b*1i)/(4*a^2*d^2 
+ 4*b^2*d^2))^(1/2)
 

Reduce [F]

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

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

Output:

(2*sqrt(tan(c + d*x)*b + a) - int((sqrt(tan(c + d*x)*b + a)*tan(c + d*x)** 
2)/(tan(c + d*x)*b + a),x)*b*d)/(b*d)