3.47.71 \(\int \frac {2 x+(-6+2 e^2-2 x) \log (3-e^2+x)+(-21+e^{4+2 x} (-3+e^2-x)-10 x-x^2+e^2 (7+x)+e^{2+x} (18+e^2 (-6-x)+9 x+x^2)) \log ^2(3-e^2+x)}{(-6+2 e^2-2 x) \log ^2(3-e^2+x)} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.57, antiderivative size = 85, normalized size of antiderivative = 2.66, number of steps used = 15, number of rules used = 10, integrand size = 116, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {6688, 2194, 2176, 2411, 2353, 2297, 2298, 2302, 30, 2389} \begin {gather*} \frac {x^2}{4}+\frac {7 x}{2}+\frac {e^{x+2}}{2}+\frac {1}{4} e^{2 x+4}-\frac {1}{2} e^{x+2} (x+6)+\frac {x-e^2+3}{\log \left (x-e^2+3\right )}-\frac {3-e^2}{\log \left (x-e^2+3\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2*x + (-6 + 2*E^2 - 2*x)*Log[3 - E^2 + x] + (-21 + E^(4 + 2*x)*(-3 + E^2 - x) - 10*x - x^2 + E^2*(7 + x)
+ E^(2 + x)*(18 + E^2*(-6 - x) + 9*x + x^2))*Log[3 - E^2 + x]^2)/((-6 + 2*E^2 - 2*x)*Log[3 - E^2 + x]^2),x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

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 2297

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])^(p + 1))/(b*n*(p + 1))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2298

Int[Log[(c_.)*(x_)]^(-1), x_Symbol] :> Simp[LogIntegral[c*x]/c, x] /; FreeQ[c, x]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [C]  time = 0.11, size = 77, normalized size = 2.41 \begin {gather*} \frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}+\frac {1}{2} e^x \left (-5 e^2-e^2 x\right )-\text {Ei}\left (\log \left (3-e^2+x\right )\right )+\frac {x}{\log \left (3-e^2+x\right )}+\text {li}\left (3-e^2+x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2*x + (-6 + 2*E^2 - 2*x)*Log[3 - E^2 + x] + (-21 + E^(4 + 2*x)*(-3 + E^2 - x) - 10*x - x^2 + E^2*(7
 + x) + E^(2 + x)*(18 + E^2*(-6 - x) + 9*x + x^2))*Log[3 - E^2 + x]^2)/((-6 + 2*E^2 - 2*x)*Log[3 - E^2 + x]^2)
,x]

[Out]

E^(4 + 2*x)/4 + (7*x)/2 + x^2/4 + (E^x*(-5*E^2 - E^2*x))/2 - ExpIntegralEi[Log[3 - E^2 + x]] + x/Log[3 - E^2 +
 x] + LogIntegral[3 - E^2 + x]

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 47, normalized size = 1.47 \begin {gather*} \frac {{\left (x^{2} - 2 \, {\left (x + 5\right )} e^{\left (x + 2\right )} + 14 \, x + e^{\left (2 \, x + 4\right )}\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((exp(2)-3-x)*exp(2+x)^2+((-x-6)*exp(2)+x^2+9*x+18)*exp(2+x)+(x+7)*exp(2)-x^2-10*x-21)*log(-exp(2)+
3+x)^2+(2*exp(2)-2*x-6)*log(-exp(2)+3+x)+2*x)/(2*exp(2)-2*x-6)/log(-exp(2)+3+x)^2,x, algorithm="fricas")

[Out]

1/4*((x^2 - 2*(x + 5)*e^(x + 2) + 14*x + e^(2*x + 4))*log(x - e^2 + 3) + 4*x)/log(x - e^2 + 3)

________________________________________________________________________________________

giac [B]  time = 0.15, size = 83, normalized size = 2.59 \begin {gather*} \frac {x^{2} \log \left (x - e^{2} + 3\right ) - 2 \, x e^{\left (x + 2\right )} \log \left (x - e^{2} + 3\right ) + 14 \, x \log \left (x - e^{2} + 3\right ) + e^{\left (2 \, x + 4\right )} \log \left (x - e^{2} + 3\right ) - 10 \, e^{\left (x + 2\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((exp(2)-3-x)*exp(2+x)^2+((-x-6)*exp(2)+x^2+9*x+18)*exp(2+x)+(x+7)*exp(2)-x^2-10*x-21)*log(-exp(2)+
3+x)^2+(2*exp(2)-2*x-6)*log(-exp(2)+3+x)+2*x)/(2*exp(2)-2*x-6)/log(-exp(2)+3+x)^2,x, algorithm="giac")

[Out]

1/4*(x^2*log(x - e^2 + 3) - 2*x*e^(x + 2)*log(x - e^2 + 3) + 14*x*log(x - e^2 + 3) + e^(2*x + 4)*log(x - e^2 +
 3) - 10*e^(x + 2)*log(x - e^2 + 3) + 4*x)/log(x - e^2 + 3)

________________________________________________________________________________________

maple [A]  time = 0.11, size = 43, normalized size = 1.34




method result size



risch \(\frac {7 x}{2}+\frac {x^{2}}{4}+\frac {{\mathrm e}^{2 x +4}}{4}-\frac {5 \,{\mathrm e}^{2+x}}{2}-\frac {x \,{\mathrm e}^{2+x}}{2}+\frac {x}{\ln \left (-{\mathrm e}^{2}+3+x \right )}\) \(43\)
default \(\frac {7 x}{2}+\frac {x^{2}}{4}+\frac {{\mathrm e}^{2 x +4}}{4}-\frac {{\mathrm e}^{2+x} \left (2+x \right )}{2}-\frac {3 \,{\mathrm e}^{2+x}}{2}+\frac {-{\mathrm e}^{2}+3+x}{\ln \left (-{\mathrm e}^{2}+3+x \right )}+\frac {{\mathrm e}^{2}}{\ln \left (-{\mathrm e}^{2}+3+x \right )}-\frac {3}{\ln \left (-{\mathrm e}^{2}+3+x \right )}\) \(76\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((exp(2)-3-x)*exp(2+x)^2+((-x-6)*exp(2)+x^2+9*x+18)*exp(2+x)+(x+7)*exp(2)-x^2-10*x-21)*ln(-exp(2)+3+x)^2+
(2*exp(2)-2*x-6)*ln(-exp(2)+3+x)+2*x)/(2*exp(2)-2*x-6)/ln(-exp(2)+3+x)^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 51, normalized size = 1.59 \begin {gather*} \frac {{\left (x^{2} - 2 \, {\left (x e^{2} + 5 \, e^{2}\right )} e^{x} + 14 \, x + e^{\left (2 \, x + 4\right )}\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((exp(2)-3-x)*exp(2+x)^2+((-x-6)*exp(2)+x^2+9*x+18)*exp(2+x)+(x+7)*exp(2)-x^2-10*x-21)*log(-exp(2)+
3+x)^2+(2*exp(2)-2*x-6)*log(-exp(2)+3+x)+2*x)/(2*exp(2)-2*x-6)/log(-exp(2)+3+x)^2,x, algorithm="maxima")

[Out]

1/4*((x^2 - 2*(x*e^2 + 5*e^2)*e^x + 14*x + e^(2*x + 4))*log(x - e^2 + 3) + 4*x)/log(x - e^2 + 3)

________________________________________________________________________________________

mupad [B]  time = 3.29, size = 42, normalized size = 1.31 \begin {gather*} \frac {7\,x}{2}-\frac {5\,{\mathrm {e}}^{x+2}}{2}+\frac {{\mathrm {e}}^{2\,x+4}}{4}-\frac {x\,{\mathrm {e}}^{x+2}}{2}+\frac {x}{\ln \left (x-{\mathrm {e}}^2+3\right )}+\frac {x^2}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(x - exp(2) + 3)^2*(10*x - exp(x + 2)*(9*x - exp(2)*(x + 6) + x^2 + 18) + exp(2*x + 4)*(x - exp(2) + 3
) - exp(2)*(x + 7) + x^2 + 21) - 2*x + log(x - exp(2) + 3)*(2*x - 2*exp(2) + 6))/(log(x - exp(2) + 3)^2*(2*x -
 2*exp(2) + 6)),x)

[Out]

(7*x)/2 - (5*exp(x + 2))/2 + exp(2*x + 4)/4 - (x*exp(x + 2))/2 + x/log(x - exp(2) + 3) + x^2/4

________________________________________________________________________________________

sympy [A]  time = 0.48, size = 41, normalized size = 1.28 \begin {gather*} \frac {x^{2}}{4} + \frac {7 x}{2} + \frac {x}{\log {\left (x - e^{2} + 3 \right )}} + \frac {\left (- 4 x - 20\right ) e^{x + 2}}{8} + \frac {e^{2 x + 4}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((exp(2)-3-x)*exp(2+x)**2+((-x-6)*exp(2)+x**2+9*x+18)*exp(2+x)+(x+7)*exp(2)-x**2-10*x-21)*ln(-exp(2
)+3+x)**2+(2*exp(2)-2*x-6)*ln(-exp(2)+3+x)+2*x)/(2*exp(2)-2*x-6)/ln(-exp(2)+3+x)**2,x)

[Out]

x**2/4 + 7*x/2 + x/log(x - exp(2) + 3) + (-4*x - 20)*exp(x + 2)/8 + exp(2*x + 4)/4

________________________________________________________________________________________