3.64.21 \(\int \frac {9-6 e+e^2+(5-2 e) e^x+e^{2 x}}{9-6 e+e^2+(6-2 e) e^x+e^{2 x}} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 12, normalized size of antiderivative = 0.92, number of steps used = 3, number of rules used = 2, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {2282, 893} \begin {gather*} x+\frac {1}{e^x+3-e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\operatorname {Subst}\left (\int \frac {(-3+e)^2+(5-2 e) x+x^2}{x (3-e+x)^2} \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \left (-\frac {1}{(-3+e-x)^2}+\frac {1}{x}\right ) \, dx,x,e^x\right )\\ &=\frac {1}{3-e+e^x}+x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 12, normalized size = 0.92 \begin {gather*} \frac {1}{3-e+e^x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 25, normalized size = 1.92 \begin {gather*} \frac {x e - x e^{x} - 3 \, x - 1}{e - e^{x} - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*e - x*e^x - 3*x - 1)/(e - e^x - 3)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: sageVARx-1/sqrt(-exp(1)^2+exp(2))*atan((
exp(sageVARx)-exp(1)+3)/sqrt(-exp(1)^2+exp(2)))

________________________________________________________________________________________

maple [A]  time = 0.40, size = 15, normalized size = 1.15




method result size



risch \(x -\frac {1}{-{\mathrm e}^{x}+{\mathrm e}-3}\) \(15\)
norman \(\frac {\left ({\mathrm e}-3\right ) x -{\mathrm e}^{x} x -1}{-{\mathrm e}^{x}+{\mathrm e}-3}\) \(25\)
default \(\frac {\frac {{\mathrm e}^{2} x}{{\mathrm e}-3}+\frac {{\mathrm e}^{2}}{{\mathrm e}-3}-\frac {{\mathrm e}^{2} x \,{\mathrm e}^{x}}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}}{-{\mathrm e}^{x}+{\mathrm e}-3}-\frac {{\mathrm e}^{2} \ln \left (-{\mathrm e}^{x}+{\mathrm e}-3\right )}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}-\frac {{\mathrm e}}{-{\mathrm e}^{x}+{\mathrm e}-3}+\frac {2}{-{\mathrm e}^{x}+{\mathrm e}-3}+\ln \left (-{\mathrm e}^{x}+{\mathrm e}-3\right )+\frac {\frac {9 x}{{\mathrm e}-3}+\frac {9}{{\mathrm e}-3}-\frac {9 x \,{\mathrm e}^{x}}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}}{-{\mathrm e}^{x}+{\mathrm e}-3}-\frac {9 \ln \left (-{\mathrm e}^{x}+{\mathrm e}-3\right )}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}+\frac {-\frac {6 \,{\mathrm e}}{{\mathrm e}-3}-\frac {6 \,{\mathrm e} x}{{\mathrm e}-3}+\frac {6 \,{\mathrm e} x \,{\mathrm e}^{x}}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}}{-{\mathrm e}^{x}+{\mathrm e}-3}+\frac {6 \,{\mathrm e} \ln \left (-{\mathrm e}^{x}+{\mathrm e}-3\right )}{{\mathrm e}^{2}-6 \,{\mathrm e}+9}\) \(266\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 14, normalized size = 1.08 \begin {gather*} x - \frac {1}{e - e^{x} - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/(e - e^x - 3)

________________________________________________________________________________________

mupad [B]  time = 4.16, size = 28, normalized size = 2.15 \begin {gather*} \frac {1}{{\mathrm {e}}^x-\mathrm {e}+3}-\frac {3\,x-x\,\mathrm {e}}{\mathrm {e}-3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)**2+(-2*exp(1)+5)*exp(x)+exp(1)**2-6*exp(1)+9)/(exp(x)**2+(-2*exp(1)+6)*exp(x)+exp(1)**2-6*ex
p(1)+9),x)

[Out]

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

________________________________________________________________________________________