Integrand size = 72, antiderivative size = 23 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=\left (-1+e^3-e^4-x+\log \left (3+\frac {3}{x}\right )\right )^2 \] Output:
(exp(3)-exp(4)+ln(3/x+3)-1-x)^2
Time = 0.02 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=\left (1-e^3+e^4+x-\log \left (3+\frac {3}{x}\right )\right )^2 \] Input:
Integrate[(2 + 4*x + 4*x^2 + 2*x^3 + E^3*(-2 - 2*x - 2*x^2) + E^4*(2 + 2*x + 2*x^2) + (-2 - 2*x - 2*x^2)*Log[(3 + 3*x)/x])/(x + x^2),x]
Output:
(1 - E^3 + E^4 + x - Log[3 + 3/x])^2
Time = 0.52 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {2026, 7239, 27, 7237}
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 {2 x^3+4 x^2+e^3 \left (-2 x^2-2 x-2\right )+e^4 \left (2 x^2+2 x+2\right )+\left (-2 x^2-2 x-2\right ) \log \left (\frac {3 x+3}{x}\right )+4 x+2}{x^2+x} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {2 x^3+4 x^2+e^3 \left (-2 x^2-2 x-2\right )+e^4 \left (2 x^2+2 x+2\right )+\left (-2 x^2-2 x-2\right ) \log \left (\frac {3 x+3}{x}\right )+4 x+2}{x (x+1)}dx\) |
\(\Big \downarrow \) 7239 |
\(\displaystyle \int \frac {2 \left (x^2+x+1\right ) \left (x-\log \left (\frac {3}{x}+3\right )+(e-1) e^3+1\right )}{x (x+1)}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 2 \int \frac {\left (x^2+x+1\right ) \left (x-\log \left (3+\frac {3}{x}\right )-(1-e) e^3+1\right )}{x (x+1)}dx\) |
\(\Big \downarrow \) 7237 |
\(\displaystyle \left (x-\log \left (\frac {3}{x}+3\right )+e^4-e^3+1\right )^2\) |
Input:
Int[(2 + 4*x + 4*x^2 + 2*x^3 + E^3*(-2 - 2*x - 2*x^2) + E^4*(2 + 2*x + 2*x ^2) + (-2 - 2*x - 2*x^2)*Log[(3 + 3*x)/x])/(x + x^2),x]
Output:
(1 - E^3 + E^4 + x - Log[3 + 3/x])^2
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p *r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ erQ[p] && !MonomialQ[Px, x] && (ILtQ[p, 0] || !PolyQ[u, x])
Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Si mp[q*(y^(m + 1)/(m + 1)), x] /; !FalseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; Simpl erIntegrandQ[v, u, x]]
Leaf count of result is larger than twice the leaf count of optimal. \(62\) vs. \(2(21)=42\).
Time = 0.50 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.74
method | result | size |
derivativedivides | \(\frac {2 \left (3 \,{\mathrm e}^{4}-3 \,{\mathrm e}^{3}+3\right ) x}{3}+x^{2}-2 \left ({\mathrm e}^{4}-{\mathrm e}^{3}\right ) \ln \left (\frac {3}{x}+3\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}+\ln \left (\frac {3}{x}+3\right )^{2}\) | \(63\) |
default | \(\frac {2 \left (3 \,{\mathrm e}^{4}-3 \,{\mathrm e}^{3}+3\right ) x}{3}+x^{2}-2 \left ({\mathrm e}^{4}-{\mathrm e}^{3}\right ) \ln \left (\frac {3}{x}+3\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}+\ln \left (\frac {3}{x}+3\right )^{2}\) | \(63\) |
norman | \(x^{2}+\ln \left (\frac {3 x +3}{x}\right )^{2}+\left (2-2 \,{\mathrm e}^{3}+2 \,{\mathrm e}^{4}\right ) x +\left (-2 \,{\mathrm e}^{4}+2 \,{\mathrm e}^{3}-2\right ) \ln \left (\frac {3 x +3}{x}\right )-2 x \ln \left (\frac {3 x +3}{x}\right )\) | \(63\) |
parts | \(x^{2}+2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 x +2 \left (-{\mathrm e}^{4}+{\mathrm e}^{3}\right ) \ln \left (1+x \right )+2 \left ({\mathrm e}^{4}-{\mathrm e}^{3}+1\right ) \ln \left (x \right )+2 \ln \left (\frac {3}{x}\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}+\ln \left (\frac {3}{x}+3\right )^{2}\) | \(79\) |
parallelrisch | \(2 x \,{\mathrm e}^{4}-2 \ln \left (\frac {3 x +3}{x}\right ) {\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 \ln \left (\frac {3 x +3}{x}\right ) {\mathrm e}^{3}-5+x^{2}-2 x \ln \left (\frac {3 x +3}{x}\right )+\ln \left (\frac {3 x +3}{x}\right )^{2}-4 \,{\mathrm e}^{4}+4 \,{\mathrm e}^{3}+2 x -2 \ln \left (\frac {3 x +3}{x}\right )\) | \(87\) |
risch | \(2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+x^{2}+2 x -2 \,{\mathrm e}^{3} \ln \left (1+x \right ) {\mathrm e}+2 \,{\mathrm e}^{3} \ln \left (1+x \right )+2 \ln \left (x \right ) {\mathrm e}^{4}-2 \ln \left (x \right ) {\mathrm e}^{3}+2 \ln \left (x \right )+2 \ln \left (\frac {3}{x}\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}+\ln \left (\frac {3}{x}+3\right )^{2}\) | \(88\) |
Input:
int(((-2*x^2-2*x-2)*ln((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x-2)*exp( 3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x,method=_RETURNVERBOSE)
Output:
2/3*(3*exp(4)-3*exp(3)+3)*x+x^2-2*(exp(4)-exp(3))*ln(3/x+3)-2/3*ln(3/x+3)* (3/x+3)*x+ln(3/x+3)^2
Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (21) = 42\).
Time = 0.09 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.09 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=x^{2} + 2 \, x e^{4} - 2 \, x e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 1\right )} \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) + \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right )^{2} + 2 \, x \] Input:
integrate(((-2*x^2-2*x-2)*log((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x- 2)*exp(3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x, algorithm="fricas")
Output:
x^2 + 2*x*e^4 - 2*x*e^3 - 2*(x + e^4 - e^3 + 1)*log(3*(x + 1)/x) + log(3*( x + 1)/x)^2 + 2*x
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (17) = 34\).
Time = 0.19 (sec) , antiderivative size = 70, normalized size of antiderivative = 3.04 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=x^{2} - 2 x \log {\left (\frac {3 x + 3}{x} \right )} + x \left (- 2 e^{3} + 2 + 2 e^{4}\right ) + \left (- 2 e^{3} + 2 + 2 e^{4}\right ) \log {\left (x \right )} + \log {\left (\frac {3 x + 3}{x} \right )}^{2} + \left (- 2 e^{4} - 2 + 2 e^{3}\right ) \log {\left (x + 1 \right )} \] Input:
integrate(((-2*x**2-2*x-2)*ln((3*x+3)/x)+(2*x**2+2*x+2)*exp(4)+(-2*x**2-2* x-2)*exp(3)+2*x**3+4*x**2+4*x+2)/(x**2+x),x)
Output:
x**2 - 2*x*log((3*x + 3)/x) + x*(-2*exp(3) + 2 + 2*exp(4)) + (-2*exp(3) + 2 + 2*exp(4))*log(x) + log((3*x + 3)/x)**2 + (-2*exp(4) - 2 + 2*exp(3))*lo g(x + 1)
Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (21) = 42\).
Time = 0.16 (sec) , antiderivative size = 132, normalized size of antiderivative = 5.74 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=x^{2} + 2 \, x {\left (e^{4} - e^{3} - \log \left (3\right ) + 1\right )} - 2 \, {\left (\log \left (x + 1\right ) - \log \left (x\right )\right )} e^{4} + 2 \, {\left (\log \left (x + 1\right ) - \log \left (x\right )\right )} e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 2\right )} \log \left (x + 1\right ) + 2 \, e^{4} \log \left (x + 1\right ) - 2 \, e^{3} \log \left (x + 1\right ) - \log \left (x + 1\right )^{2} + 2 \, x \log \left (x\right ) + 2 \, \log \left (x + 1\right ) \log \left (x\right ) - \log \left (x\right )^{2} + 2 \, {\left (\log \left (x + 1\right ) - \log \left (x\right )\right )} \log \left (\frac {3}{x} + 3\right ) + 2 \, \log \left (x + 1\right ) + 2 \, \log \left (x\right ) \] Input:
integrate(((-2*x^2-2*x-2)*log((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x- 2)*exp(3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x, algorithm="maxima")
Output:
x^2 + 2*x*(e^4 - e^3 - log(3) + 1) - 2*(log(x + 1) - log(x))*e^4 + 2*(log( x + 1) - log(x))*e^3 - 2*(x + e^4 - e^3 + 2)*log(x + 1) + 2*e^4*log(x + 1) - 2*e^3*log(x + 1) - log(x + 1)^2 + 2*x*log(x) + 2*log(x + 1)*log(x) - lo g(x)^2 + 2*(log(x + 1) - log(x))*log(3/x + 3) + 2*log(x + 1) + 2*log(x)
\[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=\int { \frac {2 \, {\left (x^{3} + 2 \, x^{2} + {\left (x^{2} + x + 1\right )} e^{4} - {\left (x^{2} + x + 1\right )} e^{3} - {\left (x^{2} + x + 1\right )} \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) + 2 \, x + 1\right )}}{x^{2} + x} \,d x } \] Input:
integrate(((-2*x^2-2*x-2)*log((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x- 2)*exp(3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x, algorithm="giac")
Output:
integrate(2*(x^3 + 2*x^2 + (x^2 + x + 1)*e^4 - (x^2 + x + 1)*e^3 - (x^2 + x + 1)*log(3*(x + 1)/x) + 2*x + 1)/(x^2 + x), x)
Time = 4.31 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.57 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=\left (x-\ln \left (\frac {3\,\left (x+1\right )}{x}\right )\right )\,\left (x-2\,{\mathrm {e}}^3+2\,{\mathrm {e}}^4-\ln \left (\frac {3\,\left (x+1\right )}{x}\right )+2\right ) \] Input:
int((4*x - exp(3)*(2*x + 2*x^2 + 2) + exp(4)*(2*x + 2*x^2 + 2) - log((3*x + 3)/x)*(2*x + 2*x^2 + 2) + 4*x^2 + 2*x^3 + 2)/(x + x^2),x)
Output:
(x - log((3*(x + 1))/x))*(x - 2*exp(3) + 2*exp(4) - log((3*(x + 1))/x) + 2 )
Time = 0.16 (sec) , antiderivative size = 88, normalized size of antiderivative = 3.83 \[ \int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x+x^2} \, dx=-2 \,\mathrm {log}\left (x +1\right ) e^{4}+2 \,\mathrm {log}\left (x +1\right ) e^{3}+\mathrm {log}\left (\frac {3 x +3}{x}\right )^{2}-2 \,\mathrm {log}\left (\frac {3 x +3}{x}\right ) x -2 \,\mathrm {log}\left (\frac {3 x +3}{x}\right )+2 \,\mathrm {log}\left (x \right ) e^{4}-2 \,\mathrm {log}\left (x \right ) e^{3}+2 e^{4} x -2 e^{3} x +x^{2}+2 x \] Input:
int(((-2*x^2-2*x-2)*log((3*x+3)/x)+(2*x^2+2*x+2)*exp(4)+(-2*x^2-2*x-2)*exp (3)+2*x^3+4*x^2+4*x+2)/(x^2+x),x)
Output:
- 2*log(x + 1)*e**4 + 2*log(x + 1)*e**3 + log((3*x + 3)/x)**2 - 2*log((3* x + 3)/x)*x - 2*log((3*x + 3)/x) + 2*log(x)*e**4 - 2*log(x)*e**3 + 2*e**4* x - 2*e**3*x + x**2 + 2*x