Integrand size = 43, antiderivative size = 110 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=-\frac {2 a \sqrt {a+b x}}{b}+\frac {2 \left (-2+a b^3+a^3 b^3\right ) \text {arctanh}\left (\frac {a b^2+2 \sqrt {a+b x}}{\sqrt {a} \sqrt {4+a b^4}}\right )}{\sqrt {a} \sqrt {4+a b^4}}+\left (b+a^2 b\right ) \log \left (b x+a b^2 \sqrt {a+b x}\right ) \]
-2*a*(b*x+a)^(1/2)/b+2*(a^3*b^3+a*b^3-2)*arctanh((a*b^2+2*(b*x+a)^(1/2))/a ^(1/2)/(a*b^4+4)^(1/2))/a^(1/2)/(a*b^4+4)^(1/2)+(a^2*b+b)*ln(b*x+a*b^2*(b* x+a)^(1/2))
Time = 0.12 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.97 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=-\frac {2 a \sqrt {a+b x}}{b}+\frac {2 \left (-2+a b^3+a^3 b^3\right ) \text {arctanh}\left (\frac {a b^2+2 \sqrt {a+b x}}{\sqrt {a} \sqrt {4+a b^4}}\right )}{\sqrt {a} \sqrt {4+a b^4}}+\left (1+a^2\right ) b \log \left (b \left (x+a b \sqrt {a+b x}\right )\right ) \]
(-2*a*Sqrt[a + b*x])/b + (2*(-2 + a*b^3 + a^3*b^3)*ArcTanh[(a*b^2 + 2*Sqrt [a + b*x])/(Sqrt[a]*Sqrt[4 + a*b^4])])/(Sqrt[a]*Sqrt[4 + a*b^4]) + (1 + a^ 2)*b*Log[b*(x + a*b*Sqrt[a + b*x])]
Time = 0.74 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {7267, 2083, 2188, 2009}
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 {b \sqrt {a+b x}-a x+1}{\sqrt {a+b x} \left (a b \sqrt {a+b x}+x\right )} \, dx\) |
\(\Big \downarrow \) 7267 |
\(\displaystyle \frac {2 \int \frac {a^2-(a+b x) a+b+b^2 \sqrt {a+b x}}{-\left (\left (1-b^2 \sqrt {a+b x}\right ) a\right )+a+b x}d\sqrt {a+b x}}{b}\) |
\(\Big \downarrow \) 2083 |
\(\displaystyle \frac {2 \int \frac {a^2-(a+b x) a+b+b^2 \sqrt {a+b x}}{a \sqrt {a+b x} b^2+x b}d\sqrt {a+b x}}{b}\) |
\(\Big \downarrow \) 2188 |
\(\displaystyle \frac {2 \int \left (\frac {\left (a^2+1\right ) \sqrt {a+b x} b^2+b}{a \sqrt {a+b x} b^2+x b}-a\right )d\sqrt {a+b x}}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 \left (-\frac {b \left (2-a \left (a^2+1\right ) b^3\right ) \text {arctanh}\left (\frac {a b^2+2 \sqrt {a+b x}}{\sqrt {a} \sqrt {a b^4+4}}\right )}{\sqrt {a} \sqrt {a b^4+4}}+\frac {1}{2} \left (a^2+1\right ) b^2 \log \left (-a b^2 \sqrt {a+b x}-b x\right )-a \sqrt {a+b x}\right )}{b}\) |
(2*(-(a*Sqrt[a + b*x]) - (b*(2 - a*(1 + a^2)*b^3)*ArcTanh[(a*b^2 + 2*Sqrt[ a + b*x])/(Sqrt[a]*Sqrt[4 + a*b^4])])/(Sqrt[a]*Sqrt[4 + a*b^4]) + ((1 + a^ 2)*b^2*Log[-(b*x) - a*b^2*Sqrt[a + b*x]])/2))/b
3.17.28.3.1 Defintions of rubi rules used
Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum [v, x]^q, x] /; FreeQ[{p, q}, x] && QuadraticQ[{u, v}, x] && !QuadraticMat chQ[{u, v}, x]
Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq , x] && IGtQ[p, -2]
Int[u_, x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[u, x]}, Si mp[lst[[2]]*lst[[4]] Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x ] /; !FalseQ[lst] && SubstForFractionalPowerQ[u, lst[[3]], x]]
Time = 0.14 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(-\frac {2 \left (\sqrt {b x +a}\, a -b \left (\frac {\left (a^{2} b +b \right ) \ln \left (b x +a \,b^{2} \sqrt {b x +a}\right )}{2}-\frac {2 \left (1-\frac {\left (a^{2} b +b \right ) a \,b^{2}}{2}\right ) \operatorname {arctanh}\left (\frac {a \,b^{2}+2 \sqrt {b x +a}}{\sqrt {a^{2} b^{4}+4 a}}\right )}{\sqrt {a^{2} b^{4}+4 a}}\right )\right )}{b}\) | \(106\) |
default | \(\frac {-2 \sqrt {b x +a}\, a +2 b \left (\frac {\left (a^{2} b +b \right ) \ln \left (b x +a \,b^{2} \sqrt {b x +a}\right )}{2}-\frac {2 \left (1-\frac {\left (a^{2} b +b \right ) a \,b^{2}}{2}\right ) \operatorname {arctanh}\left (\frac {a \,b^{2}+2 \sqrt {b x +a}}{\sqrt {a^{2} b^{4}+4 a}}\right )}{\sqrt {a^{2} b^{4}+4 a}}\right )}{b}\) | \(106\) |
-2/b*((b*x+a)^(1/2)*a-b*(1/2*(a^2*b+b)*ln(b*x+a*b^2*(b*x+a)^(1/2))-2*(1-1/ 2*(a^2*b+b)*a*b^2)/(a^2*b^4+4*a)^(1/2)*arctanh((a*b^2+2*(b*x+a)^(1/2))/(a^ 2*b^4+4*a)^(1/2))))
Time = 0.27 (sec) , antiderivative size = 392, normalized size of antiderivative = 3.56 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=\left [\frac {\sqrt {a^{2} b^{4} + 4 \, a} {\left ({\left (a^{3} + a\right )} b^{4} - 2 \, b\right )} \log \left (\frac {2 \, a^{3} b^{3} - 2 \, b x^{2} + {\left (a^{2} b^{4} - 4 \, a\right )} x + \sqrt {a^{2} b^{4} + 4 \, a} {\left (a b^{2} x + 2 \, a^{2} b\right )} + {\left (a^{3} b^{5} + 4 \, a^{2} b + \sqrt {a^{2} b^{4} + 4 \, a} {\left (a^{2} b^{3} - 2 \, x\right )}\right )} \sqrt {b x + a}}{a^{2} b^{3} x + a^{3} b^{2} - x^{2}}\right ) + {\left ({\left (a^{4} + a^{2}\right )} b^{6} + 4 \, {\left (a^{3} + a\right )} b^{2}\right )} \log \left (\sqrt {b x + a} a b + x\right ) - 2 \, {\left (a^{3} b^{4} + 4 \, a^{2}\right )} \sqrt {b x + a}}{a^{2} b^{5} + 4 \, a b}, -\frac {2 \, \sqrt {-a^{2} b^{4} - 4 \, a} {\left ({\left (a^{3} + a\right )} b^{4} - 2 \, b\right )} \arctan \left (\frac {\sqrt {-a^{2} b^{4} - 4 \, a} a b^{2} + 2 \, \sqrt {-a^{2} b^{4} - 4 \, a} \sqrt {b x + a}}{a^{2} b^{4} + 4 \, a}\right ) - {\left ({\left (a^{4} + a^{2}\right )} b^{6} + 4 \, {\left (a^{3} + a\right )} b^{2}\right )} \log \left (\sqrt {b x + a} a b + x\right ) + 2 \, {\left (a^{3} b^{4} + 4 \, a^{2}\right )} \sqrt {b x + a}}{a^{2} b^{5} + 4 \, a b}\right ] \]
[(sqrt(a^2*b^4 + 4*a)*((a^3 + a)*b^4 - 2*b)*log((2*a^3*b^3 - 2*b*x^2 + (a^ 2*b^4 - 4*a)*x + sqrt(a^2*b^4 + 4*a)*(a*b^2*x + 2*a^2*b) + (a^3*b^5 + 4*a^ 2*b + sqrt(a^2*b^4 + 4*a)*(a^2*b^3 - 2*x))*sqrt(b*x + a))/(a^2*b^3*x + a^3 *b^2 - x^2)) + ((a^4 + a^2)*b^6 + 4*(a^3 + a)*b^2)*log(sqrt(b*x + a)*a*b + x) - 2*(a^3*b^4 + 4*a^2)*sqrt(b*x + a))/(a^2*b^5 + 4*a*b), -(2*sqrt(-a^2* b^4 - 4*a)*((a^3 + a)*b^4 - 2*b)*arctan((sqrt(-a^2*b^4 - 4*a)*a*b^2 + 2*sq rt(-a^2*b^4 - 4*a)*sqrt(b*x + a))/(a^2*b^4 + 4*a)) - ((a^4 + a^2)*b^6 + 4* (a^3 + a)*b^2)*log(sqrt(b*x + a)*a*b + x) + 2*(a^3*b^4 + 4*a^2)*sqrt(b*x + a))/(a^2*b^5 + 4*a*b)]
Time = 5.22 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.15 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=\begin {cases} \frac {2 \left (- a \sqrt {a + b x} + b \left (\left (\frac {a^{2} b}{2} + \frac {b}{2}\right ) \log {\left (a b^{2} \sqrt {a + b x} + b x \right )} + \frac {\left (a b^{2} \left (- \frac {a^{2} b}{2} - \frac {b}{2}\right ) + 1\right ) \operatorname {atan}{\left (\frac {\frac {a b^{2}}{2} + \sqrt {a + b x}}{\sqrt {- \frac {a^{2} b^{4}}{4} - a}} \right )}}{\sqrt {- \frac {a^{2} b^{4}}{4} - a}}\right )\right )}{b} & \text {for}\: b \neq 0 \\\frac {- a x + \log {\left (- a x \right )}}{\sqrt {a}} & \text {otherwise} \end {cases} \]
Piecewise((2*(-a*sqrt(a + b*x) + b*((a**2*b/2 + b/2)*log(a*b**2*sqrt(a + b *x) + b*x) + (a*b**2*(-a**2*b/2 - b/2) + 1)*atan((a*b**2/2 + sqrt(a + b*x) )/sqrt(-a**2*b**4/4 - a))/sqrt(-a**2*b**4/4 - a)))/b, Ne(b, 0)), ((-a*x + log(-a*x))/sqrt(a), True))
Time = 0.18 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.14 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=\frac {{\left (a^{2} + 1\right )} b^{2} \log \left (\sqrt {b x + a} a b^{2} + b x\right ) - 2 \, \sqrt {b x + a} a - \frac {{\left ({\left (a^{3} + a\right )} b^{4} - 2 \, b\right )} \log \left (\frac {a b^{2} - \sqrt {{\left (a b^{4} + 4\right )} a} + 2 \, \sqrt {b x + a}}{a b^{2} + \sqrt {{\left (a b^{4} + 4\right )} a} + 2 \, \sqrt {b x + a}}\right )}{\sqrt {{\left (a b^{4} + 4\right )} a}}}{b} \]
((a^2 + 1)*b^2*log(sqrt(b*x + a)*a*b^2 + b*x) - 2*sqrt(b*x + a)*a - ((a^3 + a)*b^4 - 2*b)*log((a*b^2 - sqrt((a*b^4 + 4)*a) + 2*sqrt(b*x + a))/(a*b^2 + sqrt((a*b^4 + 4)*a) + 2*sqrt(b*x + a)))/sqrt((a*b^4 + 4)*a))/b
Time = 0.27 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.91 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx={\left (a^{2} b + b\right )} \log \left (\sqrt {b x + a} a b^{2} + b x\right ) - \frac {2 \, {\left (a^{3} b^{3} + a b^{3} - 2\right )} \arctan \left (\frac {a b^{2} + 2 \, \sqrt {b x + a}}{\sqrt {-a^{2} b^{4} - 4 \, a}}\right )}{\sqrt {-a^{2} b^{4} - 4 \, a}} - \frac {2 \, \sqrt {b x + a} a}{b} \]
(a^2*b + b)*log(sqrt(b*x + a)*a*b^2 + b*x) - 2*(a^3*b^3 + a*b^3 - 2)*arcta n((a*b^2 + 2*sqrt(b*x + a))/sqrt(-a^2*b^4 - 4*a))/sqrt(-a^2*b^4 - 4*a) - 2 *sqrt(b*x + a)*a/b
Time = 5.84 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.54 \[ \int \frac {1-a x+b \sqrt {a+b x}}{\sqrt {a+b x} \left (x+a b \sqrt {a+b x}\right )} \, dx=\frac {\ln \left (4\,a+2\,\sqrt {a\,\left (a\,b^4+4\right )}\,\sqrt {a+b\,x}+a^2\,b^4+a\,b^2\,\sqrt {a\,\left (a\,b^4+4\right )}\right )\,\left (a\,b\,\left (a\,b^4+4\right )-2\,\sqrt {a\,\left (a\,b^4+4\right )}+a^3\,b\,\left (a\,b^4+4\right )+a\,b^3\,\sqrt {a\,\left (a\,b^4+4\right )}+a^3\,b^3\,\sqrt {a\,\left (a\,b^4+4\right )}\right )}{a\,\left (a\,b^4+4\right )}-\frac {2\,a\,\sqrt {a+b\,x}}{b}+\frac {\ln \left (4\,a-2\,\sqrt {a\,\left (a\,b^4+4\right )}\,\sqrt {a+b\,x}+a^2\,b^4-a\,b^2\,\sqrt {a\,\left (a\,b^4+4\right )}\right )\,\left (2\,\sqrt {a\,\left (a\,b^4+4\right )}+a\,b\,\left (a\,b^4+4\right )+a^3\,b\,\left (a\,b^4+4\right )-a\,b^3\,\sqrt {a\,\left (a\,b^4+4\right )}-a^3\,b^3\,\sqrt {a\,\left (a\,b^4+4\right )}\right )}{a\,\left (a\,b^4+4\right )} \]
(log(4*a + 2*(a*(a*b^4 + 4))^(1/2)*(a + b*x)^(1/2) + a^2*b^4 + a*b^2*(a*(a *b^4 + 4))^(1/2))*(a*b*(a*b^4 + 4) - 2*(a*(a*b^4 + 4))^(1/2) + a^3*b*(a*b^ 4 + 4) + a*b^3*(a*(a*b^4 + 4))^(1/2) + a^3*b^3*(a*(a*b^4 + 4))^(1/2)))/(a* (a*b^4 + 4)) - (2*a*(a + b*x)^(1/2))/b + (log(4*a - 2*(a*(a*b^4 + 4))^(1/2 )*(a + b*x)^(1/2) + a^2*b^4 - a*b^2*(a*(a*b^4 + 4))^(1/2))*(2*(a*(a*b^4 + 4))^(1/2) + a*b*(a*b^4 + 4) + a^3*b*(a*b^4 + 4) - a*b^3*(a*(a*b^4 + 4))^(1 /2) - a^3*b^3*(a*(a*b^4 + 4))^(1/2)))/(a*(a*b^4 + 4))