3.38.85 \(\int \frac {2+6 x+9 x^2+e^x (1+6 x+9 x^2)}{1+6 x+9 x^2} \, dx\)

Optimal. Leaf size=15 \[ -15+e^x+x+\frac {x}{1+3 x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 16, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {27, 6742, 2194, 683} \begin {gather*} x+e^x-\frac {1}{3 (3 x+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2 + 6*x + 9*x^2 + E^x*(1 + 6*x + 9*x^2))/(1 + 6*x + 9*x^2),x]

[Out]

E^x + x - 1/(3*(1 + 3*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 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

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 {2+6 x+9 x^2+e^x \left (1+6 x+9 x^2\right )}{(1+3 x)^2} \, dx\\ &=\int \left (e^x+\frac {2+6 x+9 x^2}{(1+3 x)^2}\right ) \, dx\\ &=\int e^x \, dx+\int \frac {2+6 x+9 x^2}{(1+3 x)^2} \, dx\\ &=e^x+\int \left (1+\frac {1}{(1+3 x)^2}\right ) \, dx\\ &=e^x+x-\frac {1}{3 (1+3 x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 16, normalized size = 1.07 \begin {gather*} e^x+x-\frac {1}{3 (1+3 x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2 + 6*x + 9*x^2 + E^x*(1 + 6*x + 9*x^2))/(1 + 6*x + 9*x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 28, normalized size = 1.87 \begin {gather*} \frac {9 \, x^{2} + 3 \, {\left (3 \, x + 1\right )} e^{x} + 3 \, x - 1}{3 \, {\left (3 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((9*x^2+6*x+1)*exp(x)+9*x^2+6*x+2)/(9*x^2+6*x+1),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 28, normalized size = 1.87 \begin {gather*} \frac {9 \, x^{2} + 9 \, x e^{x} + 3 \, x + 3 \, e^{x} - 1}{3 \, {\left (3 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((9*x^2+6*x+1)*exp(x)+9*x^2+6*x+2)/(9*x^2+6*x+1),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 12, normalized size = 0.80




method result size



risch \(x -\frac {1}{9 \left (x +\frac {1}{3}\right )}+{\mathrm e}^{x}\) \(12\)
default \(x -\frac {1}{3 \left (3 x +1\right )}+{\mathrm e}^{x}\) \(14\)
norman \(\frac {2 x +3 x^{2}+3 \,{\mathrm e}^{x} x +{\mathrm e}^{x}}{3 x +1}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((9*x^2+6*x+1)*exp(x)+9*x^2+6*x+2)/(9*x^2+6*x+1),x,method=_RETURNVERBOSE)

[Out]

x-1/9/(x+1/3)+exp(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((9*x^2+6*x+1)*exp(x)+9*x^2+6*x+2)/(9*x^2+6*x+1),x, algorithm="maxima")

[Out]

x + 3*(3*x^2 + 2*x)*e^x/(9*x^2 + 6*x + 1) - 1/3*e^(-1/3)*exp_integral_e(2, -x - 1/3)/(3*x + 1) - 1/3/(3*x + 1)
 - 6*integrate(e^x/(27*x^3 + 27*x^2 + 9*x + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 13, normalized size = 0.87 \begin {gather*} x+{\mathrm {e}}^x-\frac {1}{3\,\left (3\,x+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x + exp(x)*(6*x + 9*x^2 + 1) + 9*x^2 + 2)/(6*x + 9*x^2 + 1),x)

[Out]

x + exp(x) - 1/(3*(3*x + 1))

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 10, normalized size = 0.67 \begin {gather*} x + e^{x} - \frac {1}{9 x + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((9*x**2+6*x+1)*exp(x)+9*x**2+6*x+2)/(9*x**2+6*x+1),x)

[Out]

x + exp(x) - 1/(9*x + 3)

________________________________________________________________________________________