Integrand size = 22, antiderivative size = 47 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=2 a^2 \sqrt {x}+\frac {4 a b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d} \] Output:
2*a^2*x^(1/2)+4*a*b*arctanh(sin(c+d*x^(1/2)))/d+2*b^2*tan(c+d*x^(1/2))/d
Time = 0.19 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.96 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=\frac {2 \left (a^2 d \sqrt {x}+2 a b \coth ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )+b^2 \tan \left (c+d \sqrt {x}\right )\right )}{d} \] Input:
Integrate[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]
Output:
(2*(a^2*d*Sqrt[x] + 2*a*b*ArcCoth[Sin[c + d*Sqrt[x]]] + b^2*Tan[c + d*Sqrt [x]]))/d
Time = 0.35 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {4692, 3042, 4260, 3042, 4254, 24, 4257}
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 {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx\) |
\(\Big \downarrow \) 4692 |
\(\displaystyle 2 \int \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2d\sqrt {x}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 \int \left (a+b \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )\right )^2d\sqrt {x}\) |
\(\Big \downarrow \) 4260 |
\(\displaystyle 2 \left (2 a b \int \sec \left (c+d \sqrt {x}\right )d\sqrt {x}+b^2 \int \sec ^2\left (c+d \sqrt {x}\right )d\sqrt {x}+a^2 \sqrt {x}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 \left (2 a b \int \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )d\sqrt {x}+b^2 \int \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )^2d\sqrt {x}+a^2 \sqrt {x}\right )\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle 2 \left (2 a b \int \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )d\sqrt {x}-\frac {b^2 \int 1d\left (-\tan \left (c+d \sqrt {x}\right )\right )}{d}+a^2 \sqrt {x}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle 2 \left (2 a b \int \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )d\sqrt {x}+a^2 \sqrt {x}+\frac {b^2 \tan \left (c+d \sqrt {x}\right )}{d}\right )\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle 2 \left (a^2 \sqrt {x}+\frac {2 a b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {b^2 \tan \left (c+d \sqrt {x}\right )}{d}\right )\) |
Input:
Int[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]
Output:
2*(a^2*Sqrt[x] + (2*a*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d + (b^2*Tan[c + d*Sq rt[x]])/d)
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Simp[2*a*b Int[Csc[c + d*x], x], x] + Simp[b^2 Int[Csc[c + d*x]^2, x] , x]) /; FreeQ[{a, b, c, d}, x]
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.14 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.09
method | result | size |
parts | \(2 a^{2} \sqrt {x}+\frac {2 b^{2} \tan \left (c +d \sqrt {x}\right )}{d}+\frac {4 a b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}\) | \(51\) |
derivativedivides | \(\frac {2 a^{2} \left (c +d \sqrt {x}\right )+4 a b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )+2 b^{2} \tan \left (c +d \sqrt {x}\right )}{d}\) | \(52\) |
default | \(\frac {2 a^{2} \left (c +d \sqrt {x}\right )+4 a b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )+2 b^{2} \tan \left (c +d \sqrt {x}\right )}{d}\) | \(52\) |
Input:
int((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x,method=_RETURNVERBOSE)
Output:
2*a^2*x^(1/2)+2*b^2*tan(c+d*x^(1/2))/d+4*a*b/d*ln(sec(c+d*x^(1/2))+tan(c+d *x^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (41) = 82\).
Time = 0.10 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.94 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=\frac {2 \, {\left (a^{2} d \sqrt {x} \cos \left (d \sqrt {x} + c\right ) + a b \cos \left (d \sqrt {x} + c\right ) \log \left (\sin \left (d \sqrt {x} + c\right ) + 1\right ) - a b \cos \left (d \sqrt {x} + c\right ) \log \left (-\sin \left (d \sqrt {x} + c\right ) + 1\right ) + b^{2} \sin \left (d \sqrt {x} + c\right )\right )}}{d \cos \left (d \sqrt {x} + c\right )} \] Input:
integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="fricas")
Output:
2*(a^2*d*sqrt(x)*cos(d*sqrt(x) + c) + a*b*cos(d*sqrt(x) + c)*log(sin(d*sqr t(x) + c) + 1) - a*b*cos(d*sqrt(x) + c)*log(-sin(d*sqrt(x) + c) + 1) + b^2 *sin(d*sqrt(x) + c))/(d*cos(d*sqrt(x) + c))
Time = 9.04 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.87 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=\begin {cases} \frac {2 a^{2} \left (c + d \sqrt {x}\right ) + 4 a b \log {\left (\tan {\left (c + d \sqrt {x} \right )} + \sec {\left (c + d \sqrt {x} \right )} \right )} + 2 b^{2} \tan {\left (c + d \sqrt {x} \right )}}{d} & \text {for}\: d \neq 0 \\- \sqrt {x} \left (- 2 a^{2} - 4 a b \sec {\left (c \right )} - 2 b^{2} \sec ^{2}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sec(c+d*x**(1/2)))**2/x**(1/2),x)
Output:
Piecewise(((2*a**2*(c + d*sqrt(x)) + 4*a*b*log(tan(c + d*sqrt(x)) + sec(c + d*sqrt(x))) + 2*b**2*tan(c + d*sqrt(x)))/d, Ne(d, 0)), (-sqrt(x)*(-2*a** 2 - 4*a*b*sec(c) - 2*b**2*sec(c)**2), True))
Time = 0.03 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.06 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=2 \, a^{2} \sqrt {x} + \frac {4 \, a b \log \left (\sec \left (d \sqrt {x} + c\right ) + \tan \left (d \sqrt {x} + c\right )\right )}{d} + \frac {2 \, b^{2} \tan \left (d \sqrt {x} + c\right )}{d} \] Input:
integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="maxima")
Output:
2*a^2*sqrt(x) + 4*a*b*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c))/d + 2*b ^2*tan(d*sqrt(x) + c)/d
Leaf count of result is larger than twice the leaf count of optimal. 88 vs. \(2 (41) = 82\).
Time = 0.38 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.87 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=\frac {2 \, {\left ({\left (d \sqrt {x} + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, b^{2} \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )^{2} - 1}\right )}}{d} \] Input:
integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="giac")
Output:
2*((d*sqrt(x) + c)*a^2 + 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) + 1)) - 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) - 1)) - 2*b^2*tan(1/2*d*sqrt(x) + 1/2*c)/(tan(1/2*d*sqrt(x) + 1/2*c)^2 - 1))/d
Time = 16.87 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.32 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=2\,a^2\,\sqrt {x}+\frac {b^2\,4{}\mathrm {i}}{d\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,\sqrt {x}\,2{}\mathrm {i}}+1\right )}+\frac {4\,a\,b\,\ln \left (-\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d}-\frac {4\,a\,b\,\ln \left (\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d} \] Input:
int((a + b/cos(c + d*x^(1/2)))^2/x^(1/2),x)
Output:
2*a^2*x^(1/2) + (b^2*4i)/(d*(exp(c*2i + d*x^(1/2)*2i) + 1)) + (4*a*b*log(- (a*b*4i)/x^(1/2) - (4*a*b*exp(d*x^(1/2)*1i)*exp(c*1i))/x^(1/2)))/d - (4*a *b*log((a*b*4i)/x^(1/2) - (4*a*b*exp(d*x^(1/2)*1i)*exp(c*1i))/x^(1/2)))/d
Time = 0.16 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.87 \[ \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx=\frac {2 \sqrt {x}\, \cos \left (\sqrt {x}\, d +c \right ) a^{2} d -4 \cos \left (\sqrt {x}\, d +c \right ) \mathrm {log}\left (\tan \left (\frac {\sqrt {x}\, d}{2}+\frac {c}{2}\right )-1\right ) a b +4 \cos \left (\sqrt {x}\, d +c \right ) \mathrm {log}\left (\tan \left (\frac {\sqrt {x}\, d}{2}+\frac {c}{2}\right )+1\right ) a b +2 \sin \left (\sqrt {x}\, d +c \right ) b^{2}}{\cos \left (\sqrt {x}\, d +c \right ) d} \] Input:
int((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x)
Output:
(2*(sqrt(x)*cos(sqrt(x)*d + c)*a**2*d - 2*cos(sqrt(x)*d + c)*log(tan((sqrt (x)*d + c)/2) - 1)*a*b + 2*cos(sqrt(x)*d + c)*log(tan((sqrt(x)*d + c)/2) + 1)*a*b + sin(sqrt(x)*d + c)*b**2))/(cos(sqrt(x)*d + c)*d)