Integrand size = 22, antiderivative size = 62 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=a d x+\frac {(b d+a e) x^{1+n}}{1+n}+\frac {(c d+b e) x^{1+2 n}}{1+2 n}+\frac {c e x^{1+3 n}}{1+3 n} \] Output:
a*d*x+(a*e+b*d)*x^(1+n)/(1+n)+(b*e+c*d)*x^(1+2*n)/(1+2*n)+c*e*x^(1+3*n)/(1 +3*n)
Time = 0.24 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.92 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=x \left (a d+\frac {(b d+a e) x^n}{1+n}+\frac {(c d+b e) x^{2 n}}{1+2 n}+\frac {c e x^{3 n}}{1+3 n}\right ) \] Input:
Integrate[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]
Output:
x*(a*d + ((b*d + a*e)*x^n)/(1 + n) + ((c*d + b*e)*x^(2*n))/(1 + 2*n) + (c* e*x^(3*n))/(1 + 3*n))
Time = 0.23 (sec) , antiderivative size = 62, 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.091, Rules used = {1737, 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 \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx\) |
\(\Big \downarrow \) 1737 |
\(\displaystyle \int \left (x^n (a e+b d)+a d+x^{2 n} (b e+c d)+c e x^{3 n}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x^{n+1} (a e+b d)}{n+1}+a d x+\frac {x^{2 n+1} (b e+c d)}{2 n+1}+\frac {c e x^{3 n+1}}{3 n+1}\) |
Input:
Int[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]
Output:
a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2 *n) + (c*e*x^(1 + 3*n))/(1 + 3*n)
Int[((d_) + (e_.)*(x_)^(n_))^(q_.)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2 _)), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q*(a + b*x^n + c*x^(2*n)) , x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c , 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[q, 0]
Time = 0.14 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.97
method | result | size |
risch | \(a d x +\frac {\left (a e +b d \right ) x \,x^{n}}{1+n}+\frac {\left (e b +c d \right ) x \,x^{2 n}}{1+2 n}+\frac {c e x \,x^{3 n}}{1+3 n}\) | \(60\) |
norman | \(a d x +\frac {\left (a e +b d \right ) x \,{\mathrm e}^{n \ln \left (x \right )}}{1+n}+\frac {\left (e b +c d \right ) x \,{\mathrm e}^{2 n \ln \left (x \right )}}{1+2 n}+\frac {c e x \,{\mathrm e}^{3 n \ln \left (x \right )}}{1+3 n}\) | \(66\) |
parallelrisch | \(\frac {3 x \,x^{2 n} b e \,n^{2}+2 x \,x^{n} x^{2 n} c e \,n^{2}+4 x \,x^{2 n} b e n +3 x \,x^{n} x^{2 n} c e n +6 x \,x^{n} a e \,n^{2}+6 x \,x^{n} b d \,n^{2}+3 x \,x^{2 n} c d \,n^{2}+6 x a d \,n^{3}+x \,x^{2 n} b e +x \,x^{n} x^{2 n} c e +5 x \,x^{n} a e n +5 x \,x^{n} b d n +4 x \,x^{2 n} c d n +11 x a d \,n^{2}+x \,x^{n} a e +x \,x^{n} b d +x \,x^{2 n} c d +6 x a d n +a d x}{\left (1+n \right ) \left (1+2 n \right ) \left (1+3 n \right )}\) | \(210\) |
orering | \(x \left (d +e \,x^{n}\right ) \left (a +b \,x^{n}+c \,x^{2 n}\right )-\frac {x^{2} \left (11 n^{2}+1\right ) \left (\frac {e \,x^{n} n \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x}+\left (d +e \,x^{n}\right ) \left (\frac {b \,x^{n} n}{x}+\frac {2 c \,x^{2 n} n}{x}\right )\right )}{\left (2 n^{2}+3 n +1\right ) \left (1+3 n \right )}+\frac {2 x^{3} \left (-1+3 n \right ) \left (\frac {e \,x^{n} n^{2} \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x^{2}}-\frac {e \,x^{n} n \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x^{2}}+\frac {2 e \,x^{n} n \left (\frac {b \,x^{n} n}{x}+\frac {2 c \,x^{2 n} n}{x}\right )}{x}+\left (d +e \,x^{n}\right ) \left (\frac {b \,x^{n} n^{2}}{x^{2}}-\frac {b \,x^{n} n}{x^{2}}+\frac {4 c \,x^{2 n} n^{2}}{x^{2}}-\frac {2 c \,x^{2 n} n}{x^{2}}\right )\right )}{\left (2 n^{2}+3 n +1\right ) \left (1+3 n \right )}-\frac {x^{4} \left (\frac {e \,x^{n} n^{3} \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x^{3}}-\frac {3 e \,x^{n} n^{2} \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x^{3}}+\frac {3 e \,x^{n} n^{2} \left (\frac {b \,x^{n} n}{x}+\frac {2 c \,x^{2 n} n}{x}\right )}{x^{2}}+\frac {2 e \,x^{n} n \left (a +b \,x^{n}+c \,x^{2 n}\right )}{x^{3}}-\frac {3 e \,x^{n} n \left (\frac {b \,x^{n} n}{x}+\frac {2 c \,x^{2 n} n}{x}\right )}{x^{2}}+\frac {3 e \,x^{n} n \left (\frac {b \,x^{n} n^{2}}{x^{2}}-\frac {b \,x^{n} n}{x^{2}}+\frac {4 c \,x^{2 n} n^{2}}{x^{2}}-\frac {2 c \,x^{2 n} n}{x^{2}}\right )}{x}+\left (d +e \,x^{n}\right ) \left (\frac {b \,x^{n} n^{3}}{x^{3}}-\frac {3 b \,x^{n} n^{2}}{x^{3}}+\frac {2 b \,x^{n} n}{x^{3}}+\frac {8 c \,x^{2 n} n^{3}}{x^{3}}-\frac {12 c \,x^{2 n} n^{2}}{x^{3}}+\frac {4 c \,x^{2 n} n}{x^{3}}\right )\right )}{6 n^{3}+11 n^{2}+6 n +1}\) | \(581\) |
Input:
int((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)
Output:
a*d*x+(a*e+b*d)/(1+n)*x*x^n+(b*e+c*d)/(1+2*n)*x*(x^n)^2+c*e/(1+3*n)*x*(x^n )^3
Leaf count of result is larger than twice the leaf count of optimal. 137 vs. \(2 (62) = 124\).
Time = 0.07 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.21 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {{\left (2 \, c e n^{2} + 3 \, c e n + c e\right )} x x^{3 \, n} + {\left (3 \, {\left (c d + b e\right )} n^{2} + c d + b e + 4 \, {\left (c d + b e\right )} n\right )} x x^{2 \, n} + {\left (6 \, {\left (b d + a e\right )} n^{2} + b d + a e + 5 \, {\left (b d + a e\right )} n\right )} x x^{n} + {\left (6 \, a d n^{3} + 11 \, a d n^{2} + 6 \, a d n + a d\right )} x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")
Output:
((2*c*e*n^2 + 3*c*e*n + c*e)*x*x^(3*n) + (3*(c*d + b*e)*n^2 + c*d + b*e + 4*(c*d + b*e)*n)*x*x^(2*n) + (6*(b*d + a*e)*n^2 + b*d + a*e + 5*(b*d + a*e )*n)*x*x^n + (6*a*d*n^3 + 11*a*d*n^2 + 6*a*d*n + a*d)*x)/(6*n^3 + 11*n^2 + 6*n + 1)
Leaf count of result is larger than twice the leaf count of optimal. 656 vs. \(2 (53) = 106\).
Time = 0.40 (sec) , antiderivative size = 656, normalized size of antiderivative = 10.58 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=\begin {cases} a d x + a e \log {\left (x \right )} + b d \log {\left (x \right )} - \frac {b e}{x} - \frac {c d}{x} - \frac {c e}{2 x^{2}} & \text {for}\: n = -1 \\a d x + 2 a e \sqrt {x} + 2 b d \sqrt {x} + b e \log {\left (x \right )} + c d \log {\left (x \right )} - \frac {2 c e}{\sqrt {x}} & \text {for}\: n = - \frac {1}{2} \\a d x + \frac {3 a e x^{\frac {2}{3}}}{2} + \frac {3 b d x^{\frac {2}{3}}}{2} + 3 b e \sqrt [3]{x} + 3 c d \sqrt [3]{x} + c e \log {\left (x \right )} & \text {for}\: n = - \frac {1}{3} \\\frac {6 a d n^{3} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {11 a d n^{2} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 a d n x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {a d x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 a e n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {5 a e n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {a e x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 b d n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {5 b d n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {b d x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 b e n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {4 b e n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {b e x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 c d n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {4 c d n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {c d x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {2 c e n^{2} x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 c e n x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {c e x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} & \text {otherwise} \end {cases} \] Input:
integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n)),x)
Output:
Piecewise((a*d*x + a*e*log(x) + b*d*log(x) - b*e/x - c*d/x - c*e/(2*x**2), Eq(n, -1)), (a*d*x + 2*a*e*sqrt(x) + 2*b*d*sqrt(x) + b*e*log(x) + c*d*log (x) - 2*c*e/sqrt(x), Eq(n, -1/2)), (a*d*x + 3*a*e*x**(2/3)/2 + 3*b*d*x**(2 /3)/2 + 3*b*e*x**(1/3) + 3*c*d*x**(1/3) + c*e*log(x), Eq(n, -1/3)), (6*a*d *n**3*x/(6*n**3 + 11*n**2 + 6*n + 1) + 11*a*d*n**2*x/(6*n**3 + 11*n**2 + 6 *n + 1) + 6*a*d*n*x/(6*n**3 + 11*n**2 + 6*n + 1) + a*d*x/(6*n**3 + 11*n**2 + 6*n + 1) + 6*a*e*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*a*e*n*x*x **n/(6*n**3 + 11*n**2 + 6*n + 1) + a*e*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 6*b*d*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*b*d*n*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + b*d*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 3*b*e*n* *2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*b*e*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + b*e*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 3*c*d*n **2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*c*d*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + c*d*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 2*c*e* n**2*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 3*c*e*n*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1) + c*e*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1), True))
Time = 0.03 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.32 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=a d x + \frac {c e x^{3 \, n + 1}}{3 \, n + 1} + \frac {c d x^{2 \, n + 1}}{2 \, n + 1} + \frac {b e x^{2 \, n + 1}}{2 \, n + 1} + \frac {b d x^{n + 1}}{n + 1} + \frac {a e x^{n + 1}}{n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")
Output:
a*d*x + c*e*x^(3*n + 1)/(3*n + 1) + c*d*x^(2*n + 1)/(2*n + 1) + b*e*x^(2*n + 1)/(2*n + 1) + b*d*x^(n + 1)/(n + 1) + a*e*x^(n + 1)/(n + 1)
Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (62) = 124\).
Time = 0.12 (sec) , antiderivative size = 198, normalized size of antiderivative = 3.19 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {6 \, a d n^{3} x + 2 \, c e n^{2} x x^{3 \, n} + 3 \, c d n^{2} x x^{2 \, n} + 3 \, b e n^{2} x x^{2 \, n} + 6 \, b d n^{2} x x^{n} + 6 \, a e n^{2} x x^{n} + 11 \, a d n^{2} x + 3 \, c e n x x^{3 \, n} + 4 \, c d n x x^{2 \, n} + 4 \, b e n x x^{2 \, n} + 5 \, b d n x x^{n} + 5 \, a e n x x^{n} + 6 \, a d n x + c e x x^{3 \, n} + c d x x^{2 \, n} + b e x x^{2 \, n} + b d x x^{n} + a e x x^{n} + a d x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="giac")
Output:
(6*a*d*n^3*x + 2*c*e*n^2*x*x^(3*n) + 3*c*d*n^2*x*x^(2*n) + 3*b*e*n^2*x*x^( 2*n) + 6*b*d*n^2*x*x^n + 6*a*e*n^2*x*x^n + 11*a*d*n^2*x + 3*c*e*n*x*x^(3*n ) + 4*c*d*n*x*x^(2*n) + 4*b*e*n*x*x^(2*n) + 5*b*d*n*x*x^n + 5*a*e*n*x*x^n + 6*a*d*n*x + c*e*x*x^(3*n) + c*d*x*x^(2*n) + b*e*x*x^(2*n) + b*d*x*x^n + a*e*x*x^n + a*d*x)/(6*n^3 + 11*n^2 + 6*n + 1)
Time = 19.89 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.95 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=a\,d\,x+\frac {x\,x^{2\,n}\,\left (b\,e+c\,d\right )}{2\,n+1}+\frac {x\,x^n\,\left (a\,e+b\,d\right )}{n+1}+\frac {c\,e\,x\,x^{3\,n}}{3\,n+1} \] Input:
int((d + e*x^n)*(a + b*x^n + c*x^(2*n)),x)
Output:
a*d*x + (x*x^(2*n)*(b*e + c*d))/(2*n + 1) + (x*x^n*(a*e + b*d))/(n + 1) + (c*e*x*x^(3*n))/(3*n + 1)
Time = 0.19 (sec) , antiderivative size = 180, normalized size of antiderivative = 2.90 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx=\frac {x \left (2 x^{3 n} c e \,n^{2}+3 x^{3 n} c e n +x^{3 n} c e +3 x^{2 n} b e \,n^{2}+4 x^{2 n} b e n +x^{2 n} b e +3 x^{2 n} c d \,n^{2}+4 x^{2 n} c d n +x^{2 n} c d +6 x^{n} a e \,n^{2}+5 x^{n} a e n +x^{n} a e +6 x^{n} b d \,n^{2}+5 x^{n} b d n +x^{n} b d +6 a d \,n^{3}+11 a d \,n^{2}+6 a d n +a d \right )}{6 n^{3}+11 n^{2}+6 n +1} \] Input:
int((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x)
Output:
(x*(2*x**(3*n)*c*e*n**2 + 3*x**(3*n)*c*e*n + x**(3*n)*c*e + 3*x**(2*n)*b*e *n**2 + 4*x**(2*n)*b*e*n + x**(2*n)*b*e + 3*x**(2*n)*c*d*n**2 + 4*x**(2*n) *c*d*n + x**(2*n)*c*d + 6*x**n*a*e*n**2 + 5*x**n*a*e*n + x**n*a*e + 6*x**n *b*d*n**2 + 5*x**n*b*d*n + x**n*b*d + 6*a*d*n**3 + 11*a*d*n**2 + 6*a*d*n + a*d))/(6*n**3 + 11*n**2 + 6*n + 1)