Integrand size = 22, antiderivative size = 68 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \sqrt {x}}{a}-\frac {4 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d} \] Output:
2*x^(1/2)/a-4*b*arctanh((a-b)^(1/2)*tan(1/2*c+1/2*d*x^(1/2))/(a+b)^(1/2))/ a/(a-b)^(1/2)/(a+b)^(1/2)/d
Time = 0.23 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.01 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \left (\frac {c}{d}+\sqrt {x}+\frac {2 b \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} d}\right )}{a} \] Input:
Integrate[1/(Sqrt[x]*(a + b*Sec[c + d*Sqrt[x]])),x]
Output:
(2*(c/d + Sqrt[x] + (2*b*ArcTanh[((-a + b)*Tan[(c + d*Sqrt[x])/2])/Sqrt[a^ 2 - b^2]])/(Sqrt[a^2 - b^2]*d)))/a
Time = 0.33 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.01, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4692, 3042, 4270, 3042, 3138, 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 {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx\) |
\(\Big \downarrow \) 4692 |
\(\displaystyle 2 \int \frac {1}{a+b \sec \left (c+d \sqrt {x}\right )}d\sqrt {x}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 \int \frac {1}{a+b \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )}d\sqrt {x}\) |
\(\Big \downarrow \) 4270 |
\(\displaystyle 2 \left (\frac {\sqrt {x}}{a}-\frac {\int \frac {1}{\frac {a \cos \left (c+d \sqrt {x}\right )}{b}+1}d\sqrt {x}}{a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 \left (\frac {\sqrt {x}}{a}-\frac {\int \frac {1}{\frac {a \sin \left (c+d \sqrt {x}+\frac {\pi }{2}\right )}{b}+1}d\sqrt {x}}{a}\right )\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle 2 \left (\frac {\sqrt {x}}{a}-\frac {2 \int \frac {1}{\frac {a+b}{b}+\left (1-\frac {a}{b}\right ) x}d\tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{a d}\right )\) |
\(\Big \downarrow \) 221 |
\(\displaystyle 2 \left (\frac {\sqrt {x}}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )\) |
Input:
Int[1/(Sqrt[x]*(a + b*Sec[c + d*Sqrt[x]])),x]
Output:
2*(Sqrt[x]/a - (2*b*ArcTanh[(Sqrt[a - b]*Tan[(c + d*Sqrt[x])/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d))
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]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Simp[1/a Int[1/(1 + (a/b)*Sin[c + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol ] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^ p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 1)/n], 0] && IntegerQ[p]
Time = 0.13 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {-\frac {4 b \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {4 \arctan \left (\tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )\right )}{a}}{d}\) | \(70\) |
default | \(\frac {-\frac {4 b \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {4 \arctan \left (\tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )\right )}{a}}{d}\) | \(70\) |
Input:
int(1/x^(1/2)/(a+b*sec(c+d*x^(1/2))),x,method=_RETURNVERBOSE)
Output:
2/d*(-2*b/a/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*c+1/2*d*x^(1/2))/((a -b)*(a+b))^(1/2))+2/a*arctan(tan(1/2*c+1/2*d*x^(1/2))))
Time = 0.10 (sec) , antiderivative size = 274, normalized size of antiderivative = 4.03 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\left [\frac {2 \, {\left (a^{2} - b^{2}\right )} d \sqrt {x} + \sqrt {a^{2} - b^{2}} b \log \left (\frac {2 \, a b \cos \left (d \sqrt {x} + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d \sqrt {x} + c\right )^{2} + 2 \, a^{2} - b^{2} - 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d \sqrt {x} + c\right ) + \sqrt {a^{2} - b^{2}} a\right )} \sin \left (d \sqrt {x} + c\right )}{a^{2} \cos \left (d \sqrt {x} + c\right )^{2} + 2 \, a b \cos \left (d \sqrt {x} + c\right ) + b^{2}}\right )}{{\left (a^{3} - a b^{2}\right )} d}, \frac {2 \, {\left ({\left (a^{2} - b^{2}\right )} d \sqrt {x} - \sqrt {-a^{2} + b^{2}} b \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \cos \left (d \sqrt {x} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \sin \left (d \sqrt {x} + c\right )}\right )\right )}}{{\left (a^{3} - a b^{2}\right )} d}\right ] \] Input:
integrate(1/x^(1/2)/(a+b*sec(c+d*x^(1/2))),x, algorithm="fricas")
Output:
[(2*(a^2 - b^2)*d*sqrt(x) + sqrt(a^2 - b^2)*b*log((2*a*b*cos(d*sqrt(x) + c ) - (a^2 - 2*b^2)*cos(d*sqrt(x) + c)^2 + 2*a^2 - b^2 - 2*(sqrt(a^2 - b^2)* b*cos(d*sqrt(x) + c) + sqrt(a^2 - b^2)*a)*sin(d*sqrt(x) + c))/(a^2*cos(d*s qrt(x) + c)^2 + 2*a*b*cos(d*sqrt(x) + c) + b^2)))/((a^3 - a*b^2)*d), 2*((a ^2 - b^2)*d*sqrt(x) - sqrt(-a^2 + b^2)*b*arctan(-(sqrt(-a^2 + b^2)*b*cos(d *sqrt(x) + c) + sqrt(-a^2 + b^2)*a)/((a^2 - b^2)*sin(d*sqrt(x) + c))))/((a ^3 - a*b^2)*d)]
\[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\int \frac {1}{\sqrt {x} \left (a + b \sec {\left (c + d \sqrt {x} \right )}\right )}\, dx \] Input:
integrate(1/x**(1/2)/(a+b*sec(c+d*x**(1/2))),x)
Output:
Integral(1/(sqrt(x)*(a + b*sec(c + d*sqrt(x)))), x)
Exception generated. \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(1/x^(1/2)/(a+b*sec(c+d*x^(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(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 278 vs. \(2 (55) = 110\).
Time = 0.43 (sec) , antiderivative size = 278, normalized size of antiderivative = 4.09 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \, {\left (\sqrt {-a^{2} + b^{2}} {\left (a - 2 \, b\right )} d {\left | -a + b \right |} - \sqrt {-a^{2} + b^{2}} {\left | a \right |} {\left | -a + b \right |} {\left | d \right |}\right )} {\left (\pi \left \lfloor \frac {d \sqrt {x} + c}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\sqrt {-\frac {b d + \sqrt {b^{2} d^{2} + {\left (a d + b d\right )} {\left (a d - b d\right )}}}{a d - b d}}}\right )\right )}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} a^{2} d^{2} + {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} d {\left | a \right |} {\left | d \right |}} + \frac {2 \, {\left (a d - 2 \, b d + {\left | a \right |} {\left | d \right |}\right )} {\left (\pi \left \lfloor \frac {d \sqrt {x} + c}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\sqrt {-\frac {b d - \sqrt {b^{2} d^{2} + {\left (a d + b d\right )} {\left (a d - b d\right )}}}{a d - b d}}}\right )\right )}}{a^{2} d^{2} - b d {\left | a \right |} {\left | d \right |}} \] Input:
integrate(1/x^(1/2)/(a+b*sec(c+d*x^(1/2))),x, algorithm="giac")
Output:
2*(sqrt(-a^2 + b^2)*(a - 2*b)*d*abs(-a + b) - sqrt(-a^2 + b^2)*abs(a)*abs( -a + b)*abs(d))*(pi*floor(1/2*(d*sqrt(x) + c)/pi + 1/2) + arctan(tan(1/2*d *sqrt(x) + 1/2*c)/sqrt(-(b*d + sqrt(b^2*d^2 + (a*d + b*d)*(a*d - b*d)))/(a *d - b*d))))/((a^2 - 2*a*b + b^2)*a^2*d^2 + (a^2*b - 2*a*b^2 + b^3)*d*abs( a)*abs(d)) + 2*(a*d - 2*b*d + abs(a)*abs(d))*(pi*floor(1/2*(d*sqrt(x) + c) /pi + 1/2) + arctan(tan(1/2*d*sqrt(x) + 1/2*c)/sqrt(-(b*d - sqrt(b^2*d^2 + (a*d + b*d)*(a*d - b*d)))/(a*d - b*d))))/(a^2*d^2 - b*d*abs(a)*abs(d))
Time = 17.85 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.25 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2\,\sqrt {x}}{a}+\frac {2\,b\,\ln \left (2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}-\frac {b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {a-b}}-\frac {2\,b\,\ln \left (2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}+\frac {b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {a-b}} \] Input:
int(1/(x^(1/2)*(a + b/cos(c + d*x^(1/2)))),x)
Output:
(2*x^(1/2))/a + (2*b*log(2*b*exp(d*x^(1/2)*1i)*exp(c*1i) - (b*(a + b*exp(d *x^(1/2)*1i)*exp(c*1i))*2i)/((a + b)^(1/2)*(a - b)^(1/2))))/(a*d*(a + b)^( 1/2)*(a - b)^(1/2)) - (2*b*log(2*b*exp(d*x^(1/2)*1i)*exp(c*1i) + (b*(a + b *exp(d*x^(1/2)*1i)*exp(c*1i))*2i)/((a + b)^(1/2)*(a - b)^(1/2))))/(a*d*(a + b)^(1/2)*(a - b)^(1/2))
Time = 0.17 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.29 \[ \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx=\frac {-4 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {\sqrt {x}\, d}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {\sqrt {x}\, d}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) b +2 \sqrt {x}\, a^{2} d -2 \sqrt {x}\, b^{2} d}{a d \left (a^{2}-b^{2}\right )} \] Input:
int(1/x^(1/2)/(a+b*sec(c+d*x^(1/2))),x)
Output:
(2*( - 2*sqrt( - a**2 + b**2)*atan((tan((sqrt(x)*d + c)/2)*a - tan((sqrt(x )*d + c)/2)*b)/sqrt( - a**2 + b**2))*b + sqrt(x)*a**2*d - sqrt(x)*b**2*d)) /(a*d*(a**2 - b**2))