Integrand size = 29, antiderivative size = 63 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {(A b-a B) \sqrt {x}}{a b (a+b x)}+\frac {(A b+a B) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}} \] Output:
(A*b-B*a)*x^(1/2)/a/b/(b*x+a)+(A*b+B*a)*arctan(b^(1/2)*x^(1/2)/a^(1/2))/a^ (3/2)/b^(3/2)
Time = 0.13 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.02 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {(-A b+a B) \sqrt {x}}{a b (a+b x)}+\frac {(A b+a B) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}} \] Input:
Integrate[(A + B*x)/(Sqrt[x]*(a^2 + 2*a*b*x + b^2*x^2)),x]
Output:
-(((-(A*b) + a*B)*Sqrt[x])/(a*b*(a + b*x))) + ((A*b + a*B)*ArcTan[(Sqrt[b] *Sqrt[x])/Sqrt[a]])/(a^(3/2)*b^(3/2))
Time = 0.32 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1184, 27, 87, 73, 218}
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}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx\) |
\(\Big \downarrow \) 1184 |
\(\displaystyle b^2 \int \frac {A+B x}{b^2 \sqrt {x} (a+b x)^2}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {A+B x}{\sqrt {x} (a+b x)^2}dx\) |
\(\Big \downarrow \) 87 |
\(\displaystyle \frac {(a B+A b) \int \frac {1}{\sqrt {x} (a+b x)}dx}{2 a b}+\frac {\sqrt {x} (A b-a B)}{a b (a+b x)}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {(a B+A b) \int \frac {1}{a+b x}d\sqrt {x}}{a b}+\frac {\sqrt {x} (A b-a B)}{a b (a+b x)}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {(a B+A b) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}}+\frac {\sqrt {x} (A b-a B)}{a b (a+b x)}\) |
Input:
Int[(A + B*x)/(Sqrt[x]*(a^2 + 2*a*b*x + b^2*x^2)),x]
Output:
((A*b - a*B)*Sqrt[x])/(a*b*(a + b*x)) + ((A*b + a*B)*ArcTan[(Sqrt[b]*Sqrt[ x])/Sqrt[a]])/(a^(3/2)*b^(3/2))
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] :> 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*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)) Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege rQ[p] || !(IntegerQ[n] || !(EqQ[e, 0] || !(EqQ[c, 0] || LtQ[p, n]))))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[1/c^p Int[(d + e*x)^m*(f + g*x )^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && E qQ[b^2 - 4*a*c, 0] && IntegerQ[p]
Time = 1.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(\frac {\left (A b -B a \right ) \sqrt {x}}{a b \left (b x +a \right )}+\frac {\left (A b +B a \right ) \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{a b \sqrt {a b}}\) | \(57\) |
default | \(\frac {\left (A b -B a \right ) \sqrt {x}}{a b \left (b x +a \right )}+\frac {\left (A b +B a \right ) \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{a b \sqrt {a b}}\) | \(57\) |
Input:
int((B*x+A)/x^(1/2)/(b^2*x^2+2*a*b*x+a^2),x,method=_RETURNVERBOSE)
Output:
(A*b-B*a)*x^(1/2)/a/b/(b*x+a)+(A*b+B*a)/a/b/(a*b)^(1/2)*arctan(b*x^(1/2)/( a*b)^(1/2))
Time = 0.08 (sec) , antiderivative size = 177, normalized size of antiderivative = 2.81 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\left [-\frac {{\left (B a^{2} + A a b + {\left (B a b + A b^{2}\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x - a - 2 \, \sqrt {-a b} \sqrt {x}}{b x + a}\right ) + 2 \, {\left (B a^{2} b - A a b^{2}\right )} \sqrt {x}}{2 \, {\left (a^{2} b^{3} x + a^{3} b^{2}\right )}}, -\frac {{\left (B a^{2} + A a b + {\left (B a b + A b^{2}\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b}}{b \sqrt {x}}\right ) + {\left (B a^{2} b - A a b^{2}\right )} \sqrt {x}}{a^{2} b^{3} x + a^{3} b^{2}}\right ] \] Input:
integrate((B*x+A)/x^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")
Output:
[-1/2*((B*a^2 + A*a*b + (B*a*b + A*b^2)*x)*sqrt(-a*b)*log((b*x - a - 2*sqr t(-a*b)*sqrt(x))/(b*x + a)) + 2*(B*a^2*b - A*a*b^2)*sqrt(x))/(a^2*b^3*x + a^3*b^2), -((B*a^2 + A*a*b + (B*a*b + A*b^2)*x)*sqrt(a*b)*arctan(sqrt(a*b) /(b*sqrt(x))) + (B*a^2*b - A*a*b^2)*sqrt(x))/(a^2*b^3*x + a^3*b^2)]
Leaf count of result is larger than twice the leaf count of optimal. 615 vs. \(2 (53) = 106\).
Time = 2.64 (sec) , antiderivative size = 615, normalized size of antiderivative = 9.76 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {2 A}{3 x^{\frac {3}{2}}} - \frac {2 B}{\sqrt {x}}\right ) & \text {for}\: a = 0 \wedge b = 0 \\\frac {2 A \sqrt {x} + \frac {2 B x^{\frac {3}{2}}}{3}}{a^{2}} & \text {for}\: b = 0 \\\frac {- \frac {2 A}{3 x^{\frac {3}{2}}} - \frac {2 B}{\sqrt {x}}}{b^{2}} & \text {for}\: a = 0 \\\frac {A a b \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} - \frac {A a b \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} + \frac {2 A b^{2} \sqrt {x} \sqrt {- \frac {a}{b}}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} + \frac {A b^{2} x \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} - \frac {A b^{2} x \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} + \frac {B a^{2} \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} - \frac {B a^{2} \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} - \frac {2 B a b \sqrt {x} \sqrt {- \frac {a}{b}}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} + \frac {B a b x \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} - \frac {B a b x \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{2 a^{2} b^{2} \sqrt {- \frac {a}{b}} + 2 a b^{3} x \sqrt {- \frac {a}{b}}} & \text {otherwise} \end {cases} \] Input:
integrate((B*x+A)/x**(1/2)/(b**2*x**2+2*a*b*x+a**2),x)
Output:
Piecewise((zoo*(-2*A/(3*x**(3/2)) - 2*B/sqrt(x)), Eq(a, 0) & Eq(b, 0)), (( 2*A*sqrt(x) + 2*B*x**(3/2)/3)/a**2, Eq(b, 0)), ((-2*A/(3*x**(3/2)) - 2*B/s qrt(x))/b**2, Eq(a, 0)), (A*a*b*log(sqrt(x) - sqrt(-a/b))/(2*a**2*b**2*sqr t(-a/b) + 2*a*b**3*x*sqrt(-a/b)) - A*a*b*log(sqrt(x) + sqrt(-a/b))/(2*a**2 *b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt(-a/b)) + 2*A*b**2*sqrt(x)*sqrt(-a/b)/(2 *a**2*b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt(-a/b)) + A*b**2*x*log(sqrt(x) - sq rt(-a/b))/(2*a**2*b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt(-a/b)) - A*b**2*x*log( sqrt(x) + sqrt(-a/b))/(2*a**2*b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt(-a/b)) + B *a**2*log(sqrt(x) - sqrt(-a/b))/(2*a**2*b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt( -a/b)) - B*a**2*log(sqrt(x) + sqrt(-a/b))/(2*a**2*b**2*sqrt(-a/b) + 2*a*b* *3*x*sqrt(-a/b)) - 2*B*a*b*sqrt(x)*sqrt(-a/b)/(2*a**2*b**2*sqrt(-a/b) + 2* a*b**3*x*sqrt(-a/b)) + B*a*b*x*log(sqrt(x) - sqrt(-a/b))/(2*a**2*b**2*sqrt (-a/b) + 2*a*b**3*x*sqrt(-a/b)) - B*a*b*x*log(sqrt(x) + sqrt(-a/b))/(2*a** 2*b**2*sqrt(-a/b) + 2*a*b**3*x*sqrt(-a/b)), True))
Time = 0.15 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.92 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=-\frac {{\left (B a - A b\right )} \sqrt {x}}{a b^{2} x + a^{2} b} + \frac {{\left (B a + A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} a b} \] Input:
integrate((B*x+A)/x^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")
Output:
-(B*a - A*b)*sqrt(x)/(a*b^2*x + a^2*b) + (B*a + A*b)*arctan(b*sqrt(x)/sqrt (a*b))/(sqrt(a*b)*a*b)
Time = 0.26 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.95 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {{\left (B a + A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} a b} - \frac {B a \sqrt {x} - A b \sqrt {x}}{{\left (b x + a\right )} a b} \] Input:
integrate((B*x+A)/x^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")
Output:
(B*a + A*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*a*b) - (B*a*sqrt(x) - A *b*sqrt(x))/((b*x + a)*a*b)
Time = 10.80 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.81 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {x}}{\sqrt {a}}\right )\,\left (A\,b+B\,a\right )}{a^{3/2}\,b^{3/2}}+\frac {\sqrt {x}\,\left (A\,b-B\,a\right )}{a\,b\,\left (a+b\,x\right )} \] Input:
int((A + B*x)/(x^(1/2)*(a^2 + b^2*x^2 + 2*a*b*x)),x)
Output:
(atan((b^(1/2)*x^(1/2))/a^(1/2))*(A*b + B*a))/(a^(3/2)*b^(3/2)) + (x^(1/2) *(A*b - B*a))/(a*b*(a + b*x))
Time = 0.27 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.40 \[ \int \frac {A+B x}{\sqrt {x} \left (a^2+2 a b x+b^2 x^2\right )} \, dx=\frac {2 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {x}\, b}{\sqrt {b}\, \sqrt {a}}\right )}{a b} \] Input:
int((B*x+A)/x^(1/2)/(b^2*x^2+2*a*b*x+a^2),x)
Output:
(2*sqrt(b)*sqrt(a)*atan((sqrt(x)*b)/(sqrt(b)*sqrt(a))))/(a*b)