3.48.68 \(\int \frac {-24 x+4 x^2+6 x^3-x^4+(288+40 x-32 x^2-6 x^3) \log (4)+(288+40 x-32 x^2-6 x^3) \log (4+x)}{4 x^4+x^5} \, dx\) [4768]

Optimal. Leaf size=23 \[ \frac {(6-x) \left (-\frac {4}{x}+x\right ) (\log (4)+\log (4+x))}{x^2} \]

[Out]

(x-4/x)*(ln(4+x)+2*ln(2))*(6-x)/x^2

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(74\) vs. \(2(23)=46\).
time = 0.53, antiderivative size = 74, normalized size of antiderivative = 3.22, number of steps used = 17, number of rules used = 9, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {1607, 6874, 1634, 2465, 2442, 46, 36, 29, 31} \begin {gather*} -\frac {24 \log (x+4)}{x^3}-\frac {24 \log (4)}{x^3}-\frac {3}{x^2}+\frac {4 \log (x+4)}{x^2}+\frac {3+\log (256)}{x^2}+\frac {5}{2 x}+\frac {6 \log (x+4)}{x}-\log (x+4)-\frac {5-12 \log (4)}{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-24*x + 4*x^2 + 6*x^3 - x^4 + (288 + 40*x - 32*x^2 - 6*x^3)*Log[4] + (288 + 40*x - 32*x^2 - 6*x^3)*Log[4
+ x])/(4*x^4 + x^5),x]

[Out]

-3/x^2 + 5/(2*x) - (5 - 12*Log[4])/(2*x) - (24*Log[4])/x^3 + (3 + Log[256])/x^2 - Log[4 + x] - (24*Log[4 + x])
/x^3 + (4*Log[4 + x])/x^2 + (6*Log[4 + x])/x

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]

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 46

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2465

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-24 x+4 x^2+6 x^3-x^4+\left (288+40 x-32 x^2-6 x^3\right ) \log (4)+\left (288+40 x-32 x^2-6 x^3\right ) \log (4+x)}{x^4 (4+x)} \, dx\\ &=\int \left (\frac {-x^4+4 x^2 (1-8 \log (4))-8 x (3-5 \log (4))+6 x^3 (1-\log (4))+288 \log (4)}{x^4 (4+x)}-\frac {2 \left (-36+4 x+3 x^2\right ) \log (4+x)}{x^4}\right ) \, dx\\ &=-\left (2 \int \frac {\left (-36+4 x+3 x^2\right ) \log (4+x)}{x^4} \, dx\right )+\int \frac {-x^4+4 x^2 (1-8 \log (4))-8 x (3-5 \log (4))+6 x^3 (1-\log (4))+288 \log (4)}{x^4 (4+x)} \, dx\\ &=-\left (2 \int \left (-\frac {36 \log (4+x)}{x^4}+\frac {4 \log (4+x)}{x^3}+\frac {3 \log (4+x)}{x^2}\right ) \, dx\right )+\int \left (\frac {7}{8 x}-\frac {15}{8 (4+x)}+\frac {5-12 \log (4)}{2 x^2}+\frac {72 \log (4)}{x^4}-\frac {2 (3+\log (256))}{x^3}\right ) \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-6 \int \frac {\log (4+x)}{x^2} \, dx-8 \int \frac {\log (4+x)}{x^3} \, dx+72 \int \frac {\log (4+x)}{x^4} \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}-4 \int \frac {1}{x^2 (4+x)} \, dx-6 \int \frac {1}{x (4+x)} \, dx+24 \int \frac {1}{x^3 (4+x)} \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}-\frac {3}{2} \int \frac {1}{x} \, dx+\frac {3}{2} \int \frac {1}{4+x} \, dx-4 \int \left (\frac {1}{4 x^2}-\frac {1}{16 x}+\frac {1}{16 (4+x)}\right ) \, dx+24 \int \left (\frac {1}{4 x^3}-\frac {1}{16 x^2}+\frac {1}{64 x}-\frac {1}{64 (4+x)}\right ) \, dx\\ &=-\frac {3}{x^2}+\frac {5}{2 x}-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}-\log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 38, normalized size = 1.65 \begin {gather*} \frac {2 \left (-12+2 x+3 x^2\right ) \log (4)-\left (24-4 x-6 x^2+x^3\right ) \log (4+x)}{x^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-24*x + 4*x^2 + 6*x^3 - x^4 + (288 + 40*x - 32*x^2 - 6*x^3)*Log[4] + (288 + 40*x - 32*x^2 - 6*x^3)*
Log[4 + x])/(4*x^4 + x^5),x]

[Out]

(2*(-12 + 2*x + 3*x^2)*Log[4] - (24 - 4*x - 6*x^2 + x^3)*Log[4 + x])/x^3

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(76\) vs. \(2(25)=50\).
time = 1.26, size = 77, normalized size = 3.35

method result size
risch \(\frac {2 \left (3 x^{2}+2 x -12\right ) \ln \left (4+x \right )}{x^{3}}+\frac {-x^{3} \ln \left (4+x \right )+12 x^{2} \ln \left (2\right )+8 x \ln \left (2\right )-48 \ln \left (2\right )}{x^{3}}\) \(51\)
norman \(\frac {-x^{3} \ln \left (4+x \right )+8 x \ln \left (2\right )+4 x \ln \left (4+x \right )+12 x^{2} \ln \left (2\right )+6 x^{2} \ln \left (4+x \right )-48 \ln \left (2\right )-24 \ln \left (4+x \right )}{x^{3}}\) \(53\)
derivativedivides \(-\frac {48 \ln \left (2\right )}{x^{3}}+\frac {12 \ln \left (2\right )}{x}+\frac {8 \ln \left (2\right )}{x^{2}}-\frac {3 \ln \left (4+x \right ) \left (4+x \right ) \left (\left (4+x \right )^{2}-12 x \right )}{8 x^{3}}+\frac {3 \ln \left (4+x \right ) \left (4+x \right )}{2 x}-\frac {\ln \left (4+x \right ) \left (4+x \right ) \left (x -4\right )}{4 x^{2}}-\frac {15 \ln \left (4+x \right )}{8}\) \(77\)
default \(-\frac {48 \ln \left (2\right )}{x^{3}}+\frac {12 \ln \left (2\right )}{x}+\frac {8 \ln \left (2\right )}{x^{2}}-\frac {3 \ln \left (4+x \right ) \left (4+x \right ) \left (\left (4+x \right )^{2}-12 x \right )}{8 x^{3}}+\frac {3 \ln \left (4+x \right ) \left (4+x \right )}{2 x}-\frac {\ln \left (4+x \right ) \left (4+x \right ) \left (x -4\right )}{4 x^{2}}-\frac {15 \ln \left (4+x \right )}{8}\) \(77\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-6*x^3-32*x^2+40*x+288)*ln(4+x)+2*(-6*x^3-32*x^2+40*x+288)*ln(2)-x^4+6*x^3+4*x^2-24*x)/(x^5+4*x^4),x,met
hod=_RETURNVERBOSE)

[Out]

-48/x^3*ln(2)+12*ln(2)/x+8*ln(2)/x^2-3/8*ln(4+x)*(4+x)*((4+x)^2-12*x)/x^3+3/2*ln(4+x)*(4+x)/x-1/4*ln(4+x)*(4+x
)*(x-4)/x^2-15/8*ln(4+x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (24) = 48\).
time = 0.32, size = 136, normalized size = 5.91 \begin {gather*} \frac {5}{4} \, {\left (\frac {4 \, {\left (x - 2\right )}}{x^{2}} - \log \left (x + 4\right ) + \log \left (x\right )\right )} \log \left (2\right ) + 4 \, {\left (\frac {4}{x} - \log \left (x + 4\right ) + \log \left (x\right )\right )} \log \left (2\right ) - \frac {3}{4} \, {\left (\frac {4 \, {\left (3 \, x^{2} - 6 \, x + 16\right )}}{x^{3}} - 3 \, \log \left (x + 4\right ) + 3 \, \log \left (x\right )\right )} \log \left (2\right ) + 3 \, {\left (\log \left (x + 4\right ) - \log \left (x\right )\right )} \log \left (2\right ) - \frac {3 \, {\left (x - 2\right )}}{2 \, x^{2}} - \frac {1}{x} + \frac {20 \, x^{2} + {\left (7 \, x^{3} + 48 \, x^{2} + 32 \, x - 192\right )} \log \left (x + 4\right ) - 24 \, x}{8 \, x^{3}} - \frac {15}{8} \, \log \left (x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x^3-32*x^2+40*x+288)*log(4+x)+2*(-6*x^3-32*x^2+40*x+288)*log(2)-x^4+6*x^3+4*x^2-24*x)/(x^5+4*x^
4),x, algorithm="maxima")

[Out]

5/4*(4*(x - 2)/x^2 - log(x + 4) + log(x))*log(2) + 4*(4/x - log(x + 4) + log(x))*log(2) - 3/4*(4*(3*x^2 - 6*x
+ 16)/x^3 - 3*log(x + 4) + 3*log(x))*log(2) + 3*(log(x + 4) - log(x))*log(2) - 3/2*(x - 2)/x^2 - 1/x + 1/8*(20
*x^2 + (7*x^3 + 48*x^2 + 32*x - 192)*log(x + 4) - 24*x)/x^3 - 15/8*log(x + 4)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 38, normalized size = 1.65 \begin {gather*} \frac {4 \, {\left (3 \, x^{2} + 2 \, x - 12\right )} \log \left (2\right ) - {\left (x^{3} - 6 \, x^{2} - 4 \, x + 24\right )} \log \left (x + 4\right )}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x^3-32*x^2+40*x+288)*log(4+x)+2*(-6*x^3-32*x^2+40*x+288)*log(2)-x^4+6*x^3+4*x^2-24*x)/(x^5+4*x^
4),x, algorithm="fricas")

[Out]

(4*(3*x^2 + 2*x - 12)*log(2) - (x^3 - 6*x^2 - 4*x + 24)*log(x + 4))/x^3

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (20) = 40\).
time = 0.33, size = 46, normalized size = 2.00 \begin {gather*} - \log {\left (x + 4 \right )} + \frac {\left (6 x^{2} + 4 x - 24\right ) \log {\left (x + 4 \right )}}{x^{3}} - \frac {- 12 x^{2} \log {\left (2 \right )} - 8 x \log {\left (2 \right )} + 48 \log {\left (2 \right )}}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x**3-32*x**2+40*x+288)*ln(4+x)+2*(-6*x**3-32*x**2+40*x+288)*ln(2)-x**4+6*x**3+4*x**2-24*x)/(x**
5+4*x**4),x)

[Out]

-log(x + 4) + (6*x**2 + 4*x - 24)*log(x + 4)/x**3 - (-12*x**2*log(2) - 8*x*log(2) + 48*log(2))/x**3

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 48, normalized size = 2.09 \begin {gather*} \frac {2 \, {\left (3 \, x^{2} + 2 \, x - 12\right )} \log \left (x + 4\right )}{x^{3}} + \frac {4 \, {\left (3 \, x^{2} \log \left (2\right ) + 2 \, x \log \left (2\right ) - 12 \, \log \left (2\right )\right )}}{x^{3}} - \log \left (x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x^3-32*x^2+40*x+288)*log(4+x)+2*(-6*x^3-32*x^2+40*x+288)*log(2)-x^4+6*x^3+4*x^2-24*x)/(x^5+4*x^
4),x, algorithm="giac")

[Out]

2*(3*x^2 + 2*x - 12)*log(x + 4)/x^3 + 4*(3*x^2*log(2) + 2*x*log(2) - 12*log(2))/x^3 - log(x + 4)

________________________________________________________________________________________

Mupad [B]
time = 3.38, size = 53, normalized size = 2.30 \begin {gather*} -\ln \left (x+4\right )-\frac {24\,\ln \left (x+4\right )+48\,\ln \left (2\right )-x^2\,\left (6\,\ln \left (x+4\right )+12\,\ln \left (2\right )\right )-x\,\left (4\,\ln \left (x+4\right )+8\,\ln \left (2\right )\right )}{x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(x + 4)*(40*x - 32*x^2 - 6*x^3 + 288) - 24*x + 2*log(2)*(40*x - 32*x^2 - 6*x^3 + 288) + 4*x^2 + 6*x^3
- x^4)/(4*x^4 + x^5),x)

[Out]

- log(x + 4) - (24*log(x + 4) + 48*log(2) - x^2*(6*log(x + 4) + 12*log(2)) - x*(4*log(x + 4) + 8*log(2)))/x^3

________________________________________________________________________________________