3.2.6 \(\int \frac {a+b x}{A+B x} \, dx\) [106]

Optimal. Leaf size=25 \[ \frac {b x}{B}+\frac {(-A b+a B) \log (A+B x)}{B^2} \]

[Out]

b*x/B+(-A*b+B*a)/B^2*ln(B*x+A)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.04, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {45} \begin {gather*} \frac {b x}{B}-\frac {(A b-a B) \log (A+B x)}{B^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/B - ((A*b - a*B)*Log[A + B*x])/B^2

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\int \left (\frac {b}{B}+\frac {-A b+a B}{B (A+B x)}\right ) \, dx\\ &=\frac {b x}{B}-\frac {(A b-a B) \log (A+B x)}{B^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 25, normalized size = 1.00 \begin {gather*} \frac {b x}{B}+\frac {(-A b+a B) \log (A+B x)}{B^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/B + ((-(A*b) + a*B)*Log[A + B*x])/B^2

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 26, normalized size = 1.04

method result size
default \(\frac {b x}{B}+\frac {\left (-A b +B a \right ) \ln \left (B x +A \right )}{B^{2}}\) \(26\)
norman \(\frac {b x}{B}-\frac {\left (A b -B a \right ) \ln \left (B x +A \right )}{B^{2}}\) \(27\)
parallelrisch \(-\frac {A \ln \left (B x +A \right ) b -B \ln \left (B x +A \right ) a -x b B}{B^{2}}\) \(31\)
risch \(\frac {b x}{B}-\frac {\ln \left (B x +A \right ) A b}{B^{2}}+\frac {\ln \left (B x +A \right ) a}{B}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)/(B*x+A),x,method=_RETURNVERBOSE)

[Out]

b*x/B+(-A*b+B*a)/B^2*ln(B*x+A)

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 25, normalized size = 1.00 \begin {gather*} \frac {b x}{B} + \frac {{\left (B a - A b\right )} \log \left (B x + A\right )}{B^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*x/B + (B*a - A*b)*log(B*x + A)/B^2

________________________________________________________________________________________

Fricas [A]
time = 0.56, size = 24, normalized size = 0.96 \begin {gather*} \frac {B b x + {\left (B a - A b\right )} \log \left (B x + A\right )}{B^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(B*b*x + (B*a - A*b)*log(B*x + A))/B^2

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 20, normalized size = 0.80 \begin {gather*} \frac {b x}{B} + \frac {\left (- A b + B a\right ) \log {\left (A + B x \right )}}{B^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)/(B*x+A),x)

[Out]

b*x/B + (-A*b + B*a)*log(A + B*x)/B**2

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 26, normalized size = 1.04 \begin {gather*} \frac {b x}{B} + \frac {{\left (B a - A b\right )} \log \left ({\left | B x + A \right |}\right )}{B^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*x/B + (B*a - A*b)*log(abs(B*x + A))/B^2

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 26, normalized size = 1.04 \begin {gather*} \frac {b\,x}{B}-\frac {\ln \left (A+B\,x\right )\,\left (A\,b-B\,a\right )}{B^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)/(A + B*x),x)

[Out]

(b*x)/B - (log(A + B*x)*(A*b - B*a))/B^2

________________________________________________________________________________________