3.97.2 \(\int \frac {e^{\frac {e^{21+x}-3 x^2-e^x x^2}{3 x+e^x x}} (e^{21+x} (18+6 e^x-18 x)+54 x^2+36 e^x x^2+6 e^{2 x} x^2)+e^{\frac {2 (e^{21+x}-3 x^2-e^x x^2)}{3 x+e^x x}} (-18 x^2-12 e^x x^2-2 e^{2 x} x^2+e^{21+x} (-6-2 e^x+6 x))}{9 x^2+6 e^x x^2+e^{2 x} x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 30.83, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {e^{\frac {e^{21+x}-3 x^2-e^x x^2}{3 x+e^x x}} \left (e^{21+x} \left (18+6 e^x-18 x\right )+54 x^2+36 e^x x^2+6 e^{2 x} x^2\right )+\exp \left (\frac {2 \left (e^{21+x}-3 x^2-e^x x^2\right )}{3 x+e^x x}\right ) \left (-18 x^2-12 e^x x^2-2 e^{2 x} x^2+e^{21+x} \left (-6-2 e^x+6 x\right )\right )}{9 x^2+6 e^x x^2+e^{2 x} x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(E^((E^(21 + x) - 3*x^2 - E^x*x^2)/(3*x + E^x*x))*(E^(21 + x)*(18 + 6*E^x - 18*x) + 54*x^2 + 36*E^x*x^2 +
6*E^(2*x)*x^2) + E^((2*(E^(21 + x) - 3*x^2 - E^x*x^2))/(3*x + E^x*x))*(-18*x^2 - 12*E^x*x^2 - 2*E^(2*x)*x^2 +
E^(21 + x)*(-6 - 2*E^x + 6*x)))/(9*x^2 + 6*E^x*x^2 + E^(2*x)*x^2),x]

[Out]

6*Defer[Int][E^((E^(21 + x) - 3*x^2 - E^x*x^2)/((3 + E^x)*x)), x] - 2*Defer[Int][E^(-2*x + (2*E^(21 + x))/(3*x
 + E^x*x)), x] - 2*Defer[Int][E^(21 - 2*x + (2*E^(21 + x))/(3*x + E^x*x))/x^2, x] + 6*Defer[Int][E^(21 + (E^(2
1 + x) - 3*x^2 - E^x*x^2)/((3 + E^x)*x))/x^2, x] + 6*Defer[Int][E^(21 - 2*x + (2*E^(21 + x))/(3*x + E^x*x))/((
3 + E^x)*x^2), x] - 18*Defer[Int][E^(21 + (E^(21 + x) - 3*x^2 - E^x*x^2)/((3 + E^x)*x))/((3 + E^x)*x^2), x] -
18*Defer[Int][E^(21 - 2*x + (2*E^(21 + x))/(3*x + E^x*x))/((3 + E^x)^2*x), x] + 54*Defer[Int][E^(21 + (E^(21 +
 x) - 3*x^2 - E^x*x^2)/((3 + E^x)*x))/((3 + E^x)^2*x), x] + 6*Defer[Int][E^(21 - 2*x + (2*E^(21 + x))/(3*x + E
^x*x))/((3 + E^x)*x), x] - 18*Defer[Int][E^(21 + (E^(21 + x) - 3*x^2 - E^x*x^2)/((3 + E^x)*x))/((3 + E^x)*x),
x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.28, size = 59, normalized size = 2.27 \begin {gather*} -e^{\frac {e^{21} \left (1-\frac {6}{3+e^x}\right )}{x}-2 x} \left (-e^{\frac {e^{21}}{x}}+6 e^{\frac {3 e^{21}}{\left (3+e^x\right ) x}+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^((E^(21 + x) - 3*x^2 - E^x*x^2)/(3*x + E^x*x))*(E^(21 + x)*(18 + 6*E^x - 18*x) + 54*x^2 + 36*E^x*
x^2 + 6*E^(2*x)*x^2) + E^((2*(E^(21 + x) - 3*x^2 - E^x*x^2))/(3*x + E^x*x))*(-18*x^2 - 12*E^x*x^2 - 2*E^(2*x)*
x^2 + E^(21 + x)*(-6 - 2*E^x + 6*x)))/(9*x^2 + 6*E^x*x^2 + E^(2*x)*x^2),x]

[Out]

-(E^((E^21*(1 - 6/(3 + E^x)))/x - 2*x)*(-E^(E^21/x) + 6*E^((3*E^21)/((3 + E^x)*x) + x)))

________________________________________________________________________________________

fricas [B]  time = 0.61, size = 79, normalized size = 3.04 \begin {gather*} -6 \, e^{\left (-\frac {3 \, x^{2} e^{21} + {\left (x^{2} - e^{21}\right )} e^{\left (x + 21\right )}}{3 \, x e^{21} + x e^{\left (x + 21\right )}}\right )} + e^{\left (-\frac {2 \, {\left (3 \, x^{2} e^{21} + {\left (x^{2} - e^{21}\right )} e^{\left (x + 21\right )}\right )}}{3 \, x e^{21} + x e^{\left (x + 21\right )}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*exp(x)+6*x-6)*exp(x+21)-2*exp(x)^2*x^2-12*exp(x)*x^2-18*x^2)*exp((exp(x+21)-exp(x)*x^2-3*x^2)/
(exp(x)*x+3*x))^2+((6*exp(x)-18*x+18)*exp(x+21)+6*exp(x)^2*x^2+36*exp(x)*x^2+54*x^2)*exp((exp(x+21)-exp(x)*x^2
-3*x^2)/(exp(x)*x+3*x)))/(exp(x)^2*x^2+6*exp(x)*x^2+9*x^2),x, algorithm="fricas")

[Out]

-6*e^(-(3*x^2*e^21 + (x^2 - e^21)*e^(x + 21))/(3*x*e^21 + x*e^(x + 21))) + e^(-2*(3*x^2*e^21 + (x^2 - e^21)*e^
(x + 21))/(3*x*e^21 + x*e^(x + 21)))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*exp(x)+6*x-6)*exp(x+21)-2*exp(x)^2*x^2-12*exp(x)*x^2-18*x^2)*exp((exp(x+21)-exp(x)*x^2-3*x^2)/
(exp(x)*x+3*x))^2+((6*exp(x)-18*x+18)*exp(x+21)+6*exp(x)^2*x^2+36*exp(x)*x^2+54*x^2)*exp((exp(x+21)-exp(x)*x^2
-3*x^2)/(exp(x)*x+3*x)))/(exp(x)^2*x^2+6*exp(x)*x^2+9*x^2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Evaluation time: 0.75Unable to divide, perhaps due to rounding error%%%{-7776,[2,0,26,24]%%%}+%%%{-606528,[
2,0,25,24]%

________________________________________________________________________________________

maple [B]  time = 0.38, size = 64, normalized size = 2.46




method result size



risch \({\mathrm e}^{-\frac {2 \left ({\mathrm e}^{x} x^{2}+3 x^{2}-{\mathrm e}^{x +21}\right )}{x \left (3+{\mathrm e}^{x}\right )}}-6 \,{\mathrm e}^{-\frac {{\mathrm e}^{x} x^{2}+3 x^{2}-{\mathrm e}^{x +21}}{x \left (3+{\mathrm e}^{x}\right )}}\) \(64\)
norman \(\frac {{\mathrm e}^{x} x \,{\mathrm e}^{\frac {2 \,{\mathrm e}^{x +21}-2 \,{\mathrm e}^{x} x^{2}-6 x^{2}}{{\mathrm e}^{x} x +3 x}}-18 x \,{\mathrm e}^{\frac {{\mathrm e}^{x} {\mathrm e}^{21}-{\mathrm e}^{x} x^{2}-3 x^{2}}{{\mathrm e}^{x} x +3 x}}+3 x \,{\mathrm e}^{\frac {2 \,{\mathrm e}^{x +21}-2 \,{\mathrm e}^{x} x^{2}-6 x^{2}}{{\mathrm e}^{x} x +3 x}}-6 \,{\mathrm e}^{x} x \,{\mathrm e}^{\frac {{\mathrm e}^{x} {\mathrm e}^{21}-{\mathrm e}^{x} x^{2}-3 x^{2}}{{\mathrm e}^{x} x +3 x}}}{x \left (3+{\mathrm e}^{x}\right )}\) \(151\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-2*exp(x)+6*x-6)*exp(x+21)-2*exp(x)^2*x^2-12*exp(x)*x^2-18*x^2)*exp((exp(x+21)-exp(x)*x^2-3*x^2)/(exp(x
)*x+3*x))^2+((6*exp(x)-18*x+18)*exp(x+21)+6*exp(x)^2*x^2+36*exp(x)*x^2+54*x^2)*exp((exp(x+21)-exp(x)*x^2-3*x^2
)/(exp(x)*x+3*x)))/(exp(x)^2*x^2+6*exp(x)*x^2+9*x^2),x,method=_RETURNVERBOSE)

[Out]

exp(-2*(exp(x)*x^2+3*x^2-exp(x+21))/x/(3+exp(x)))-6*exp(-(exp(x)*x^2+3*x^2-exp(x+21))/x/(3+exp(x)))

________________________________________________________________________________________

maxima [B]  time = 0.51, size = 82, normalized size = 3.15 \begin {gather*} -{\left (6 \, e^{\left (\frac {x e^{x}}{e^{x} + 3} + \frac {3 \, x}{e^{x} + 3} + \frac {e^{\left (x + 21\right )}}{x e^{x} + 3 \, x}\right )} - e^{\left (\frac {2 \, e^{\left (x + 21\right )}}{x e^{x} + 3 \, x}\right )}\right )} e^{\left (-\frac {2 \, x e^{x}}{e^{x} + 3} - \frac {6 \, x}{e^{x} + 3}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*exp(x)+6*x-6)*exp(x+21)-2*exp(x)^2*x^2-12*exp(x)*x^2-18*x^2)*exp((exp(x+21)-exp(x)*x^2-3*x^2)/
(exp(x)*x+3*x))^2+((6*exp(x)-18*x+18)*exp(x+21)+6*exp(x)^2*x^2+36*exp(x)*x^2+54*x^2)*exp((exp(x+21)-exp(x)*x^2
-3*x^2)/(exp(x)*x+3*x)))/(exp(x)^2*x^2+6*exp(x)*x^2+9*x^2),x, algorithm="maxima")

[Out]

-(6*e^(x*e^x/(e^x + 3) + 3*x/(e^x + 3) + e^(x + 21)/(x*e^x + 3*x)) - e^(2*e^(x + 21)/(x*e^x + 3*x)))*e^(-2*x*e
^x/(e^x + 3) - 6*x/(e^x + 3))

________________________________________________________________________________________

mupad [B]  time = 7.95, size = 103, normalized size = 3.96 \begin {gather*} {\mathrm {e}}^{\frac {{\mathrm {e}}^{21}\,{\mathrm {e}}^x}{3\,x+x\,{\mathrm {e}}^x}}\,{\mathrm {e}}^{-\frac {2\,x^2\,{\mathrm {e}}^x}{3\,x+x\,{\mathrm {e}}^x}}\,{\mathrm {e}}^{-\frac {6\,x^2}{3\,x+x\,{\mathrm {e}}^x}}\,\left ({\mathrm {e}}^{\frac {{\mathrm {e}}^{21}\,{\mathrm {e}}^x}{3\,x+x\,{\mathrm {e}}^x}}-6\,{\mathrm {e}}^{\frac {x^2\,{\mathrm {e}}^x}{3\,x+x\,{\mathrm {e}}^x}}\,{\mathrm {e}}^{\frac {3\,x^2}{3\,x+x\,{\mathrm {e}}^x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-(2*(x^2*exp(x) - exp(x + 21) + 3*x^2))/(3*x + x*exp(x)))*(exp(x + 21)*(2*exp(x) - 6*x + 6) + 12*x^2
*exp(x) + 2*x^2*exp(2*x) + 18*x^2) - exp(-(x^2*exp(x) - exp(x + 21) + 3*x^2)/(3*x + x*exp(x)))*(exp(x + 21)*(6
*exp(x) - 18*x + 18) + 36*x^2*exp(x) + 6*x^2*exp(2*x) + 54*x^2))/(6*x^2*exp(x) + x^2*exp(2*x) + 9*x^2),x)

[Out]

exp((exp(21)*exp(x))/(3*x + x*exp(x)))*exp(-(2*x^2*exp(x))/(3*x + x*exp(x)))*exp(-(6*x^2)/(3*x + x*exp(x)))*(e
xp((exp(21)*exp(x))/(3*x + x*exp(x))) - 6*exp((x^2*exp(x))/(3*x + x*exp(x)))*exp((3*x^2)/(3*x + x*exp(x))))

________________________________________________________________________________________

sympy [B]  time = 0.54, size = 61, normalized size = 2.35 \begin {gather*} e^{\frac {2 \left (- x^{2} e^{x} - 3 x^{2} + e^{21} e^{x}\right )}{x e^{x} + 3 x}} - 6 e^{\frac {- x^{2} e^{x} - 3 x^{2} + e^{21} e^{x}}{x e^{x} + 3 x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-2*exp(x)+6*x-6)*exp(x+21)-2*exp(x)**2*x**2-12*exp(x)*x**2-18*x**2)*exp((exp(x+21)-exp(x)*x**2-3*
x**2)/(exp(x)*x+3*x))**2+((6*exp(x)-18*x+18)*exp(x+21)+6*exp(x)**2*x**2+36*exp(x)*x**2+54*x**2)*exp((exp(x+21)
-exp(x)*x**2-3*x**2)/(exp(x)*x+3*x)))/(exp(x)**2*x**2+6*exp(x)*x**2+9*x**2),x)

[Out]

exp(2*(-x**2*exp(x) - 3*x**2 + exp(21)*exp(x))/(x*exp(x) + 3*x)) - 6*exp((-x**2*exp(x) - 3*x**2 + exp(21)*exp(
x))/(x*exp(x) + 3*x))

________________________________________________________________________________________