Integrand size = 24, antiderivative size = 132 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=a^2 d x+\frac {a (2 b d+a e) x^{1+n}}{1+n}+\frac {\left (b^2 d+2 a c d+2 a b e\right ) x^{1+2 n}}{1+2 n}+\frac {\left (2 b c d+b^2 e+2 a c e\right ) x^{1+3 n}}{1+3 n}+\frac {c (c d+2 b e) x^{1+4 n}}{1+4 n}+\frac {c^2 e x^{1+5 n}}{1+5 n} \] Output:
a^2*d*x+a*(a*e+2*b*d)*x^(1+n)/(1+n)+(2*a*b*e+2*a*c*d+b^2*d)*x^(1+2*n)/(1+2 *n)+(2*a*c*e+b^2*e+2*b*c*d)*x^(1+3*n)/(1+3*n)+c*(2*b*e+c*d)*x^(1+4*n)/(1+4 *n)+c^2*e*x^(1+5*n)/(1+5*n)
Time = 1.02 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.93 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=x \left (a^2 d+\frac {a (2 b d+a e) x^n}{1+n}+\frac {\left (b^2 d+2 a c d+2 a b e\right ) x^{2 n}}{1+2 n}+\frac {\left (2 b c d+b^2 e+2 a c e\right ) x^{3 n}}{1+3 n}+\frac {c (c d+2 b e) x^{4 n}}{1+4 n}+\frac {c^2 e x^{5 n}}{1+5 n}\right ) \] Input:
Integrate[(d + e*x^n)*(a + b*x^n + c*x^(2*n))^2,x]
Output:
x*(a^2*d + (a*(2*b*d + a*e)*x^n)/(1 + n) + ((b^2*d + 2*a*c*d + 2*a*b*e)*x^ (2*n))/(1 + 2*n) + ((2*b*c*d + b^2*e + 2*a*c*e)*x^(3*n))/(1 + 3*n) + (c*(c *d + 2*b*e)*x^(4*n))/(1 + 4*n) + (c^2*e*x^(5*n))/(1 + 5*n))
Time = 0.31 (sec) , antiderivative size = 132, 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.083, Rules used = {1762, 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 )^2 \, dx\) |
\(\Big \downarrow \) 1762 |
\(\displaystyle \int \left (a^2 d+x^{2 n} \left (2 a b e+2 a c d+b^2 d\right )+x^{3 n} \left (2 a c e+b^2 e+2 b c d\right )+a x^n (a e+2 b d)+c x^{4 n} (2 b e+c d)+c^2 e x^{5 n}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 d x+\frac {x^{2 n+1} \left (2 a b e+2 a c d+b^2 d\right )}{2 n+1}+\frac {x^{3 n+1} \left (2 a c e+b^2 e+2 b c d\right )}{3 n+1}+\frac {a x^{n+1} (a e+2 b d)}{n+1}+\frac {c x^{4 n+1} (2 b e+c d)}{4 n+1}+\frac {c^2 e x^{5 n+1}}{5 n+1}\) |
Input:
Int[(d + e*x^n)*(a + b*x^n + c*x^(2*n))^2,x]
Output:
a^2*d*x + (a*(2*b*d + a*e)*x^(1 + n))/(1 + n) + ((b^2*d + 2*a*c*d + 2*a*b* e)*x^(1 + 2*n))/(1 + 2*n) + ((2*b*c*d + b^2*e + 2*a*c*e)*x^(1 + 3*n))/(1 + 3*n) + (c*(c*d + 2*b*e)*x^(1 + 4*n))/(1 + 4*n) + (c^2*e*x^(1 + 5*n))/(1 + 5*n)
Int[((d_) + (e_.)*(x_)^(n_))*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p _), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)*(a + b*x^n + c*x^(2*n))^p, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0]
Time = 0.39 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.97
method | result | size |
risch | \(a^{2} d x +\frac {\left (2 a c e +b^{2} e +2 c b d \right ) x \,x^{3 n}}{1+3 n}+\frac {\left (2 a b e +2 a c d +d \,b^{2}\right ) x \,x^{2 n}}{1+2 n}+\frac {a \left (a e +2 b d \right ) x \,x^{n}}{1+n}+\frac {c \left (2 e b +c d \right ) x \,x^{4 n}}{1+4 n}+\frac {c^{2} e x \,x^{5 n}}{1+5 n}\) | \(128\) |
norman | \(a^{2} d x +\frac {\left (2 a c e +b^{2} e +2 c b d \right ) x \,{\mathrm e}^{3 n \ln \left (x \right )}}{1+3 n}+\frac {\left (2 a b e +2 a c d +d \,b^{2}\right ) x \,{\mathrm e}^{2 n \ln \left (x \right )}}{1+2 n}+\frac {a \left (a e +2 b d \right ) x \,{\mathrm e}^{n \ln \left (x \right )}}{1+n}+\frac {c \left (2 e b +c d \right ) x \,{\mathrm e}^{4 n \ln \left (x \right )}}{1+4 n}+\frac {c^{2} e x \,{\mathrm e}^{5 n \ln \left (x \right )}}{1+5 n}\) | \(138\) |
parallelrisch | \(\frac {120 x \,x^{n} a^{2} e \,n^{4}+154 x \,x^{n} a^{2} e \,n^{3}+71 x \,x^{n} a^{2} e \,n^{2}+14 x \,x^{n} a^{2} e n +2 x \,x^{n} a b d +2 x \,x^{2 n} a c d +60 x \left (x^{2 n}\right )^{2} b c e \,n^{4}+122 x \left (x^{2 n}\right )^{2} b c e \,n^{3}+82 x \left (x^{2 n}\right )^{2} b c e \,n^{2}+98 x \,x^{n} x^{2 n} a c e \,n^{2}+98 x \,x^{n} x^{2 n} b c d \,n^{2}+24 x \,x^{n} x^{2 n} a c e n +24 x \,x^{n} x^{2 n} b c d n +80 x \,x^{n} x^{2 n} a c e \,n^{4}+80 x \,x^{n} x^{2 n} b c d \,n^{4}+156 x \,x^{n} x^{2 n} a c e \,n^{3}+156 x \,x^{n} x^{2 n} b c d \,n^{3}+26 x \,x^{2 n} a c d n +118 x \,x^{2 n} a c d \,n^{2}+2 x \,x^{n} x^{2 n} a c e +2 x \,x^{n} x^{2 n} b c d +214 x \,x^{2 n} a c d \,n^{3}+142 x \,x^{n} a b d \,n^{2}+28 x \,x^{n} a b d n +22 x \left (x^{2 n}\right )^{2} b c e n +240 x \,x^{n} a b d \,n^{4}+120 x \,x^{2 n} a c d \,n^{4}+61 x \,x^{4 n} c^{2} d \,n^{3}+12 x \,x^{3 n} b^{2} e n +59 x \,x^{2 n} b^{2} d \,n^{2}+41 x \,x^{4 n} c^{2} d \,n^{2}+13 x \,x^{2 n} b^{2} d n +x \,x^{n} x^{4 n} c^{2} e +11 x \,x^{4 n} c^{2} d n +2 x \,x^{2 n} a b e +40 x \,x^{3 n} b^{2} e \,n^{4}+78 x \,x^{3 n} b^{2} e \,n^{3}+60 x \,x^{2 n} b^{2} d \,n^{4}+30 x \,x^{4 n} c^{2} d \,n^{4}+49 x \,x^{3 n} b^{2} e \,n^{2}+107 x \,x^{2 n} b^{2} d \,n^{3}+308 x \,x^{n} a b d \,n^{3}+120 x \,a^{2} d \,n^{5}+274 x \,a^{2} d \,n^{4}+225 x \,a^{2} d \,n^{3}+85 x \,a^{2} d \,n^{2}+x \,x^{n} a^{2} e +15 x \,a^{2} d n +a^{2} d x +26 x \,x^{2 n} a b e n +120 x \,x^{2 n} a b e \,n^{4}+50 x \,x^{n} x^{4 n} c^{2} e \,n^{3}+214 x \,x^{2 n} a b e \,n^{3}+35 x \,x^{n} x^{4 n} c^{2} e \,n^{2}+118 x \,x^{2 n} a b e \,n^{2}+10 x \,x^{n} x^{4 n} c^{2} e n +24 x \,x^{n} x^{4 n} c^{2} e \,n^{4}+2 x \left (x^{2 n}\right )^{2} b c e +x \,x^{3 n} b^{2} e +x \,x^{2 n} b^{2} d +x \,x^{4 n} c^{2} d}{\left (1+3 n \right ) \left (1+2 n \right ) \left (1+n \right ) \left (1+4 n \right ) \left (1+5 n \right )}\) | \(895\) |
orering | \(\text {Expression too large to display}\) | \(3616\) |
Input:
int((d+e*x^n)*(a+b*x^n+c*x^(2*n))^2,x,method=_RETURNVERBOSE)
Output:
a^2*d*x+(2*a*c*e+b^2*e+2*b*c*d)/(1+3*n)*x*(x^n)^3+(2*a*b*e+2*a*c*d+b^2*d)/ (1+2*n)*x*(x^n)^2+a*(a*e+2*b*d)/(1+n)*x*x^n+c*(2*b*e+c*d)/(1+4*n)*x*(x^n)^ 4+c^2*e/(1+5*n)*x*(x^n)^5
Leaf count of result is larger than twice the leaf count of optimal. 495 vs. \(2 (132) = 264\).
Time = 0.07 (sec) , antiderivative size = 495, normalized size of antiderivative = 3.75 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=\frac {{\left (24 \, c^{2} e n^{4} + 50 \, c^{2} e n^{3} + 35 \, c^{2} e n^{2} + 10 \, c^{2} e n + c^{2} e\right )} x x^{5 \, n} + {\left (30 \, {\left (c^{2} d + 2 \, b c e\right )} n^{4} + 61 \, {\left (c^{2} d + 2 \, b c e\right )} n^{3} + c^{2} d + 2 \, b c e + 41 \, {\left (c^{2} d + 2 \, b c e\right )} n^{2} + 11 \, {\left (c^{2} d + 2 \, b c e\right )} n\right )} x x^{4 \, n} + {\left (40 \, {\left (2 \, b c d + {\left (b^{2} + 2 \, a c\right )} e\right )} n^{4} + 78 \, {\left (2 \, b c d + {\left (b^{2} + 2 \, a c\right )} e\right )} n^{3} + 2 \, b c d + 49 \, {\left (2 \, b c d + {\left (b^{2} + 2 \, a c\right )} e\right )} n^{2} + {\left (b^{2} + 2 \, a c\right )} e + 12 \, {\left (2 \, b c d + {\left (b^{2} + 2 \, a c\right )} e\right )} n\right )} x x^{3 \, n} + {\left (60 \, {\left (2 \, a b e + {\left (b^{2} + 2 \, a c\right )} d\right )} n^{4} + 107 \, {\left (2 \, a b e + {\left (b^{2} + 2 \, a c\right )} d\right )} n^{3} + 2 \, a b e + 59 \, {\left (2 \, a b e + {\left (b^{2} + 2 \, a c\right )} d\right )} n^{2} + {\left (b^{2} + 2 \, a c\right )} d + 13 \, {\left (2 \, a b e + {\left (b^{2} + 2 \, a c\right )} d\right )} n\right )} x x^{2 \, n} + {\left (120 \, {\left (2 \, a b d + a^{2} e\right )} n^{4} + 154 \, {\left (2 \, a b d + a^{2} e\right )} n^{3} + 2 \, a b d + a^{2} e + 71 \, {\left (2 \, a b d + a^{2} e\right )} n^{2} + 14 \, {\left (2 \, a b d + a^{2} e\right )} n\right )} x x^{n} + {\left (120 \, a^{2} d n^{5} + 274 \, a^{2} d n^{4} + 225 \, a^{2} d n^{3} + 85 \, a^{2} d n^{2} + 15 \, a^{2} d n + a^{2} d\right )} x}{120 \, n^{5} + 274 \, n^{4} + 225 \, n^{3} + 85 \, n^{2} + 15 \, n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n))^2,x, algorithm="fricas")
Output:
((24*c^2*e*n^4 + 50*c^2*e*n^3 + 35*c^2*e*n^2 + 10*c^2*e*n + c^2*e)*x*x^(5* n) + (30*(c^2*d + 2*b*c*e)*n^4 + 61*(c^2*d + 2*b*c*e)*n^3 + c^2*d + 2*b*c* e + 41*(c^2*d + 2*b*c*e)*n^2 + 11*(c^2*d + 2*b*c*e)*n)*x*x^(4*n) + (40*(2* b*c*d + (b^2 + 2*a*c)*e)*n^4 + 78*(2*b*c*d + (b^2 + 2*a*c)*e)*n^3 + 2*b*c* d + 49*(2*b*c*d + (b^2 + 2*a*c)*e)*n^2 + (b^2 + 2*a*c)*e + 12*(2*b*c*d + ( b^2 + 2*a*c)*e)*n)*x*x^(3*n) + (60*(2*a*b*e + (b^2 + 2*a*c)*d)*n^4 + 107*( 2*a*b*e + (b^2 + 2*a*c)*d)*n^3 + 2*a*b*e + 59*(2*a*b*e + (b^2 + 2*a*c)*d)* n^2 + (b^2 + 2*a*c)*d + 13*(2*a*b*e + (b^2 + 2*a*c)*d)*n)*x*x^(2*n) + (120 *(2*a*b*d + a^2*e)*n^4 + 154*(2*a*b*d + a^2*e)*n^3 + 2*a*b*d + a^2*e + 71* (2*a*b*d + a^2*e)*n^2 + 14*(2*a*b*d + a^2*e)*n)*x*x^n + (120*a^2*d*n^5 + 2 74*a^2*d*n^4 + 225*a^2*d*n^3 + 85*a^2*d*n^2 + 15*a^2*d*n + a^2*d)*x)/(120* n^5 + 274*n^4 + 225*n^3 + 85*n^2 + 15*n + 1)
Leaf count of result is larger than twice the leaf count of optimal. 3128 vs. \(2 (124) = 248\).
Time = 1.44 (sec) , antiderivative size = 3128, normalized size of antiderivative = 23.70 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=\text {Too large to display} \] Input:
integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n))**2,x)
Output:
Piecewise((a**2*d*x + a**2*e*log(x) + 2*a*b*d*log(x) - 2*a*b*e/x - 2*a*c*d /x - a*c*e/x**2 - b**2*d/x - b**2*e/(2*x**2) - b*c*d/x**2 - 2*b*c*e/(3*x** 3) - c**2*d/(3*x**3) - c**2*e/(4*x**4), Eq(n, -1)), (a**2*d*x + 2*a**2*e*s qrt(x) + 4*a*b*d*sqrt(x) + 2*a*b*e*log(x) + 2*a*c*d*log(x) - 4*a*c*e/sqrt( x) + b**2*d*log(x) - 2*b**2*e/sqrt(x) - 4*b*c*d/sqrt(x) - 2*b*c*e/x - c**2 *d/x - 2*c**2*e/(3*x**(3/2)), Eq(n, -1/2)), (a**2*d*x + 3*a**2*e*x**(2/3)/ 2 + 3*a*b*d*x**(2/3) + 6*a*b*e*x**(1/3) + 6*a*c*d*x**(1/3) + 2*a*c*e*log(x ) + 3*b**2*d*x**(1/3) + b**2*e*log(x) + 2*b*c*d*log(x) - 6*b*c*e/x**(1/3) - 3*c**2*d/x**(1/3) - 3*c**2*e/(2*x**(2/3)), Eq(n, -1/3)), (a**2*d*x + 4*a **2*e*x**(3/4)/3 + 8*a*b*d*x**(3/4)/3 + 4*a*b*e*sqrt(x) + 4*a*c*d*sqrt(x) + 8*a*c*e*x**(1/4) + 2*b**2*d*sqrt(x) + 4*b**2*e*x**(1/4) + 8*b*c*d*x**(1/ 4) + 2*b*c*e*log(x) + c**2*d*log(x) - 4*c**2*e/x**(1/4), Eq(n, -1/4)), (a* *2*d*x + 5*a**2*e*x**(4/5)/4 + 5*a*b*d*x**(4/5)/2 + 10*a*b*e*x**(3/5)/3 + 10*a*c*d*x**(3/5)/3 + 5*a*c*e*x**(2/5) + 5*b**2*d*x**(3/5)/3 + 5*b**2*e*x* *(2/5)/2 + 5*b*c*d*x**(2/5) + 10*b*c*e*x**(1/5) + 5*c**2*d*x**(1/5) + c**2 *e*log(x), Eq(n, -1/5)), (120*a**2*d*n**5*x/(120*n**5 + 274*n**4 + 225*n** 3 + 85*n**2 + 15*n + 1) + 274*a**2*d*n**4*x/(120*n**5 + 274*n**4 + 225*n** 3 + 85*n**2 + 15*n + 1) + 225*a**2*d*n**3*x/(120*n**5 + 274*n**4 + 225*n** 3 + 85*n**2 + 15*n + 1) + 85*a**2*d*n**2*x/(120*n**5 + 274*n**4 + 225*n**3 + 85*n**2 + 15*n + 1) + 15*a**2*d*n*x/(120*n**5 + 274*n**4 + 225*n**3 ...
Time = 0.03 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.58 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=a^{2} d x + \frac {c^{2} e x^{5 \, n + 1}}{5 \, n + 1} + \frac {c^{2} d x^{4 \, n + 1}}{4 \, n + 1} + \frac {2 \, b c e x^{4 \, n + 1}}{4 \, n + 1} + \frac {2 \, b c d x^{3 \, n + 1}}{3 \, n + 1} + \frac {b^{2} e x^{3 \, n + 1}}{3 \, n + 1} + \frac {2 \, a c e x^{3 \, n + 1}}{3 \, n + 1} + \frac {b^{2} d x^{2 \, n + 1}}{2 \, n + 1} + \frac {2 \, a c d x^{2 \, n + 1}}{2 \, n + 1} + \frac {2 \, a b e x^{2 \, n + 1}}{2 \, n + 1} + \frac {2 \, a b d x^{n + 1}}{n + 1} + \frac {a^{2} e x^{n + 1}}{n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n))^2,x, algorithm="maxima")
Output:
a^2*d*x + c^2*e*x^(5*n + 1)/(5*n + 1) + c^2*d*x^(4*n + 1)/(4*n + 1) + 2*b* c*e*x^(4*n + 1)/(4*n + 1) + 2*b*c*d*x^(3*n + 1)/(3*n + 1) + b^2*e*x^(3*n + 1)/(3*n + 1) + 2*a*c*e*x^(3*n + 1)/(3*n + 1) + b^2*d*x^(2*n + 1)/(2*n + 1 ) + 2*a*c*d*x^(2*n + 1)/(2*n + 1) + 2*a*b*e*x^(2*n + 1)/(2*n + 1) + 2*a*b* d*x^(n + 1)/(n + 1) + a^2*e*x^(n + 1)/(n + 1)
Leaf count of result is larger than twice the leaf count of optimal. 798 vs. \(2 (132) = 264\).
Time = 0.13 (sec) , antiderivative size = 798, normalized size of antiderivative = 6.05 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=\frac {120 \, a^{2} d n^{5} x + 24 \, c^{2} e n^{4} x x^{5 \, n} + 30 \, c^{2} d n^{4} x x^{4 \, n} + 60 \, b c e n^{4} x x^{4 \, n} + 80 \, b c d n^{4} x x^{3 \, n} + 40 \, b^{2} e n^{4} x x^{3 \, n} + 80 \, a c e n^{4} x x^{3 \, n} + 60 \, b^{2} d n^{4} x x^{2 \, n} + 120 \, a c d n^{4} x x^{2 \, n} + 120 \, a b e n^{4} x x^{2 \, n} + 240 \, a b d n^{4} x x^{n} + 120 \, a^{2} e n^{4} x x^{n} + 274 \, a^{2} d n^{4} x + 50 \, c^{2} e n^{3} x x^{5 \, n} + 61 \, c^{2} d n^{3} x x^{4 \, n} + 122 \, b c e n^{3} x x^{4 \, n} + 156 \, b c d n^{3} x x^{3 \, n} + 78 \, b^{2} e n^{3} x x^{3 \, n} + 156 \, a c e n^{3} x x^{3 \, n} + 107 \, b^{2} d n^{3} x x^{2 \, n} + 214 \, a c d n^{3} x x^{2 \, n} + 214 \, a b e n^{3} x x^{2 \, n} + 308 \, a b d n^{3} x x^{n} + 154 \, a^{2} e n^{3} x x^{n} + 225 \, a^{2} d n^{3} x + 35 \, c^{2} e n^{2} x x^{5 \, n} + 41 \, c^{2} d n^{2} x x^{4 \, n} + 82 \, b c e n^{2} x x^{4 \, n} + 98 \, b c d n^{2} x x^{3 \, n} + 49 \, b^{2} e n^{2} x x^{3 \, n} + 98 \, a c e n^{2} x x^{3 \, n} + 59 \, b^{2} d n^{2} x x^{2 \, n} + 118 \, a c d n^{2} x x^{2 \, n} + 118 \, a b e n^{2} x x^{2 \, n} + 142 \, a b d n^{2} x x^{n} + 71 \, a^{2} e n^{2} x x^{n} + 85 \, a^{2} d n^{2} x + 10 \, c^{2} e n x x^{5 \, n} + 11 \, c^{2} d n x x^{4 \, n} + 22 \, b c e n x x^{4 \, n} + 24 \, b c d n x x^{3 \, n} + 12 \, b^{2} e n x x^{3 \, n} + 24 \, a c e n x x^{3 \, n} + 13 \, b^{2} d n x x^{2 \, n} + 26 \, a c d n x x^{2 \, n} + 26 \, a b e n x x^{2 \, n} + 28 \, a b d n x x^{n} + 14 \, a^{2} e n x x^{n} + 15 \, a^{2} d n x + c^{2} e x x^{5 \, n} + c^{2} d x x^{4 \, n} + 2 \, b c e x x^{4 \, n} + 2 \, b c d x x^{3 \, n} + b^{2} e x x^{3 \, n} + 2 \, a c e x x^{3 \, n} + b^{2} d x x^{2 \, n} + 2 \, a c d x x^{2 \, n} + 2 \, a b e x x^{2 \, n} + 2 \, a b d x x^{n} + a^{2} e x x^{n} + a^{2} d x}{120 \, n^{5} + 274 \, n^{4} + 225 \, n^{3} + 85 \, n^{2} + 15 \, n + 1} \] Input:
integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n))^2,x, algorithm="giac")
Output:
(120*a^2*d*n^5*x + 24*c^2*e*n^4*x*x^(5*n) + 30*c^2*d*n^4*x*x^(4*n) + 60*b* c*e*n^4*x*x^(4*n) + 80*b*c*d*n^4*x*x^(3*n) + 40*b^2*e*n^4*x*x^(3*n) + 80*a *c*e*n^4*x*x^(3*n) + 60*b^2*d*n^4*x*x^(2*n) + 120*a*c*d*n^4*x*x^(2*n) + 12 0*a*b*e*n^4*x*x^(2*n) + 240*a*b*d*n^4*x*x^n + 120*a^2*e*n^4*x*x^n + 274*a^ 2*d*n^4*x + 50*c^2*e*n^3*x*x^(5*n) + 61*c^2*d*n^3*x*x^(4*n) + 122*b*c*e*n^ 3*x*x^(4*n) + 156*b*c*d*n^3*x*x^(3*n) + 78*b^2*e*n^3*x*x^(3*n) + 156*a*c*e *n^3*x*x^(3*n) + 107*b^2*d*n^3*x*x^(2*n) + 214*a*c*d*n^3*x*x^(2*n) + 214*a *b*e*n^3*x*x^(2*n) + 308*a*b*d*n^3*x*x^n + 154*a^2*e*n^3*x*x^n + 225*a^2*d *n^3*x + 35*c^2*e*n^2*x*x^(5*n) + 41*c^2*d*n^2*x*x^(4*n) + 82*b*c*e*n^2*x* x^(4*n) + 98*b*c*d*n^2*x*x^(3*n) + 49*b^2*e*n^2*x*x^(3*n) + 98*a*c*e*n^2*x *x^(3*n) + 59*b^2*d*n^2*x*x^(2*n) + 118*a*c*d*n^2*x*x^(2*n) + 118*a*b*e*n^ 2*x*x^(2*n) + 142*a*b*d*n^2*x*x^n + 71*a^2*e*n^2*x*x^n + 85*a^2*d*n^2*x + 10*c^2*e*n*x*x^(5*n) + 11*c^2*d*n*x*x^(4*n) + 22*b*c*e*n*x*x^(4*n) + 24*b* c*d*n*x*x^(3*n) + 12*b^2*e*n*x*x^(3*n) + 24*a*c*e*n*x*x^(3*n) + 13*b^2*d*n *x*x^(2*n) + 26*a*c*d*n*x*x^(2*n) + 26*a*b*e*n*x*x^(2*n) + 28*a*b*d*n*x*x^ n + 14*a^2*e*n*x*x^n + 15*a^2*d*n*x + c^2*e*x*x^(5*n) + c^2*d*x*x^(4*n) + 2*b*c*e*x*x^(4*n) + 2*b*c*d*x*x^(3*n) + b^2*e*x*x^(3*n) + 2*a*c*e*x*x^(3*n ) + b^2*d*x*x^(2*n) + 2*a*c*d*x*x^(2*n) + 2*a*b*e*x*x^(2*n) + 2*a*b*d*x*x^ n + a^2*e*x*x^n + a^2*d*x)/(120*n^5 + 274*n^4 + 225*n^3 + 85*n^2 + 15*n + 1)
Time = 20.22 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.99 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=a^2\,d\,x+\frac {x\,x^{4\,n}\,\left (d\,c^2+2\,b\,e\,c\right )}{4\,n+1}+\frac {x\,x^n\,\left (e\,a^2+2\,b\,d\,a\right )}{n+1}+\frac {x\,x^{2\,n}\,\left (d\,b^2+2\,a\,e\,b+2\,a\,c\,d\right )}{2\,n+1}+\frac {x\,x^{3\,n}\,\left (e\,b^2+2\,c\,d\,b+2\,a\,c\,e\right )}{3\,n+1}+\frac {c^2\,e\,x\,x^{5\,n}}{5\,n+1} \] Input:
int((d + e*x^n)*(a + b*x^n + c*x^(2*n))^2,x)
Output:
a^2*d*x + (x*x^(4*n)*(c^2*d + 2*b*c*e))/(4*n + 1) + (x*x^n*(a^2*e + 2*a*b* d))/(n + 1) + (x*x^(2*n)*(b^2*d + 2*a*b*e + 2*a*c*d))/(2*n + 1) + (x*x^(3* n)*(b^2*e + 2*a*c*e + 2*b*c*d))/(3*n + 1) + (c^2*e*x*x^(5*n))/(5*n + 1)
Time = 0.18 (sec) , antiderivative size = 738, normalized size of antiderivative = 5.59 \[ \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )^2 \, dx=\frac {x \left (41 x^{4 n} c^{2} d \,n^{2}+11 x^{4 n} c^{2} d n +40 x^{3 n} b^{2} e \,n^{4}+78 x^{3 n} b^{2} e \,n^{3}+49 x^{3 n} b^{2} e \,n^{2}+12 x^{3 n} b^{2} e n +2 x^{3 n} b c d +2 x^{2 n} a b e +60 x^{2 n} b^{2} d \,n^{4}+107 x^{2 n} b^{2} d \,n^{3}+59 x^{2 n} b^{2} d \,n^{2}+13 x^{2 n} b^{2} d n +120 x^{n} a^{2} e \,n^{4}+154 x^{n} a^{2} e \,n^{3}+71 x^{n} a^{2} e \,n^{2}+14 x^{n} a^{2} e n +2 x^{n} a b d +x^{3 n} b^{2} e +x^{2 n} b^{2} d +24 x^{5 n} c^{2} e \,n^{4}+50 x^{5 n} c^{2} e \,n^{3}+35 x^{5 n} c^{2} e \,n^{2}+10 x^{5 n} c^{2} e n +2 x^{4 n} b c e +30 x^{4 n} c^{2} d \,n^{4}+61 x^{4 n} c^{2} d \,n^{3}+225 a^{2} d \,n^{3}+85 a^{2} d \,n^{2}+15 a^{2} d n +22 x^{4 n} b c e n +80 x^{3 n} a c e \,n^{4}+156 x^{3 n} a c e \,n^{3}+98 x^{3 n} a c e \,n^{2}+24 x^{3 n} a c e n +80 x^{3 n} b c d \,n^{4}+156 x^{3 n} b c d \,n^{3}+98 x^{3 n} b c d \,n^{2}+24 x^{3 n} b c d n +120 x^{2 n} a b e \,n^{4}+214 x^{2 n} a b e \,n^{3}+118 x^{2 n} a b e \,n^{2}+26 x^{2 n} a b e n +120 x^{2 n} a c d \,n^{4}+214 x^{2 n} a c d \,n^{3}+118 x^{2 n} a c d \,n^{2}+26 x^{2 n} a c d n +240 x^{n} a b d \,n^{4}+308 x^{n} a b d \,n^{3}+142 x^{n} a b d \,n^{2}+28 x^{n} a b d n +x^{5 n} c^{2} e +x^{4 n} c^{2} d +2 x^{3 n} a c e +x^{n} a^{2} e +2 x^{2 n} a c d +120 a^{2} d \,n^{5}+274 a^{2} d \,n^{4}+a^{2} d +60 x^{4 n} b c e \,n^{4}+122 x^{4 n} b c e \,n^{3}+82 x^{4 n} b c e \,n^{2}\right )}{120 n^{5}+274 n^{4}+225 n^{3}+85 n^{2}+15 n +1} \] Input:
int((d+e*x^n)*(a+b*x^n+c*x^(2*n))^2,x)
Output:
(x*(24*x**(5*n)*c**2*e*n**4 + 50*x**(5*n)*c**2*e*n**3 + 35*x**(5*n)*c**2*e *n**2 + 10*x**(5*n)*c**2*e*n + x**(5*n)*c**2*e + 60*x**(4*n)*b*c*e*n**4 + 122*x**(4*n)*b*c*e*n**3 + 82*x**(4*n)*b*c*e*n**2 + 22*x**(4*n)*b*c*e*n + 2 *x**(4*n)*b*c*e + 30*x**(4*n)*c**2*d*n**4 + 61*x**(4*n)*c**2*d*n**3 + 41*x **(4*n)*c**2*d*n**2 + 11*x**(4*n)*c**2*d*n + x**(4*n)*c**2*d + 80*x**(3*n) *a*c*e*n**4 + 156*x**(3*n)*a*c*e*n**3 + 98*x**(3*n)*a*c*e*n**2 + 24*x**(3* n)*a*c*e*n + 2*x**(3*n)*a*c*e + 40*x**(3*n)*b**2*e*n**4 + 78*x**(3*n)*b**2 *e*n**3 + 49*x**(3*n)*b**2*e*n**2 + 12*x**(3*n)*b**2*e*n + x**(3*n)*b**2*e + 80*x**(3*n)*b*c*d*n**4 + 156*x**(3*n)*b*c*d*n**3 + 98*x**(3*n)*b*c*d*n* *2 + 24*x**(3*n)*b*c*d*n + 2*x**(3*n)*b*c*d + 120*x**(2*n)*a*b*e*n**4 + 21 4*x**(2*n)*a*b*e*n**3 + 118*x**(2*n)*a*b*e*n**2 + 26*x**(2*n)*a*b*e*n + 2* x**(2*n)*a*b*e + 120*x**(2*n)*a*c*d*n**4 + 214*x**(2*n)*a*c*d*n**3 + 118*x **(2*n)*a*c*d*n**2 + 26*x**(2*n)*a*c*d*n + 2*x**(2*n)*a*c*d + 60*x**(2*n)* b**2*d*n**4 + 107*x**(2*n)*b**2*d*n**3 + 59*x**(2*n)*b**2*d*n**2 + 13*x**( 2*n)*b**2*d*n + x**(2*n)*b**2*d + 120*x**n*a**2*e*n**4 + 154*x**n*a**2*e*n **3 + 71*x**n*a**2*e*n**2 + 14*x**n*a**2*e*n + x**n*a**2*e + 240*x**n*a*b* d*n**4 + 308*x**n*a*b*d*n**3 + 142*x**n*a*b*d*n**2 + 28*x**n*a*b*d*n + 2*x **n*a*b*d + 120*a**2*d*n**5 + 274*a**2*d*n**4 + 225*a**2*d*n**3 + 85*a**2* d*n**2 + 15*a**2*d*n + a**2*d))/(120*n**5 + 274*n**4 + 225*n**3 + 85*n**2 + 15*n + 1)