Integrand size = 21, antiderivative size = 86 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=-4 c d \sqrt {a+\frac {b}{x}}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+c^2 \sqrt {a+\frac {b}{x}} x+\frac {c (b c+4 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \] Output:
-4*c*d*(a+b/x)^(1/2)-2/3*d^2*(a+b/x)^(3/2)/b+c^2*(a+b/x)^(1/2)*x+c*(4*a*d+ b*c)*arctanh((a+b/x)^(1/2)/a^(1/2))/a^(1/2)
Time = 0.30 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.98 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {\sqrt {a+\frac {b}{x}} \left (-2 a d^2 x+b \left (-2 d^2-12 c d x+3 c^2 x^2\right )\right )}{3 b x}+\frac {c (b c+4 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \] Input:
Integrate[Sqrt[a + b/x]*(c + d/x)^2,x]
Output:
(Sqrt[a + b/x]*(-2*a*d^2*x + b*(-2*d^2 - 12*c*d*x + 3*c^2*x^2)))/(3*b*x) + (c*(b*c + 4*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]
Time = 0.38 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.15, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {899, 100, 27, 90, 60, 73, 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 \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx\) |
\(\Big \downarrow \) 899 |
\(\displaystyle -\int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x^2d\frac {1}{x}\) |
\(\Big \downarrow \) 100 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {\int \frac {1}{2} \sqrt {a+\frac {b}{x}} \left (\frac {2 a d^2}{x}+c (b c+4 a d)\right ) xd\frac {1}{x}}{a}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {\int \sqrt {a+\frac {b}{x}} \left (\frac {2 a d^2}{x}+c (b c+4 a d)\right ) xd\frac {1}{x}}{2 a}\) |
\(\Big \downarrow \) 90 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {c (4 a d+b c) \int \sqrt {a+\frac {b}{x}} xd\frac {1}{x}+\frac {4 a d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}}{2 a}\) |
\(\Big \downarrow \) 60 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {c (4 a d+b c) \left (a \int \frac {x}{\sqrt {a+\frac {b}{x}}}d\frac {1}{x}+2 \sqrt {a+\frac {b}{x}}\right )+\frac {4 a d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}}{2 a}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {c (4 a d+b c) \left (\frac {2 a \int \frac {1}{\frac {1}{b x^2}-\frac {a}{b}}d\sqrt {a+\frac {b}{x}}}{b}+2 \sqrt {a+\frac {b}{x}}\right )+\frac {4 a d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}}{2 a}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {c \left (2 \sqrt {a+\frac {b}{x}}-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )\right ) (4 a d+b c)+\frac {4 a d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}}{2 a}\) |
Input:
Int[Sqrt[a + b/x]*(c + d/x)^2,x]
Output:
(c^2*(a + b/x)^(3/2)*x)/a - ((4*a*d^2*(a + b/x)^(3/2))/(3*b) + c*(b*c + 4* a*d)*(2*Sqrt[a + b/x] - 2*Sqrt[a]*ArcTanh[Sqrt[a + b/x]/Sqrt[a]]))/(2*a)
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_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( b*(m + n + 1))) Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] && !(IGtQ[m, 0] && ( !Integer Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) && !ILtQ[m + n + 2, 0] && IntLinear Q[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p _.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p + 2)) Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0]
Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^( p_), x_] :> Simp[(b*c - a*d)^2*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d^2*(d *e - c*f)*(n + 1))), x] - Simp[1/(d^2*(d*e - c*f)*(n + 1)) Int[(c + d*x)^ (n + 1)*(e + f*x)^p*Simp[a^2*d^2*f*(n + p + 2) + b^2*c*(d*e*(n + 1) + c*f*( p + 1)) - 2*a*b*d*(d*e*(n + 1) + c*f*(p + 1)) - b^2*d*(d*e - c*f)*(n + 1)*x , x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && (LtQ[n, -1] || (EqQ[n + p + 3, 0] && NeQ[n, -1] && (SumSimplerQ[n, 1] || !SumSimplerQ[p, 1])))
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_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol ] :> -Subst[Int[(a + b/x^n)^p*((c + d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]
Time = 0.20 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.34
method | result | size |
risch | \(-\frac {\left (-3 b \,c^{2} x^{2}+2 x a \,d^{2}+12 b c d x +2 b \,d^{2}\right ) \sqrt {\frac {a x +b}{x}}}{3 x b}+\frac {\left (4 a d +b c \right ) c \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) \sqrt {\frac {a x +b}{x}}\, \sqrt {x \left (a x +b \right )}}{2 \sqrt {a}\, \left (a x +b \right )}\) | \(115\) |
default | \(\frac {\sqrt {\frac {a x +b}{x}}\, \left (12 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b c d \,x^{3}+3 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{2} c^{2} x^{3}+24 a^{\frac {3}{2}} \sqrt {a \,x^{2}+b x}\, c d \,x^{3}+6 \sqrt {a}\, \sqrt {a \,x^{2}+b x}\, b \,c^{2} x^{3}-24 \sqrt {a}\, \left (a \,x^{2}+b x \right )^{\frac {3}{2}} c d x -4 d^{2} \left (a \,x^{2}+b x \right )^{\frac {3}{2}} \sqrt {a}\right )}{6 x^{2} \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b}\) | \(191\) |
Input:
int((a+b/x)^(1/2)*(c+1/x*d)^2,x,method=_RETURNVERBOSE)
Output:
-1/3*(-3*b*c^2*x^2+2*a*d^2*x+12*b*c*d*x+2*b*d^2)/x/b*((a*x+b)/x)^(1/2)+1/2 *(4*a*d+b*c)*c*ln((1/2*b+a*x)/a^(1/2)+(a*x^2+b*x)^(1/2))/a^(1/2)*((a*x+b)/ x)^(1/2)*(x*(a*x+b))^(1/2)/(a*x+b)
Time = 0.10 (sec) , antiderivative size = 213, normalized size of antiderivative = 2.48 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\left [\frac {3 \, {\left (b^{2} c^{2} + 4 \, a b c d\right )} \sqrt {a} x \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, {\left (3 \, a b c^{2} x^{2} - 2 \, a b d^{2} - 2 \, {\left (6 \, a b c d + a^{2} d^{2}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{6 \, a b x}, -\frac {3 \, {\left (b^{2} c^{2} + 4 \, a b c d\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {-a} x \sqrt {\frac {a x + b}{x}}}{a x + b}\right ) - {\left (3 \, a b c^{2} x^{2} - 2 \, a b d^{2} - 2 \, {\left (6 \, a b c d + a^{2} d^{2}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{3 \, a b x}\right ] \] Input:
integrate((a+b/x)^(1/2)*(c+d/x)^2,x, algorithm="fricas")
Output:
[1/6*(3*(b^2*c^2 + 4*a*b*c*d)*sqrt(a)*x*log(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b) + 2*(3*a*b*c^2*x^2 - 2*a*b*d^2 - 2*(6*a*b*c*d + a^2*d^2)*x)*s qrt((a*x + b)/x))/(a*b*x), -1/3*(3*(b^2*c^2 + 4*a*b*c*d)*sqrt(-a)*x*arctan (sqrt(-a)*x*sqrt((a*x + b)/x)/(a*x + b)) - (3*a*b*c^2*x^2 - 2*a*b*d^2 - 2* (6*a*b*c*d + a^2*d^2)*x)*sqrt((a*x + b)/x))/(a*b*x)]
Time = 13.70 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.50 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\sqrt {b} c^{2} \sqrt {x} \sqrt {\frac {a x}{b} + 1} - 2 c d \left (\begin {cases} \frac {2 a \operatorname {atan}{\left (\frac {\sqrt {a + \frac {b}{x}}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 \sqrt {a + \frac {b}{x}} & \text {for}\: b \neq 0 \\- \sqrt {a} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) + d^{2} \left (\begin {cases} - \frac {\sqrt {a}}{x} & \text {for}\: b = 0 \\- \frac {2 \left (a + \frac {b}{x}\right )^{\frac {3}{2}}}{3 b} & \text {otherwise} \end {cases}\right ) + \frac {b c^{2} \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{\sqrt {a}} \] Input:
integrate((a+b/x)**(1/2)*(c+d/x)**2,x)
Output:
sqrt(b)*c**2*sqrt(x)*sqrt(a*x/b + 1) - 2*c*d*Piecewise((2*a*atan(sqrt(a + b/x)/sqrt(-a))/sqrt(-a) + 2*sqrt(a + b/x), Ne(b, 0)), (-sqrt(a)*log(x), Tr ue)) + d**2*Piecewise((-sqrt(a)/x, Eq(b, 0)), (-2*(a + b/x)**(3/2)/(3*b), True)) + b*c**2*asinh(sqrt(a)*sqrt(x)/sqrt(b))/sqrt(a)
Time = 0.12 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.47 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {1}{2} \, {\left (2 \, \sqrt {a + \frac {b}{x}} x - \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}}\right )} c^{2} - 2 \, {\left (\sqrt {a} \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right ) + 2 \, \sqrt {a + \frac {b}{x}}\right )} c d - \frac {2 \, {\left (a + \frac {b}{x}\right )}^{\frac {3}{2}} d^{2}}{3 \, b} \] Input:
integrate((a+b/x)^(1/2)*(c+d/x)^2,x, algorithm="maxima")
Output:
1/2*(2*sqrt(a + b/x)*x - b*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a)))/sqrt(a))*c^2 - 2*(sqrt(a)*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a))) + 2*sqrt(a + b/x))*c*d - 2/3*(a + b/x)^(3/2)*d^2/b
Exception generated. \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\text {Exception raised: TypeError} \] Input:
integrate((a+b/x)^(1/2)*(c+d/x)^2,x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Limit: Max order reached or unable to make series expansion Error: Bad Argument Value
Time = 1.34 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.15 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\left (\frac {4\,a\,d^2-4\,b\,c\,d}{b}-\frac {4\,a\,d^2}{b}\right )\,\sqrt {a+\frac {b}{x}}+c^2\,x\,\sqrt {a+\frac {b}{x}}-\frac {2\,d^2\,{\left (a+\frac {b}{x}\right )}^{3/2}}{3\,b}-\frac {c\,\mathrm {atan}\left (\frac {\sqrt {a+\frac {b}{x}}\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\left (4\,a\,d+b\,c\right )\,1{}\mathrm {i}}{\sqrt {a}} \] Input:
int((a + b/x)^(1/2)*(c + d/x)^2,x)
Output:
((4*a*d^2 - 4*b*c*d)/b - (4*a*d^2)/b)*(a + b/x)^(1/2) + c^2*x*(a + b/x)^(1 /2) - (2*d^2*(a + b/x)^(3/2))/(3*b) - (c*atan(((a + b/x)^(1/2)*1i)/a^(1/2) )*(4*a*d + b*c)*1i)/a^(1/2)
Time = 0.23 (sec) , antiderivative size = 173, normalized size of antiderivative = 2.01 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {-4 \sqrt {x}\, \sqrt {a x +b}\, a^{2} d^{2} x +6 \sqrt {x}\, \sqrt {a x +b}\, a b \,c^{2} x^{2}-24 \sqrt {x}\, \sqrt {a x +b}\, a b c d x -4 \sqrt {x}\, \sqrt {a x +b}\, a b \,d^{2}+24 \sqrt {a}\, \mathrm {log}\left (\frac {\sqrt {a x +b}+\sqrt {x}\, \sqrt {a}}{\sqrt {b}}\right ) a b c d \,x^{2}+6 \sqrt {a}\, \mathrm {log}\left (\frac {\sqrt {a x +b}+\sqrt {x}\, \sqrt {a}}{\sqrt {b}}\right ) b^{2} c^{2} x^{2}-4 \sqrt {a}\, a^{2} d^{2} x^{2}+8 \sqrt {a}\, a b c d \,x^{2}+\sqrt {a}\, b^{2} c^{2} x^{2}}{6 a b \,x^{2}} \] Input:
int((a+b/x)^(1/2)*(c+d/x)^2,x)
Output:
( - 4*sqrt(x)*sqrt(a*x + b)*a**2*d**2*x + 6*sqrt(x)*sqrt(a*x + b)*a*b*c**2 *x**2 - 24*sqrt(x)*sqrt(a*x + b)*a*b*c*d*x - 4*sqrt(x)*sqrt(a*x + b)*a*b*d **2 + 24*sqrt(a)*log((sqrt(a*x + b) + sqrt(x)*sqrt(a))/sqrt(b))*a*b*c*d*x* *2 + 6*sqrt(a)*log((sqrt(a*x + b) + sqrt(x)*sqrt(a))/sqrt(b))*b**2*c**2*x* *2 - 4*sqrt(a)*a**2*d**2*x**2 + 8*sqrt(a)*a*b*c*d*x**2 + sqrt(a)*b**2*c**2 *x**2)/(6*a*b*x**2)