3.62.21 \(\int \frac {3 x+e^x x+e^{2 x} (12 e^x x^2+36 x^3)+(-e^x-3 x) \log (e^x+3 x)}{3 e^x x^2+9 x^3} \, dx\) [6121]

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

[Out]

2*exp(x)^2+1/3*ln(exp(1/2*x)^2+3*x)/x

________________________________________________________________________________________

Rubi [A]
time = 0.64, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 6, integrand size = 64, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {6873, 12, 6874, 2225, 14, 2631} \begin {gather*} 2 e^{2 x}+\frac {\log \left (3 x+e^x\right )}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3*x + E^x*x + E^(2*x)*(12*E^x*x^2 + 36*x^3) + (-E^x - 3*x)*Log[E^x + 3*x])/(3*E^x*x^2 + 9*x^3),x]

[Out]

2*E^(2*x) + Log[E^x + 3*x]/(3*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 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2225

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 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6873

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

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

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 24, normalized size = 1.04 \begin {gather*} \frac {1}{3} \left (6 e^{2 x}+\frac {\log \left (e^x+3 x\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3*x + E^x*x + E^(2*x)*(12*E^x*x^2 + 36*x^3) + (-E^x - 3*x)*Log[E^x + 3*x])/(3*E^x*x^2 + 9*x^3),x]

[Out]

(6*E^(2*x) + Log[E^x + 3*x]/x)/3

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 20, normalized size = 0.87

method result size
risch \(\frac {\ln \left (3 x +{\mathrm e}^{x}\right )}{3 x}+2 \,{\mathrm e}^{2 x}\) \(20\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-exp(1/2*x)^2-3*x)*ln(exp(1/2*x)^2+3*x)+(12*x^2*exp(1/2*x)^2+36*x^3)*exp(x)^2+x*exp(1/2*x)^2+3*x)/(3*x^2
*exp(1/2*x)^2+9*x^3),x,method=_RETURNVERBOSE)

[Out]

1/3*ln(3*x+exp(x))/x+2*exp(2*x)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 20, normalized size = 0.87 \begin {gather*} \frac {6 \, x e^{\left (2 \, x\right )} + \log \left (3 \, x + e^{x}\right )}{3 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(1/2*x)^2-3*x)*log(exp(1/2*x)^2+3*x)+(12*x^2*exp(1/2*x)^2+36*x^3)*exp(x)^2+x*exp(1/2*x)^2+3*x)
/(3*x^2*exp(1/2*x)^2+9*x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 20, normalized size = 0.87 \begin {gather*} \frac {6 \, x e^{\left (2 \, x\right )} + \log \left (3 \, x + e^{x}\right )}{3 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(1/2*x)^2-3*x)*log(exp(1/2*x)^2+3*x)+(12*x^2*exp(1/2*x)^2+36*x^3)*exp(x)^2+x*exp(1/2*x)^2+3*x)
/(3*x^2*exp(1/2*x)^2+9*x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.11, size = 17, normalized size = 0.74 \begin {gather*} 2 e^{2 x} + \frac {\log {\left (3 x + e^{x} \right )}}{3 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(1/2*x)**2-3*x)*ln(exp(1/2*x)**2+3*x)+(12*x**2*exp(1/2*x)**2+36*x**3)*exp(x)**2+x*exp(1/2*x)**
2+3*x)/(3*x**2*exp(1/2*x)**2+9*x**3),x)

[Out]

2*exp(2*x) + log(3*x + exp(x))/(3*x)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 20, normalized size = 0.87 \begin {gather*} \frac {6 \, x e^{\left (2 \, x\right )} + \log \left (3 \, x + e^{x}\right )}{3 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(1/2*x)^2-3*x)*log(exp(1/2*x)^2+3*x)+(12*x^2*exp(1/2*x)^2+36*x^3)*exp(x)^2+x*exp(1/2*x)^2+3*x)
/(3*x^2*exp(1/2*x)^2+9*x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 4.63, size = 19, normalized size = 0.83 \begin {gather*} 2\,{\mathrm {e}}^{2\,x}+\frac {\ln \left (3\,x+{\mathrm {e}}^x\right )}{3\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + exp(2*x)*(12*x^2*exp(x) + 36*x^3) + x*exp(x) - log(3*x + exp(x))*(3*x + exp(x)))/(3*x^2*exp(x) + 9*
x^3),x)

[Out]

2*exp(2*x) + log(3*x + exp(x))/(3*x)

________________________________________________________________________________________