3.10.50 \(\int \frac {12-12 x-13 x^2+20 x^3+12 x^4+e^x (18+24 x+8 x^2)}{18+24 x+8 x^2} \, dx\)

Optimal. Leaf size=28 \[ 4+e^x+x-\frac {1}{4} (4-2 x) x^2-\frac {x}{3+2 x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 5, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {27, 12, 6742, 2194, 43} \begin {gather*} \frac {x^3}{2}-x^2+x+e^x+\frac {3}{2 (2 x+3)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(12 - 12*x - 13*x^2 + 20*x^3 + 12*x^4 + E^x*(18 + 24*x + 8*x^2))/(18 + 24*x + 8*x^2),x]

[Out]

E^x + x - x^2 + x^3/2 + 3/(2*(3 + 2*x))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 43

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])

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {12-12 x-13 x^2+20 x^3+12 x^4+e^x \left (18+24 x+8 x^2\right )}{2 (3+2 x)^2} \, dx\\ &=\frac {1}{2} \int \frac {12-12 x-13 x^2+20 x^3+12 x^4+e^x \left (18+24 x+8 x^2\right )}{(3+2 x)^2} \, dx\\ &=\frac {1}{2} \int \left (2 e^x+\frac {12}{(3+2 x)^2}-\frac {12 x}{(3+2 x)^2}-\frac {13 x^2}{(3+2 x)^2}+\frac {20 x^3}{(3+2 x)^2}+\frac {12 x^4}{(3+2 x)^2}\right ) \, dx\\ &=-\frac {3}{3+2 x}-6 \int \frac {x}{(3+2 x)^2} \, dx+6 \int \frac {x^4}{(3+2 x)^2} \, dx-\frac {13}{2} \int \frac {x^2}{(3+2 x)^2} \, dx+10 \int \frac {x^3}{(3+2 x)^2} \, dx+\int e^x \, dx\\ &=e^x-\frac {3}{3+2 x}+6 \int \left (\frac {27}{16}-\frac {3 x}{4}+\frac {x^2}{4}+\frac {81}{16 (3+2 x)^2}-\frac {27}{4 (3+2 x)}\right ) \, dx-6 \int \left (-\frac {3}{2 (3+2 x)^2}+\frac {1}{2 (3+2 x)}\right ) \, dx-\frac {13}{2} \int \left (\frac {1}{4}+\frac {9}{4 (3+2 x)^2}-\frac {3}{2 (3+2 x)}\right ) \, dx+10 \int \left (-\frac {3}{4}+\frac {x}{4}-\frac {27}{8 (3+2 x)^2}+\frac {27}{8 (3+2 x)}\right ) \, dx\\ &=e^x+x-x^2+\frac {x^3}{2}+\frac {3}{2 (3+2 x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 30, normalized size = 1.07 \begin {gather*} \frac {1}{2} \left (2 e^x+2 x-2 x^2+x^3+\frac {3}{3+2 x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(12 - 12*x - 13*x^2 + 20*x^3 + 12*x^4 + E^x*(18 + 24*x + 8*x^2))/(18 + 24*x + 8*x^2),x]

[Out]

(2*E^x + 2*x - 2*x^2 + x^3 + 3/(3 + 2*x))/2

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 38, normalized size = 1.36 \begin {gather*} \frac {2 \, x^{4} - x^{3} - 2 \, x^{2} + 2 \, {\left (2 \, x + 3\right )} e^{x} + 6 \, x + 3}{2 \, {\left (2 \, x + 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2+24*x+18)*exp(x)+12*x^4+20*x^3-13*x^2-12*x+12)/(8*x^2+24*x+18),x, algorithm="fricas")

[Out]

1/2*(2*x^4 - x^3 - 2*x^2 + 2*(2*x + 3)*e^x + 6*x + 3)/(2*x + 3)

________________________________________________________________________________________

giac [A]  time = 0.41, size = 38, normalized size = 1.36 \begin {gather*} \frac {2 \, x^{4} - x^{3} - 2 \, x^{2} + 4 \, x e^{x} + 6 \, x + 6 \, e^{x} + 3}{2 \, {\left (2 \, x + 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2+24*x+18)*exp(x)+12*x^4+20*x^3-13*x^2-12*x+12)/(8*x^2+24*x+18),x, algorithm="giac")

[Out]

1/2*(2*x^4 - x^3 - 2*x^2 + 4*x*e^x + 6*x + 6*e^x + 3)/(2*x + 3)

________________________________________________________________________________________

maple [A]  time = 0.20, size = 22, normalized size = 0.79




method result size



risch \(\frac {x^{3}}{2}-x^{2}+x +\frac {3}{4 \left (x +\frac {3}{2}\right )}+{\mathrm e}^{x}\) \(22\)
default \(\frac {3}{2 \left (2 x +3\right )}+x -x^{2}+\frac {x^{3}}{2}+{\mathrm e}^{x}\) \(24\)
norman \(\frac {x^{4}-x^{2}-\frac {x^{3}}{2}+2 \,{\mathrm e}^{x} x +3 \,{\mathrm e}^{x}-3}{2 x +3}\) \(33\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((8*x^2+24*x+18)*exp(x)+12*x^4+20*x^3-13*x^2-12*x+12)/(8*x^2+24*x+18),x,method=_RETURNVERBOSE)

[Out]

1/2*x^3-x^2+x+3/4/(x+3/2)+exp(x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {1}{2} \, x^{3} - x^{2} + x + \frac {4 \, {\left (x^{2} + 3 \, x\right )} e^{x}}{4 \, x^{2} + 12 \, x + 9} - \frac {9 \, e^{\left (-\frac {3}{2}\right )} E_{2}\left (-x - \frac {3}{2}\right )}{2 \, {\left (2 \, x + 3\right )}} + \frac {3}{2 \, {\left (2 \, x + 3\right )}} - 36 \, \int \frac {e^{x}}{8 \, x^{3} + 36 \, x^{2} + 54 \, x + 27}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2+24*x+18)*exp(x)+12*x^4+20*x^3-13*x^2-12*x+12)/(8*x^2+24*x+18),x, algorithm="maxima")

[Out]

1/2*x^3 - x^2 + x + 4*(x^2 + 3*x)*e^x/(4*x^2 + 12*x + 9) - 9/2*e^(-3/2)*exp_integral_e(2, -x - 3/2)/(2*x + 3)
+ 3/2/(2*x + 3) - 36*integrate(e^x/(8*x^3 + 36*x^2 + 54*x + 27), x)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 23, normalized size = 0.82 \begin {gather*} x+{\mathrm {e}}^x+\frac {3}{4\,x+6}-x^2+\frac {x^3}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(24*x + 8*x^2 + 18) - 12*x - 13*x^2 + 20*x^3 + 12*x^4 + 12)/(24*x + 8*x^2 + 18),x)

[Out]

x + exp(x) + 3/(4*x + 6) - x^2 + x^3/2

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 19, normalized size = 0.68 \begin {gather*} \frac {x^{3}}{2} - x^{2} + x + e^{x} + \frac {3}{4 x + 6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x**2+24*x+18)*exp(x)+12*x**4+20*x**3-13*x**2-12*x+12)/(8*x**2+24*x+18),x)

[Out]

x**3/2 - x**2 + x + exp(x) + 3/(4*x + 6)

________________________________________________________________________________________