Integrand size = 143, antiderivative size = 31 \[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=-2+e^{2 \left (-x+\frac {x^2 \left (-e^x+x\right )}{2+x}\right ) (2+\log (4))}+x \]
\[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=\int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx \]
Integrate[(4 + 4*x + x^2 + E^((2*(-4*x - 2*x^2 + 2*x^3 + (-2*x - x^2 + x^3 )*Log[4] + E^x*(-2*x^2 - x^2*Log[4])))/(2 + x))*(-16 - 16*x + 20*x^2 + 8*x ^3 + (-8 - 8*x + 10*x^2 + 4*x^3)*Log[4] + E^x*(-16*x - 12*x^2 - 4*x^3 + (- 8*x - 6*x^2 - 2*x^3)*Log[4])))/(4 + 4*x + x^2),x]
Integrate[(4 + 4*x + x^2 + E^((2*(-4*x - 2*x^2 + 2*x^3 + (-2*x - x^2 + x^3 )*Log[4] + E^x*(-2*x^2 - x^2*Log[4])))/(2 + x))*(-16 - 16*x + 20*x^2 + 8*x ^3 + (-8 - 8*x + 10*x^2 + 4*x^3)*Log[4] + E^x*(-16*x - 12*x^2 - 4*x^3 + (- 8*x - 6*x^2 - 2*x^3)*Log[4])))/(4 + 4*x + x^2), x]
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (8 x^3+20 x^2+e^x \left (-4 x^3-12 x^2+\left (-2 x^3-6 x^2-8 x\right ) \log (4)-16 x\right )+\left (4 x^3+10 x^2-8 x-8\right ) \log (4)-16 x-16\right ) \exp \left (\frac {2 \left (2 x^3-2 x^2+e^x \left (x^2 (-\log (4))-2 x^2\right )+\left (x^3-x^2-2 x\right ) \log (4)-4 x\right )}{x+2}\right )+x^2+4 x+4}{x^2+4 x+4} \, dx\) |
\(\Big \downarrow \) 2007 |
\(\displaystyle \int \frac {\left (8 x^3+20 x^2+e^x \left (-4 x^3-12 x^2+\left (-2 x^3-6 x^2-8 x\right ) \log (4)-16 x\right )+\left (4 x^3+10 x^2-8 x-8\right ) \log (4)-16 x-16\right ) \exp \left (\frac {2 \left (2 x^3-2 x^2+e^x \left (x^2 (-\log (4))-2 x^2\right )+\left (x^3-x^2-2 x\right ) \log (4)-4 x\right )}{x+2}\right )+x^2+4 x+4}{(x+2)^2}dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {2^{\frac {4 x^3-4 x^2-7 x+2}{x+2}} \left (e^x x^3-2 x^3+3 e^x x^2-5 x^2+4 e^x x+4 x+4\right ) (-2-\log (4)) \exp \left (-\frac {2 x \left (-2 x^2+x \left (e^x (2+\log (4))+2\right )+4\right )}{x+2}\right )}{(x+2)^2}+1\right )dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \left (\frac {2^{\frac {4 x^3-4 x^2-7 x+2}{x+2}} \left (e^x x^3-2 x^3+3 e^x x^2-5 x^2+4 e^x x+4 x+4\right ) (-2-\log (4)) \exp \left (-\frac {2 x \left (-2 x^2+x \left (e^x (2+\log (4))+2\right )+4\right )}{x+2}\right )}{(x+2)^2}+1\right )dx\) |
Int[(4 + 4*x + x^2 + E^((2*(-4*x - 2*x^2 + 2*x^3 + (-2*x - x^2 + x^3)*Log[ 4] + E^x*(-2*x^2 - x^2*Log[4])))/(2 + x))*(-16 - 16*x + 20*x^2 + 8*x^3 + ( -8 - 8*x + 10*x^2 + 4*x^3)*Log[4] + E^x*(-16*x - 12*x^2 - 4*x^3 + (-8*x - 6*x^2 - 2*x^3)*Log[4])))/(4 + 4*x + x^2),x]
3.15.21.3.1 Defintions of rubi rules used
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{a = Rt[Coeff[Px, x, 0], Expon[Px, x]], b = Rt[Coeff[Px, x, Expon[Px, x]], Expon[Px, x]]}, Int[u*(a + b*x)^(Ex pon[Px, x]*p), x] /; EqQ[Px, (a + b*x)^Expon[Px, x]]] /; IntegerQ[p] && Pol yQ[Px, x] && GtQ[Expon[Px, x], 1] && NeQ[Coeff[Px, x, 0], 0]
Time = 1.88 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90
method | result | size |
risch | \({\mathrm e}^{-\frac {4 x \left (1+\ln \left (2\right )\right ) \left ({\mathrm e}^{x} x -x^{2}+x +2\right )}{2+x}}+x\) | \(28\) |
parallelrisch | \({\mathrm e}^{\frac {2 \left (-2 x^{2} \ln \left (2\right )-2 x^{2}\right ) {\mathrm e}^{x}+2 \left (2 x^{3}-2 x^{2}-4 x \right ) \ln \left (2\right )+4 x^{3}-4 x^{2}-8 x}{2+x}}+x -8\) | \(59\) |
norman | \(\frac {x^{2}+x \,{\mathrm e}^{\frac {2 \left (-2 x^{2} \ln \left (2\right )-2 x^{2}\right ) {\mathrm e}^{x}+2 \left (2 x^{3}-2 x^{2}-4 x \right ) \ln \left (2\right )+4 x^{3}-4 x^{2}-8 x}{2+x}}+2 \,{\mathrm e}^{\frac {2 \left (-2 x^{2} \ln \left (2\right )-2 x^{2}\right ) {\mathrm e}^{x}+2 \left (2 x^{3}-2 x^{2}-4 x \right ) \ln \left (2\right )+4 x^{3}-4 x^{2}-8 x}{2+x}}-4}{2+x}\) | \(126\) |
int((((2*(-2*x^3-6*x^2-8*x)*ln(2)-4*x^3-12*x^2-16*x)*exp(x)+2*(4*x^3+10*x^ 2-8*x-8)*ln(2)+8*x^3+20*x^2-16*x-16)*exp(((-2*x^2*ln(2)-2*x^2)*exp(x)+2*(x ^3-x^2-2*x)*ln(2)+2*x^3-2*x^2-4*x)/(2+x))^2+x^2+4*x+4)/(x^2+4*x+4),x,metho d=_RETURNVERBOSE)
Time = 0.25 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.65 \[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=x + e^{\left (\frac {4 \, {\left (x^{3} - x^{2} - {\left (x^{2} \log \left (2\right ) + x^{2}\right )} e^{x} + {\left (x^{3} - x^{2} - 2 \, x\right )} \log \left (2\right ) - 2 \, x\right )}}{x + 2}\right )} \]
integrate((((2*(-2*x^3-6*x^2-8*x)*log(2)-4*x^3-12*x^2-16*x)*exp(x)+2*(4*x^ 3+10*x^2-8*x-8)*log(2)+8*x^3+20*x^2-16*x-16)*exp(((-2*x^2*log(2)-2*x^2)*ex p(x)+2*(x^3-x^2-2*x)*log(2)+2*x^3-2*x^2-4*x)/(2+x))^2+x^2+4*x+4)/(x^2+4*x+ 4),x, algorithm=\
Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (26) = 52\).
Time = 0.34 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.87 \[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=x + e^{\frac {2 \cdot \left (2 x^{3} - 2 x^{2} - 4 x + \left (- 2 x^{2} - 2 x^{2} \log {\left (2 \right )}\right ) e^{x} + \left (2 x^{3} - 2 x^{2} - 4 x\right ) \log {\left (2 \right )}\right )}{x + 2}} \]
integrate((((2*(-2*x**3-6*x**2-8*x)*ln(2)-4*x**3-12*x**2-16*x)*exp(x)+2*(4 *x**3+10*x**2-8*x-8)*ln(2)+8*x**3+20*x**2-16*x-16)*exp(((-2*x**2*ln(2)-2*x **2)*exp(x)+2*(x**3-x**2-2*x)*ln(2)+2*x**3-2*x**2-4*x)/(2+x))**2+x**2+4*x+ 4)/(x**2+4*x+4),x)
x + exp(2*(2*x**3 - 2*x**2 - 4*x + (-2*x**2 - 2*x**2*log(2))*exp(x) + (2*x **3 - 2*x**2 - 4*x)*log(2))/(x + 2))
Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (29) = 58\).
Time = 0.55 (sec) , antiderivative size = 85, normalized size of antiderivative = 2.74 \[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=x + 65536 \, e^{\left (4 \, x^{2} \log \left (2\right ) - 4 \, x e^{x} \log \left (2\right ) + 4 \, x^{2} - 4 \, x e^{x} - 12 \, x \log \left (2\right ) + 8 \, e^{x} \log \left (2\right ) - 12 \, x - \frac {16 \, e^{x} \log \left (2\right )}{x + 2} - \frac {16 \, e^{x}}{x + 2} - \frac {32 \, \log \left (2\right )}{x + 2} - \frac {32}{x + 2} + 8 \, e^{x} + 16\right )} \]
integrate((((2*(-2*x^3-6*x^2-8*x)*log(2)-4*x^3-12*x^2-16*x)*exp(x)+2*(4*x^ 3+10*x^2-8*x-8)*log(2)+8*x^3+20*x^2-16*x-16)*exp(((-2*x^2*log(2)-2*x^2)*ex p(x)+2*(x^3-x^2-2*x)*log(2)+2*x^3-2*x^2-4*x)/(2+x))^2+x^2+4*x+4)/(x^2+4*x+ 4),x, algorithm=\
x + 65536*e^(4*x^2*log(2) - 4*x*e^x*log(2) + 4*x^2 - 4*x*e^x - 12*x*log(2) + 8*e^x*log(2) - 12*x - 16*e^x*log(2)/(x + 2) - 16*e^x/(x + 2) - 32*log(2 )/(x + 2) - 32/(x + 2) + 8*e^x + 16)
\[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=\int { \frac {x^{2} + 4 \, {\left (2 \, x^{3} + 5 \, x^{2} - {\left (x^{3} + 3 \, x^{2} + {\left (x^{3} + 3 \, x^{2} + 4 \, x\right )} \log \left (2\right ) + 4 \, x\right )} e^{x} + {\left (2 \, x^{3} + 5 \, x^{2} - 4 \, x - 4\right )} \log \left (2\right ) - 4 \, x - 4\right )} e^{\left (\frac {4 \, {\left (x^{3} - x^{2} - {\left (x^{2} \log \left (2\right ) + x^{2}\right )} e^{x} + {\left (x^{3} - x^{2} - 2 \, x\right )} \log \left (2\right ) - 2 \, x\right )}}{x + 2}\right )} + 4 \, x + 4}{x^{2} + 4 \, x + 4} \,d x } \]
integrate((((2*(-2*x^3-6*x^2-8*x)*log(2)-4*x^3-12*x^2-16*x)*exp(x)+2*(4*x^ 3+10*x^2-8*x-8)*log(2)+8*x^3+20*x^2-16*x-16)*exp(((-2*x^2*log(2)-2*x^2)*ex p(x)+2*(x^3-x^2-2*x)*log(2)+2*x^3-2*x^2-4*x)/(2+x))^2+x^2+4*x+4)/(x^2+4*x+ 4),x, algorithm=\
integrate((x^2 + 4*(2*x^3 + 5*x^2 - (x^3 + 3*x^2 + (x^3 + 3*x^2 + 4*x)*log (2) + 4*x)*e^x + (2*x^3 + 5*x^2 - 4*x - 4)*log(2) - 4*x - 4)*e^(4*(x^3 - x ^2 - (x^2*log(2) + x^2)*e^x + (x^3 - x^2 - 2*x)*log(2) - 2*x)/(x + 2)) + 4 *x + 4)/(x^2 + 4*x + 4), x)
Time = 12.42 (sec) , antiderivative size = 101, normalized size of antiderivative = 3.26 \[ \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx=x+\frac {2^{\frac {4\,x^3}{x+2}}\,{\mathrm {e}}^{-\frac {8\,x}{x+2}}\,{\mathrm {e}}^{-\frac {4\,x^2\,{\mathrm {e}}^x}{x+2}}\,{\mathrm {e}}^{-\frac {4\,x^2}{x+2}}\,{\mathrm {e}}^{\frac {4\,x^3}{x+2}}}{2^{\frac {8\,x}{x+2}}\,2^{\frac {4\,x^2\,{\mathrm {e}}^x}{x+2}}\,2^{\frac {4\,x^2}{x+2}}} \]
int((4*x + x^2 - exp(-(2*(4*x + 2*log(2)*(2*x + x^2 - x^3) + exp(x)*(2*x^2 *log(2) + 2*x^2) + 2*x^2 - 2*x^3))/(x + 2))*(16*x + exp(x)*(16*x + 2*log(2 )*(8*x + 6*x^2 + 2*x^3) + 12*x^2 + 4*x^3) + 2*log(2)*(8*x - 10*x^2 - 4*x^3 + 8) - 20*x^2 - 8*x^3 + 16) + 4)/(4*x + x^2 + 4),x)