Optimal. Leaf size=26 \[ -\frac {\log (a+x)}{a-b}+\frac {\log (b+x)}{a-b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {36, 31}
\begin {gather*} \frac {\log (b+x)}{a-b}-\frac {\log (a+x)}{a-b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rubi steps
\begin {align*} \int \frac {1}{(a+x) (b+x)} \, dx &=\frac {\int \frac {1}{a+x} \, dx}{-a+b}-\frac {\int \frac {1}{b+x} \, dx}{-a+b}\\ &=-\frac {\log (a+x)}{a-b}+\frac {\log (b+x)}{a-b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 19, normalized size = 0.73 \begin {gather*} \frac {-\log (a+x)+\log (b+x)}{a-b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 2.61, size = 19, normalized size = 0.73 \begin {gather*} \frac {\text {Log}\left [b+x\right ]-\text {Log}\left [a+x\right ]}{a-b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 27, normalized size = 1.04
method | result | size |
default | \(-\frac {\ln \left (a +x \right )}{a -b}+\frac {\ln \left (b +x \right )}{a -b}\) | \(27\) |
norman | \(-\frac {\ln \left (a +x \right )}{a -b}+\frac {\ln \left (b +x \right )}{a -b}\) | \(27\) |
risch | \(-\frac {\ln \left (a +x \right )}{a -b}+\frac {\ln \left (b +x \right )}{a -b}\) | \(27\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 26, normalized size = 1.00 \begin {gather*} -\frac {\log \left (a + x\right )}{a - b} + \frac {\log \left (b + x\right )}{a - b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 20, normalized size = 0.77 \begin {gather*} -\frac {\log \left (a + x\right ) - \log \left (b + x\right )}{a - b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 80 vs.
\(2 (15) = 30\)
time = 0.12, size = 80, normalized size = 3.08 \begin {gather*} \frac {\log {\left (- \frac {a^{2}}{2 \left (a - b\right )} + \frac {a b}{a - b} + \frac {a}{2} - \frac {b^{2}}{2 \left (a - b\right )} + \frac {b}{2} + x \right )}}{a - b} - \frac {\log {\left (\frac {a^{2}}{2 \left (a - b\right )} - \frac {a b}{a - b} + \frac {a}{2} + \frac {b^{2}}{2 \left (a - b\right )} + \frac {b}{2} + x \right )}}{a - b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 23, normalized size = 0.88 \begin {gather*} \frac {\ln \left |x+b\right |}{a-b}+\frac {\ln \left |x+a\right |}{-a+b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.22, size = 18, normalized size = 0.69 \begin {gather*} \frac {\ln \left (\frac {b+x}{a+x}\right )}{a-b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________