Optimal. Leaf size=23 \[ 4+\frac {1}{2} (-6-x-x (3+x+\log (5-x))) \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 36, normalized size of antiderivative = 1.57, number of steps used = 6, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {6742, 698, 2389, 2295} \begin {gather*} -\frac {x^2}{2}-2 x+\frac {1}{2} (5-x) \log (5-x)-\frac {5}{2} \log (5-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 698
Rule 2295
Rule 2389
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {20+5 x-2 x^2}{2 (-5+x)}-\frac {1}{2} \log (5-x)\right ) \, dx\\ &=\frac {1}{2} \int \frac {20+5 x-2 x^2}{-5+x} \, dx-\frac {1}{2} \int \log (5-x) \, dx\\ &=\frac {1}{2} \int \left (-5-\frac {5}{-5+x}-2 x\right ) \, dx+\frac {1}{2} \operatorname {Subst}(\int \log (x) \, dx,x,5-x)\\ &=-2 x-\frac {x^2}{2}-\frac {5}{2} \log (5-x)+\frac {1}{2} (5-x) \log (5-x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 22, normalized size = 0.96 \begin {gather*} \frac {1}{2} \left (-4 x-x^2-x \log (5-x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.56, size = 18, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{2} \, x \log \left (-x + 5\right ) - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 18, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{2} \, x \log \left (-x + 5\right ) - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 19, normalized size = 0.83
method | result | size |
norman | \(-2 x -\frac {x^{2}}{2}-\frac {\ln \left (5-x \right ) x}{2}\) | \(19\) |
risch | \(-2 x -\frac {x^{2}}{2}-\frac {\ln \left (5-x \right ) x}{2}\) | \(19\) |
derivativedivides | \(\frac {\left (5-x \right ) \ln \left (5-x \right )}{2}+35-7 x -\frac {\left (5-x \right )^{2}}{2}-\frac {5 \ln \left (5-x \right )}{2}\) | \(36\) |
default | \(\frac {\left (5-x \right ) \ln \left (5-x \right )}{2}+35-7 x -\frac {\left (5-x \right )^{2}}{2}-\frac {5 \ln \left (5-x \right )}{2}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.37, size = 43, normalized size = 1.87 \begin {gather*} -\frac {1}{2} \, x^{2} + \frac {5}{4} \, \log \left (x - 5\right )^{2} - \frac {1}{2} \, {\left (x + 5 \, \log \left (x - 5\right )\right )} \log \left (-x + 5\right ) + \frac {5}{4} \, \log \left (-x + 5\right )^{2} - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.63, size = 12, normalized size = 0.52 \begin {gather*} -\frac {x\,\left (x+\ln \left (5-x\right )+4\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 17, normalized size = 0.74 \begin {gather*} - \frac {x^{2}}{2} - \frac {x \log {\left (5 - x \right )}}{2} - 2 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________