3.28 \(\int \frac{1}{x (a+b x)} \, dx\)

Optimal. Leaf size=18 \[ \frac{\log (x)}{a}-\frac{\log (a+b x)}{a} \]

[Out]

Log[x]/a - Log[a + b*x]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0035481, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {36, 29, 31} \[ \frac{\log (x)}{a}-\frac{\log (a+b x)}{a} \]

Antiderivative was successfully verified.

[In]

Int[1/(x*(a + b*x)),x]

[Out]

Log[x]/a - Log[a + b*x]/a

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{1}{x (a+b x)} \, dx &=\frac{\int \frac{1}{x} \, dx}{a}-\frac{b \int \frac{1}{a+b x} \, dx}{a}\\ &=\frac{\log (x)}{a}-\frac{\log (a+b x)}{a}\\ \end{align*}

Mathematica [A]  time = 0.0040577, size = 18, normalized size = 1. \[ \frac{\log (x)}{a}-\frac{\log (a+b x)}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[1/(x*(a + b*x)),x]

[Out]

Log[x]/a - Log[a + b*x]/a

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 19, normalized size = 1.1 \begin{align*}{\frac{\ln \left ( x \right ) }{a}}-{\frac{\ln \left ( bx+a \right ) }{a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x/(b*x+a),x)

[Out]

ln(x)/a-ln(b*x+a)/a

________________________________________________________________________________________

Maxima [A]  time = 0.95042, size = 24, normalized size = 1.33 \begin{align*} -\frac{\log \left (b x + a\right )}{a} + \frac{\log \left (x\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(b*x+a),x, algorithm="maxima")

[Out]

-log(b*x + a)/a + log(x)/a

________________________________________________________________________________________

Fricas [A]  time = 1.99473, size = 38, normalized size = 2.11 \begin{align*} -\frac{\log \left (b x + a\right ) - \log \left (x\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(b*x+a),x, algorithm="fricas")

[Out]

-(log(b*x + a) - log(x))/a

________________________________________________________________________________________

Sympy [A]  time = 0.131829, size = 10, normalized size = 0.56 \begin{align*} \frac{\log{\left (x \right )} - \log{\left (\frac{a}{b} + x \right )}}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(b*x+a),x)

[Out]

(log(x) - log(a/b + x))/a

________________________________________________________________________________________

Giac [A]  time = 1.09712, size = 27, normalized size = 1.5 \begin{align*} -\frac{\log \left ({\left | b x + a \right |}\right )}{a} + \frac{\log \left ({\left | x \right |}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(b*x+a),x, algorithm="giac")

[Out]

-log(abs(b*x + a))/a + log(abs(x))/a