Integrand size = 29, antiderivative size = 78 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}+\frac {(A b-a B) (a+b x) \log \left (\frac {b (a+b x)}{x}\right )}{a^2 \sqrt {a^2+2 a b x+b^2 x^2}} \] Output:
-A*((b*x+a)^2)^(1/2)/a^2/x+(A*b-B*a)*(b*x+a)*ln(b*(b*x+a)/x)/a^2/((b*x+a)^ 2)^(1/2)
Time = 0.52 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.88 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {a^2 A-\sqrt {a^2} A \sqrt {(a+b x)^2}+2 a (A b-a B) x \log (x)-\left (-a+\sqrt {a^2}\right ) (-A b+a B) x \log \left (\sqrt {a^2}-b x-\sqrt {(a+b x)^2}\right )+\left (a+\sqrt {a^2}\right ) (-A b+a B) x \log \left (\sqrt {a^2}+b x-\sqrt {(a+b x)^2}\right )}{2 \left (a^2\right )^{3/2} x} \] Input:
Integrate[(A + B*x)/(x^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]
Output:
(a^2*A - Sqrt[a^2]*A*Sqrt[(a + b*x)^2] + 2*a*(A*b - a*B)*x*Log[x] - (-a + Sqrt[a^2])*(-(A*b) + a*B)*x*Log[Sqrt[a^2] - b*x - Sqrt[(a + b*x)^2]] + (a + Sqrt[a^2])*(-(A*b) + a*B)*x*Log[Sqrt[a^2] + b*x - Sqrt[(a + b*x)^2]])/(2 *(a^2)^(3/2)*x)
Time = 0.38 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {1186, 1102, 27, 47, 14, 16}
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 {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx\) |
\(\Big \downarrow \) 1186 |
\(\displaystyle -\frac {(A b-a B) \int \frac {1}{x \sqrt {a^2+2 b x a+b^2 x^2}}dx}{a}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
\(\Big \downarrow \) 1102 |
\(\displaystyle -\frac {b (a+b x) (A b-a B) \int \frac {1}{b x (a+b x)}dx}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {(a+b x) (A b-a B) \int \frac {1}{x (a+b x)}dx}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
\(\Big \downarrow \) 47 |
\(\displaystyle -\frac {(a+b x) (A b-a B) \left (\frac {\int \frac {1}{x}dx}{a}-\frac {b \int \frac {1}{a+b x}dx}{a}\right )}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
\(\Big \downarrow \) 14 |
\(\displaystyle -\frac {(a+b x) (A b-a B) \left (\frac {\log (x)}{a}-\frac {b \int \frac {1}{a+b x}dx}{a}\right )}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle -\frac {(a+b x) (A b-a B) \left (\frac {\log (x)}{a}-\frac {\log (a+b x)}{a}\right )}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A \sqrt {a^2+2 a b x+b^2 x^2}}{a^2 x}\) |
Input:
Int[(A + B*x)/(x^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]
Output:
-((A*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(a^2*x)) - ((A*b - a*B)*(a + b*x)*(Log [x]/a - Log[a + b*x]/a))/(a*Sqrt[a^2 + 2*a*b*x + b^2*x^2])
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Simp[b/(b*c - a*d) Int[1/(a + b*x), x], x] - Simp[d/(b*c - a*d) Int[1/(c + d*x), x ], x] /; FreeQ[{a, b, c, d}, x]
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> Simp[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*F racPart[p])) Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0]
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_), x_Symbol] :> Simp[-2*c*(e*f - d*g)*(d + e*x)^(m + 1)*((a + b*x + c*x^2)^(p + 1)/((p + 1)*(2*c*d - b*e)^2)), x] + Simp[(2*c*f - b*g)/ (2*c*d - b*e) Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[ {a, b, c, d, e, f, g, m, p}, x] && EqQ[b^2 - 4*a*c, 0] && EqQ[m + 2*p + 3, 0] && NeQ[2*c*f - b*g, 0] && NeQ[2*c*d - b*e, 0]
Time = 0.79 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.78
method | result | size |
default | \(\frac {\left (b x +a \right ) \left (A \ln \left (b x +a \right ) x b -A \ln \left (x \right ) x b -B \ln \left (b x +a \right ) a x +B \ln \left (x \right ) a x -A a \right )}{\sqrt {\left (b x +a \right )^{2}}\, a^{2} x}\) | \(61\) |
risch | \(-\frac {\sqrt {\left (b x +a \right )^{2}}\, A}{\left (b x +a \right ) a x}-\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A b -B a \right ) \ln \left (x \right )}{\left (b x +a \right ) a^{2}}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A b -B a \right ) \ln \left (-b x -a \right )}{\left (b x +a \right ) a^{2}}\) | \(95\) |
Input:
int((B*x+A)/x^2/((b*x+a)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
(b*x+a)*(A*ln(b*x+a)*x*b-A*ln(x)*x*b-B*ln(b*x+a)*a*x+B*ln(x)*a*x-A*a)/((b* x+a)^2)^(1/2)/a^2/x
Time = 0.07 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.53 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=-\frac {{\left (B a - A b\right )} x \log \left (b x + a\right ) - {\left (B a - A b\right )} x \log \left (x\right ) + A a}{a^{2} x} \] Input:
integrate((B*x+A)/x^2/((b*x+a)^2)^(1/2),x, algorithm="fricas")
Output:
-((B*a - A*b)*x*log(b*x + a) - (B*a - A*b)*x*log(x) + A*a)/(a^2*x)
\[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\int \frac {A + B x}{x^{2} \sqrt {\left (a + b x\right )^{2}}}\, dx \] Input:
integrate((B*x+A)/x**2/((b*x+a)**2)**(1/2),x)
Output:
Integral((A + B*x)/(x**2*sqrt((a + b*x)**2)), x)
Time = 0.03 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.36 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=-\frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} B \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a} + \frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} A b \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a^{2}} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{a^{2} x} \] Input:
integrate((B*x+A)/x^2/((b*x+a)^2)^(1/2),x, algorithm="maxima")
Output:
-(-1)^(2*a*b*x + 2*a^2)*B*log(2*a*b*x/abs(x) + 2*a^2/abs(x))/a + (-1)^(2*a *b*x + 2*a^2)*A*b*log(2*a*b*x/abs(x) + 2*a^2/abs(x))/a^2 - sqrt(b^2*x^2 + 2*a*b*x + a^2)*A/(a^2*x)
Time = 0.23 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.04 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {{\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | x \right |}\right )}{a^{2}} - \frac {A \mathrm {sgn}\left (b x + a\right )}{a x} - \frac {{\left (B a b \mathrm {sgn}\left (b x + a\right ) - A b^{2} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a^{2} b} \] Input:
integrate((B*x+A)/x^2/((b*x+a)^2)^(1/2),x, algorithm="giac")
Output:
(B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*log(abs(x))/a^2 - A*sgn(b*x + a)/(a* x) - (B*a*b*sgn(b*x + a) - A*b^2*sgn(b*x + a))*log(abs(b*x + a))/(a^2*b)
Time = 11.10 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.50 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {A\,a\,b\,\mathrm {atanh}\left (\frac {a^2+b\,x\,a}{\sqrt {a^2}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}\right )}{{\left (a^2\right )}^{3/2}}-\frac {A\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{a^2\,x}-\frac {B\,\ln \left (a\,b+\frac {a^2}{x}+\frac {\sqrt {a^2}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{x}\right )}{\sqrt {a^2}} \] Input:
int((A + B*x)/(x^2*((a + b*x)^2)^(1/2)),x)
Output:
(A*a*b*atanh((a^2 + a*b*x)/((a^2)^(1/2)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2)))) /(a^2)^(3/2) - (A*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/(a^2*x) - (B*log(a*b + a^2/x + ((a^2)^(1/2)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/x))/(a^2)^(1/2)
Time = 0.30 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.06 \[ \int \frac {A+B x}{x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx=-\frac {1}{x} \] Input:
int((B*x+A)/x^2/((b*x+a)^2)^(1/2),x)
Output:
( - 1)/x