Integrand size = 19, antiderivative size = 76 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=\frac {2 (e x)^{1+m}}{e (1+m)}+\frac {2 a (e x)^{2+m}}{e^2 (2+m)}-\frac {2 a^2 (e x)^{3+m}}{e^3 (3+m)}-\frac {2 a^3 (e x)^{4+m}}{e^4 (4+m)} \] Output:
2*(e*x)^(1+m)/e/(1+m)+2*a*(e*x)^(2+m)/e^2/(2+m)-2*a^2*(e*x)^(3+m)/e^3/(3+m )-2*a^3*(e*x)^(4+m)/e^4/(4+m)
Time = 0.07 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.09 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=\frac {(e x)^m \left (-2 x (1+a x)^3+\frac {2 (5+2 m) x \left (6+6 a x+2 a^2 x^2+(m+a m x)^2+m \left (5+8 a x+3 a^2 x^2\right )\right )}{(1+m) (2+m) (3+m)}\right )}{4+m} \] Input:
Integrate[(e*x)^m*(2 - 2*a*x)*(1 + a*x)^2,x]
Output:
((e*x)^m*(-2*x*(1 + a*x)^3 + (2*(5 + 2*m)*x*(6 + 6*a*x + 2*a^2*x^2 + (m + a*m*x)^2 + m*(5 + 8*a*x + 3*a^2*x^2)))/((1 + m)*(2 + m)*(3 + m))))/(4 + m)
Time = 0.20 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {84, 2009}
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 (2-2 a x) (a x+1)^2 (e x)^m \, dx\) |
\(\Big \downarrow \) 84 |
\(\displaystyle \int \left (-\frac {2 a^3 (e x)^{m+3}}{e^3}-\frac {2 a^2 (e x)^{m+2}}{e^2}+\frac {2 a (e x)^{m+1}}{e}+2 (e x)^m\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 a^3 (e x)^{m+4}}{e^4 (m+4)}-\frac {2 a^2 (e x)^{m+3}}{e^3 (m+3)}+\frac {2 a (e x)^{m+2}}{e^2 (m+2)}+\frac {2 (e x)^{m+1}}{e (m+1)}\) |
Input:
Int[(e*x)^m*(2 - 2*a*x)*(1 + a*x)^2,x]
Output:
(2*(e*x)^(1 + m))/(e*(1 + m)) + (2*a*(e*x)^(2 + m))/(e^2*(2 + m)) - (2*a^2 *(e*x)^(3 + m))/(e^3*(3 + m)) - (2*a^3*(e*x)^(4 + m))/(e^4*(4 + m))
Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_] : > Int[ExpandIntegrand[(a + b*x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] && !(ILtQ[n + p + 2, 0 ] && GtQ[n + 2*p, 0])
Time = 0.13 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.99
method | result | size |
norman | \(\frac {2 x \,{\mathrm e}^{m \ln \left (e x \right )}}{1+m}+\frac {2 a \,x^{2} {\mathrm e}^{m \ln \left (e x \right )}}{2+m}-\frac {2 a^{2} x^{3} {\mathrm e}^{m \ln \left (e x \right )}}{3+m}-\frac {2 a^{3} x^{4} {\mathrm e}^{m \ln \left (e x \right )}}{4+m}\) | \(75\) |
gosper | \(-\frac {2 \left (e x \right )^{m} \left (a^{3} m^{3} x^{3}+6 a^{3} m^{2} x^{3}+11 a^{3} x^{3} m +a^{2} m^{3} x^{2}+6 a^{3} x^{3}+7 a^{2} m^{2} x^{2}+14 a^{2} m \,x^{2}-a \,m^{3} x +8 a^{2} x^{2}-8 a \,m^{2} x -19 a x m -m^{3}-12 a x -9 m^{2}-26 m -24\right ) x}{\left (4+m \right ) \left (3+m \right ) \left (2+m \right ) \left (1+m \right )}\) | \(143\) |
risch | \(-\frac {2 \left (e x \right )^{m} \left (a^{3} m^{3} x^{3}+6 a^{3} m^{2} x^{3}+11 a^{3} x^{3} m +a^{2} m^{3} x^{2}+6 a^{3} x^{3}+7 a^{2} m^{2} x^{2}+14 a^{2} m \,x^{2}-a \,m^{3} x +8 a^{2} x^{2}-8 a \,m^{2} x -19 a x m -m^{3}-12 a x -9 m^{2}-26 m -24\right ) x}{\left (4+m \right ) \left (3+m \right ) \left (2+m \right ) \left (1+m \right )}\) | \(143\) |
orering | \(\frac {\left (a^{3} m^{3} x^{3}+6 a^{3} m^{2} x^{3}+11 a^{3} x^{3} m +a^{2} m^{3} x^{2}+6 a^{3} x^{3}+7 a^{2} m^{2} x^{2}+14 a^{2} m \,x^{2}-a \,m^{3} x +8 a^{2} x^{2}-8 a \,m^{2} x -19 a x m -m^{3}-12 a x -9 m^{2}-26 m -24\right ) x \left (e x \right )^{m} \left (-2 a x +2\right )}{\left (4+m \right ) \left (3+m \right ) \left (2+m \right ) \left (1+m \right ) \left (a x -1\right )}\) | \(155\) |
parallelrisch | \(-\frac {2 x^{4} \left (e x \right )^{m} a^{3} m^{3}+12 x^{4} \left (e x \right )^{m} a^{3} m^{2}+22 x^{4} \left (e x \right )^{m} a^{3} m +2 x^{3} \left (e x \right )^{m} a^{2} m^{3}+12 x^{4} \left (e x \right )^{m} a^{3}+14 x^{3} \left (e x \right )^{m} a^{2} m^{2}+28 x^{3} \left (e x \right )^{m} a^{2} m -2 x^{2} \left (e x \right )^{m} a \,m^{3}+16 x^{3} \left (e x \right )^{m} a^{2}-16 x^{2} \left (e x \right )^{m} a \,m^{2}-38 x^{2} \left (e x \right )^{m} a m -2 x \left (e x \right )^{m} m^{3}-24 x^{2} \left (e x \right )^{m} a -18 x \left (e x \right )^{m} m^{2}-52 x \left (e x \right )^{m} m -48 \left (e x \right )^{m} x}{\left (4+m \right ) \left (3+m \right ) \left (2+m \right ) \left (1+m \right )}\) | \(232\) |
Input:
int((e*x)^m*(-2*a*x+2)*(a*x+1)^2,x,method=_RETURNVERBOSE)
Output:
2/(1+m)*x*exp(m*ln(e*x))+2*a/(2+m)*x^2*exp(m*ln(e*x))-2*a^2/(3+m)*x^3*exp( m*ln(e*x))-2*a^3/(4+m)*x^4*exp(m*ln(e*x))
Time = 0.08 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.71 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=-\frac {2 \, {\left ({\left (a^{3} m^{3} + 6 \, a^{3} m^{2} + 11 \, a^{3} m + 6 \, a^{3}\right )} x^{4} + {\left (a^{2} m^{3} + 7 \, a^{2} m^{2} + 14 \, a^{2} m + 8 \, a^{2}\right )} x^{3} - {\left (a m^{3} + 8 \, a m^{2} + 19 \, a m + 12 \, a\right )} x^{2} - {\left (m^{3} + 9 \, m^{2} + 26 \, m + 24\right )} x\right )} \left (e x\right )^{m}}{m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24} \] Input:
integrate((e*x)^m*(-2*a*x+2)*(a*x+1)^2,x, algorithm="fricas")
Output:
-2*((a^3*m^3 + 6*a^3*m^2 + 11*a^3*m + 6*a^3)*x^4 + (a^2*m^3 + 7*a^2*m^2 + 14*a^2*m + 8*a^2)*x^3 - (a*m^3 + 8*a*m^2 + 19*a*m + 12*a)*x^2 - (m^3 + 9*m ^2 + 26*m + 24)*x)*(e*x)^m/(m^4 + 10*m^3 + 35*m^2 + 50*m + 24)
Leaf count of result is larger than twice the leaf count of optimal. 641 vs. \(2 (66) = 132\).
Time = 0.29 (sec) , antiderivative size = 641, normalized size of antiderivative = 8.43 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=\begin {cases} \frac {- 2 a^{3} \log {\left (x \right )} + \frac {2 a^{2}}{x} - \frac {a}{x^{2}} - \frac {2}{3 x^{3}}}{e^{4}} & \text {for}\: m = -4 \\\frac {- 2 a^{3} x - 2 a^{2} \log {\left (x \right )} - \frac {2 a}{x} - \frac {1}{x^{2}}}{e^{3}} & \text {for}\: m = -3 \\\frac {- a^{3} x^{2} - 2 a^{2} x + 2 a \log {\left (x \right )} - \frac {2}{x}}{e^{2}} & \text {for}\: m = -2 \\\frac {- \frac {2 a^{3} x^{3}}{3} - a^{2} x^{2} + 2 a x + 2 \log {\left (x \right )}}{e} & \text {for}\: m = -1 \\- \frac {2 a^{3} m^{3} x^{4} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {12 a^{3} m^{2} x^{4} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {22 a^{3} m x^{4} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {12 a^{3} x^{4} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {2 a^{2} m^{3} x^{3} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {14 a^{2} m^{2} x^{3} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {28 a^{2} m x^{3} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} - \frac {16 a^{2} x^{3} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {2 a m^{3} x^{2} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {16 a m^{2} x^{2} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {38 a m x^{2} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {24 a x^{2} \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {2 m^{3} x \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {18 m^{2} x \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {52 m x \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} + \frac {48 x \left (e x\right )^{m}}{m^{4} + 10 m^{3} + 35 m^{2} + 50 m + 24} & \text {otherwise} \end {cases} \] Input:
integrate((e*x)**m*(-2*a*x+2)*(a*x+1)**2,x)
Output:
Piecewise(((-2*a**3*log(x) + 2*a**2/x - a/x**2 - 2/(3*x**3))/e**4, Eq(m, - 4)), ((-2*a**3*x - 2*a**2*log(x) - 2*a/x - 1/x**2)/e**3, Eq(m, -3)), ((-a* *3*x**2 - 2*a**2*x + 2*a*log(x) - 2/x)/e**2, Eq(m, -2)), ((-2*a**3*x**3/3 - a**2*x**2 + 2*a*x + 2*log(x))/e, Eq(m, -1)), (-2*a**3*m**3*x**4*(e*x)**m /(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 12*a**3*m**2*x**4*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 22*a**3*m*x**4*(e*x)**m/(m**4 + 10*m** 3 + 35*m**2 + 50*m + 24) - 12*a**3*x**4*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 2*a**2*m**3*x**3*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 14*a**2*m**2*x**3*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 28*a**2*m*x**3*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) - 16*a** 2*x**3*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 2*a*m**3*x**2*(e* x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 16*a*m**2*x**2*(e*x)**m/(m* *4 + 10*m**3 + 35*m**2 + 50*m + 24) + 38*a*m*x**2*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 24*a*x**2*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 5 0*m + 24) + 2*m**3*x*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 18* m**2*x*(e*x)**m/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 52*m*x*(e*x)**m/( m**4 + 10*m**3 + 35*m**2 + 50*m + 24) + 48*x*(e*x)**m/(m**4 + 10*m**3 + 35 *m**2 + 50*m + 24), True))
Time = 0.04 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.96 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=-\frac {2 \, a^{3} e^{m} x^{4} x^{m}}{m + 4} - \frac {2 \, a^{2} e^{m} x^{3} x^{m}}{m + 3} + \frac {2 \, a e^{m} x^{2} x^{m}}{m + 2} + \frac {2 \, \left (e x\right )^{m + 1}}{e {\left (m + 1\right )}} \] Input:
integrate((e*x)^m*(-2*a*x+2)*(a*x+1)^2,x, algorithm="maxima")
Output:
-2*a^3*e^m*x^4*x^m/(m + 4) - 2*a^2*e^m*x^3*x^m/(m + 3) + 2*a*e^m*x^2*x^m/( m + 2) + 2*(e*x)^(m + 1)/(e*(m + 1))
Leaf count of result is larger than twice the leaf count of optimal. 229 vs. \(2 (76) = 152\).
Time = 0.13 (sec) , antiderivative size = 229, normalized size of antiderivative = 3.01 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=-\frac {2 \, {\left (\left (e x\right )^{m} a^{3} m^{3} x^{4} + 6 \, \left (e x\right )^{m} a^{3} m^{2} x^{4} + \left (e x\right )^{m} a^{2} m^{3} x^{3} + 11 \, \left (e x\right )^{m} a^{3} m x^{4} + 7 \, \left (e x\right )^{m} a^{2} m^{2} x^{3} + 6 \, \left (e x\right )^{m} a^{3} x^{4} - \left (e x\right )^{m} a m^{3} x^{2} + 14 \, \left (e x\right )^{m} a^{2} m x^{3} - 8 \, \left (e x\right )^{m} a m^{2} x^{2} + 8 \, \left (e x\right )^{m} a^{2} x^{3} - \left (e x\right )^{m} m^{3} x - 19 \, \left (e x\right )^{m} a m x^{2} - 9 \, \left (e x\right )^{m} m^{2} x - 12 \, \left (e x\right )^{m} a x^{2} - 26 \, \left (e x\right )^{m} m x - 24 \, \left (e x\right )^{m} x\right )}}{m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24} \] Input:
integrate((e*x)^m*(-2*a*x+2)*(a*x+1)^2,x, algorithm="giac")
Output:
-2*((e*x)^m*a^3*m^3*x^4 + 6*(e*x)^m*a^3*m^2*x^4 + (e*x)^m*a^2*m^3*x^3 + 11 *(e*x)^m*a^3*m*x^4 + 7*(e*x)^m*a^2*m^2*x^3 + 6*(e*x)^m*a^3*x^4 - (e*x)^m*a *m^3*x^2 + 14*(e*x)^m*a^2*m*x^3 - 8*(e*x)^m*a*m^2*x^2 + 8*(e*x)^m*a^2*x^3 - (e*x)^m*m^3*x - 19*(e*x)^m*a*m*x^2 - 9*(e*x)^m*m^2*x - 12*(e*x)^m*a*x^2 - 26*(e*x)^m*m*x - 24*(e*x)^m*x)/(m^4 + 10*m^3 + 35*m^2 + 50*m + 24)
Time = 0.54 (sec) , antiderivative size = 165, normalized size of antiderivative = 2.17 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx={\left (e\,x\right )}^m\,\left (\frac {x\,\left (2\,m^3+18\,m^2+52\,m+48\right )}{m^4+10\,m^3+35\,m^2+50\,m+24}+\frac {2\,a\,x^2\,\left (m^3+8\,m^2+19\,m+12\right )}{m^4+10\,m^3+35\,m^2+50\,m+24}-\frac {2\,a^3\,x^4\,\left (m^3+6\,m^2+11\,m+6\right )}{m^4+10\,m^3+35\,m^2+50\,m+24}-\frac {2\,a^2\,x^3\,\left (m^3+7\,m^2+14\,m+8\right )}{m^4+10\,m^3+35\,m^2+50\,m+24}\right ) \] Input:
int(-(e*x)^m*(a*x + 1)^2*(2*a*x - 2),x)
Output:
(e*x)^m*((x*(52*m + 18*m^2 + 2*m^3 + 48))/(50*m + 35*m^2 + 10*m^3 + m^4 + 24) + (2*a*x^2*(19*m + 8*m^2 + m^3 + 12))/(50*m + 35*m^2 + 10*m^3 + m^4 + 24) - (2*a^3*x^4*(11*m + 6*m^2 + m^3 + 6))/(50*m + 35*m^2 + 10*m^3 + m^4 + 24) - (2*a^2*x^3*(14*m + 7*m^2 + m^3 + 8))/(50*m + 35*m^2 + 10*m^3 + m^4 + 24))
Time = 0.19 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.87 \[ \int (e x)^m (2-2 a x) (1+a x)^2 \, dx=\frac {2 x^{m} e^{m} x \left (-a^{3} m^{3} x^{3}-6 a^{3} m^{2} x^{3}-11 a^{3} m \,x^{3}-a^{2} m^{3} x^{2}-6 a^{3} x^{3}-7 a^{2} m^{2} x^{2}-14 a^{2} m \,x^{2}+a \,m^{3} x -8 a^{2} x^{2}+8 a \,m^{2} x +19 a m x +m^{3}+12 a x +9 m^{2}+26 m +24\right )}{m^{4}+10 m^{3}+35 m^{2}+50 m +24} \] Input:
int((e*x)^m*(-2*a*x+2)*(a*x+1)^2,x)
Output:
(2*x**m*e**m*x*( - a**3*m**3*x**3 - 6*a**3*m**2*x**3 - 11*a**3*m*x**3 - 6* a**3*x**3 - a**2*m**3*x**2 - 7*a**2*m**2*x**2 - 14*a**2*m*x**2 - 8*a**2*x* *2 + a*m**3*x + 8*a*m**2*x + 19*a*m*x + 12*a*x + m**3 + 9*m**2 + 26*m + 24 ))/(m**4 + 10*m**3 + 35*m**2 + 50*m + 24)