3.76.89 \(\int \frac {1+x+3 x^2-e^2 x^2}{-x-3 x^2+e^2 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 20, normalized size of antiderivative = 0.83, number of steps used = 5, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {6, 1593, 893} \begin {gather*} -x-\log (x)+\log \left (\left (3-e^2\right ) x+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x + 3*x^2 - E^2*x^2)/(-x - 3*x^2 + E^2*x^2),x]

[Out]

-x - Log[x] + Log[1 + (3 - E^2)*x]

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 1593

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 20, normalized size = 0.83 \begin {gather*} -x-\log (x)+\log \left (1+3 x-e^2 x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x + 3*x^2 - E^2*x^2)/(-x - 3*x^2 + E^2*x^2),x]

[Out]

-x - Log[x] + Log[1 + 3*x - E^2*x]

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 18, normalized size = 0.75 \begin {gather*} -x + \log \left (x e^{2} - 3 \, x - 1\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + log(x*e^2 - 3*x - 1) - log(x)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 33, normalized size = 1.38 \begin {gather*} -\frac {x e^{2} - 3 \, x}{e^{2} - 3} + \log \left ({\left | x e^{2} - 3 \, x - 1 \right |}\right ) - \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.24, size = 19, normalized size = 0.79




method result size



default \(-x -\ln \relax (x )+\ln \left ({\mathrm e}^{2} x -3 x -1\right )\) \(19\)
norman \(-x -\ln \relax (x )+\ln \left ({\mathrm e}^{2} x -3 x -1\right )\) \(19\)
risch \(-x -\ln \relax (x )+\ln \left (1+x \left (-{\mathrm e}^{2}+3\right )\right )\) \(20\)
meijerg \(\frac {\left ({\mathrm e}^{2}-3\right ) \left (\ln \relax (x )+\ln \left (-{\mathrm e}^{2}+3\right )-\ln \left (1+x \left (-{\mathrm e}^{2}+3\right )\right )\right )}{-{\mathrm e}^{2}+3}-\frac {x \left (-{\mathrm e}^{2}+3\right )-\ln \left (1+x \left (-{\mathrm e}^{2}+3\right )\right )}{-{\mathrm e}^{2}+3}-\frac {\ln \left (1+x \left (-{\mathrm e}^{2}+3\right )\right )}{-{\mathrm e}^{2}+3}\) \(91\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 17, normalized size = 0.71 \begin {gather*} -x + \log \left (x {\left (e^{2} - 3\right )} - 1\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + log(x*(e^2 - 3) - 1) - log(x)

________________________________________________________________________________________

mupad [B]  time = 4.54, size = 17, normalized size = 0.71 \begin {gather*} -x-2\,\mathrm {atanh}\left (x\,\left (2\,{\mathrm {e}}^2-6\right )-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- x - 2*atanh(x*(2*exp(2) - 6) - 1)

________________________________________________________________________________________

sympy [A]  time = 0.23, size = 15, normalized size = 0.62 \begin {gather*} - x - \log {\relax (x )} + \log {\left (x - \frac {2}{-6 + 2 e^{2}} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2*exp(2)+3*x**2+x+1)/(x**2*exp(2)-3*x**2-x),x)

[Out]

-x - log(x) + log(x - 2/(-6 + 2*exp(2)))

________________________________________________________________________________________