Integrand size = 22, antiderivative size = 111 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\frac {A c^2 (e x)^{1+m}}{e (1+m)}+\frac {c (B c+2 A d) x^n (e x)^{1+m}}{e (1+m+n)}+\frac {d (2 B c+A d) x^{2 n} (e x)^{1+m}}{e (1+m+2 n)}+\frac {B d^2 x^{3 n} (e x)^{1+m}}{e (1+m+3 n)} \] Output:
A*c^2*(e*x)^(1+m)/e/(1+m)+c*(2*A*d+B*c)*x^n*(e*x)^(1+m)/e/(1+m+n)+d*(A*d+2 *B*c)*x^(2*n)*(e*x)^(1+m)/e/(1+m+2*n)+B*d^2*x^(3*n)*(e*x)^(1+m)/e/(1+m+3*n )
Time = 0.14 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.70 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=x (e x)^m \left (\frac {A c^2}{1+m}+\frac {c (B c+2 A d) x^n}{1+m+n}+\frac {d (2 B c+A d) x^{2 n}}{1+m+2 n}+\frac {B d^2 x^{3 n}}{1+m+3 n}\right ) \] Input:
Integrate[(e*x)^m*(A + B*x^n)*(c + d*x^n)^2,x]
Output:
x*(e*x)^m*((A*c^2)/(1 + m) + (c*(B*c + 2*A*d)*x^n)/(1 + m + n) + (d*(2*B*c + A*d)*x^(2*n))/(1 + m + 2*n) + (B*d^2*x^(3*n))/(1 + m + 3*n))
Time = 0.43 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.92, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {950, 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 (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx\) |
\(\Big \downarrow \) 950 |
\(\displaystyle \int \left (d x^{2 n} (e x)^m (A d+2 B c)+c x^n (e x)^m (2 A d+B c)+A c^2 (e x)^m+B d^2 x^{3 n} (e x)^m\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {c x^{n+1} (e x)^m (2 A d+B c)}{m+n+1}+\frac {d x^{2 n+1} (e x)^m (A d+2 B c)}{m+2 n+1}+\frac {A c^2 (e x)^{m+1}}{e (m+1)}+\frac {B d^2 x^{3 n+1} (e x)^m}{m+3 n+1}\) |
Input:
Int[(e*x)^m*(A + B*x^n)*(c + d*x^n)^2,x]
Output:
(c*(B*c + 2*A*d)*x^(1 + n)*(e*x)^m)/(1 + m + n) + (d*(2*B*c + A*d)*x^(1 + 2*n)*(e*x)^m)/(1 + m + 2*n) + (B*d^2*x^(1 + 3*n)*(e*x)^m)/(1 + m + 3*n) + (A*c^2*(e*x)^(1 + m))/(e*(1 + m))
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n _))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^ n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] && IGt Q[p, 0] && IGtQ[q, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.38 (sec) , antiderivative size = 699, normalized size of antiderivative = 6.30
method | result | size |
risch | \(\frac {x \left (6 A \,c^{2} n +10 A c d \,m^{2} n \,x^{n}+6 B \,c^{2} m \,n^{2} x^{n}+12 A c d m \,n^{2} x^{n}+3 B \,c^{2} x^{n} m +5 B \,c^{2} x^{n} n +2 A c d \,x^{n}+3 B \,c^{2} m^{2} x^{n}+6 B \,c^{2} n^{2} x^{n}+B \,c^{2} m^{3} x^{n}+16 B c d m n \,x^{2 n}+8 B c d \,m^{2} n \,x^{2 n}+6 B c d m \,n^{2} x^{2 n}+2 A c d \,m^{3} x^{n}+5 B \,c^{2} m^{2} n \,x^{n}+6 A \,c^{2} m^{2} n +20 A c d m n \,x^{n}+3 A \,c^{2} m +11 A \,c^{2} m \,n^{2}+12 A \,c^{2} m n +6 A \,c^{2} n^{3}+3 A \,c^{2} m^{2}+11 A \,c^{2} n^{2}+A \,c^{2} m^{3}+B \,c^{2} x^{n}+A \,c^{2}+12 A c d \,n^{2} x^{n}+10 B \,c^{2} m n \,x^{n}+6 A c d \,x^{n} m +10 A c d \,x^{n} n +x^{3 n} B \,d^{2}+A \,d^{2} x^{2 n}+6 A c d \,m^{2} x^{n}+2 B c d \,x^{2 n}+3 B \,d^{2} x^{3 n} n +3 A \,d^{2} x^{2 n} m +4 A \,d^{2} x^{2 n} n +3 A \,d^{2} m^{2} x^{2 n}+3 A \,d^{2} n^{2} x^{2 n}+3 m B \,d^{2} x^{3 n}+B \,d^{2} m^{3} x^{3 n}+A \,d^{2} m^{3} x^{2 n}+3 B \,d^{2} m^{2} x^{3 n}+2 B \,d^{2} n^{2} x^{3 n}+8 A \,d^{2} m n \,x^{2 n}+2 B \,d^{2} m \,n^{2} x^{3 n}+4 A \,d^{2} m^{2} n \,x^{2 n}+3 A \,d^{2} m \,n^{2} x^{2 n}+2 B c d \,m^{3} x^{2 n}+6 B \,d^{2} m n \,x^{3 n}+6 B c d \,x^{2 n} m +8 B c d \,x^{2 n} n +3 B \,d^{2} m^{2} n \,x^{3 n}+6 B c d \,m^{2} x^{2 n}+6 B c d \,n^{2} x^{2 n}\right ) e^{m} x^{m} {\mathrm e}^{\frac {i \operatorname {csgn}\left (i e x \right ) \pi m \left (\operatorname {csgn}\left (i e x \right )-\operatorname {csgn}\left (i x \right )\right ) \left (-\operatorname {csgn}\left (i e x \right )+\operatorname {csgn}\left (i e \right )\right )}{2}}}{\left (1+m \right ) \left (1+m +n \right ) \left (1+m +2 n \right ) \left (1+m +3 n \right )}\) | \(699\) |
parallelrisch | \(\frac {6 A x \left (e x \right )^{m} c^{2} m^{2} n +11 A x \left (e x \right )^{m} c^{2} m \,n^{2}+3 B x \,x^{n} \left (e x \right )^{m} c^{2} m^{2}+6 B x \,x^{n} \left (e x \right )^{m} c^{2} n^{2}+4 A x \,x^{2 n} \left (e x \right )^{m} d^{2} m^{2} n +3 B x \,x^{3 n} \left (e x \right )^{m} d^{2} m^{2} n +12 A x \left (e x \right )^{m} c^{2} m n +3 B x \,x^{n} \left (e x \right )^{m} c^{2} m +5 B x \,x^{n} \left (e x \right )^{m} c^{2} n +2 A x \,x^{n} \left (e x \right )^{m} c d +3 B x \,x^{3 n} \left (e x \right )^{m} d^{2} m +3 B x \,x^{3 n} \left (e x \right )^{m} d^{2} n +3 A x \,x^{2 n} \left (e x \right )^{m} d^{2} m +16 B x \,x^{2 n} \left (e x \right )^{m} c d m n +8 B x \,x^{2 n} \left (e x \right )^{m} c d \,m^{2} n +6 B x \,x^{2 n} \left (e x \right )^{m} c d m \,n^{2}+2 A x \,x^{n} \left (e x \right )^{m} c d \,m^{3}+5 B x \,x^{n} \left (e x \right )^{m} c^{2} m^{2} n +6 B x \,x^{n} \left (e x \right )^{m} c^{2} m \,n^{2}+6 A x \,x^{n} \left (e x \right )^{m} c d \,m^{2}+12 A x \,x^{n} \left (e x \right )^{m} c d \,n^{2}+10 B x \,x^{n} \left (e x \right )^{m} c^{2} m n +6 A x \,x^{n} \left (e x \right )^{m} c d m +10 A x \,x^{n} \left (e x \right )^{m} c d n +6 B x \,x^{2 n} \left (e x \right )^{m} c d \,n^{2}+6 B x \,x^{2 n} \left (e x \right )^{m} c d m +B x \,x^{n} \left (e x \right )^{m} c^{2} m^{3}+12 A x \,x^{n} \left (e x \right )^{m} c d m \,n^{2}+20 A x \,x^{n} \left (e x \right )^{m} c d m n +10 A x \,x^{n} \left (e x \right )^{m} c d \,m^{2} n +2 B x \,x^{3 n} \left (e x \right )^{m} d^{2} m \,n^{2}+A x \left (e x \right )^{m} c^{2} m^{3}+6 A x \left (e x \right )^{m} c^{2} n^{3}+8 B x \,x^{2 n} \left (e x \right )^{m} c d n +3 A x \,x^{2 n} \left (e x \right )^{m} d^{2} m \,n^{2}+6 B x \,x^{3 n} \left (e x \right )^{m} d^{2} m n +2 B x \,x^{2 n} \left (e x \right )^{m} c d \,m^{3}+8 A x \,x^{2 n} \left (e x \right )^{m} d^{2} m n +4 A x \,x^{2 n} \left (e x \right )^{m} d^{2} n +2 B x \,x^{2 n} \left (e x \right )^{m} c d +B x \,x^{3 n} \left (e x \right )^{m} d^{2} m^{3}+A x \,x^{2 n} \left (e x \right )^{m} d^{2} m^{3}+3 B x \,x^{3 n} \left (e x \right )^{m} d^{2} m^{2}+2 B x \,x^{3 n} \left (e x \right )^{m} d^{2} n^{2}+3 A x \,x^{2 n} \left (e x \right )^{m} d^{2} m^{2}+3 A x \,x^{2 n} \left (e x \right )^{m} d^{2} n^{2}+6 B x \,x^{2 n} \left (e x \right )^{m} c d \,m^{2}+A x \left (e x \right )^{m} c^{2}+3 A x \left (e x \right )^{m} c^{2} m^{2}+11 A x \left (e x \right )^{m} c^{2} n^{2}+3 A x \left (e x \right )^{m} c^{2} m +6 A x \left (e x \right )^{m} c^{2} n +B x \,x^{n} \left (e x \right )^{m} c^{2}+B x \,x^{3 n} \left (e x \right )^{m} d^{2}+A x \,x^{2 n} \left (e x \right )^{m} d^{2}}{\left (1+m \right ) \left (1+m +n \right ) \left (1+m +2 n \right ) \left (1+m +3 n \right )}\) | \(982\) |
orering | \(\text {Expression too large to display}\) | \(1351\) |
Input:
int((e*x)^m*(A+B*x^n)*(c+d*x^n)^2,x,method=_RETURNVERBOSE)
Output:
x*(6*A*c^2*n+10*A*c*d*m^2*n*x^n+6*B*c^2*m*n^2*x^n+12*A*c*d*m*n^2*x^n+3*B*c ^2*x^n*m+5*B*c^2*x^n*n+2*B*c*d*(x^n)^2+2*A*c*d*x^n+3*B*d^2*(x^n)^3*n+3*A*d ^2*(x^n)^2*m+4*A*d^2*(x^n)^2*n+3*B*c^2*m^2*x^n+6*B*c^2*n^2*x^n+3*A*d^2*m^2 *(x^n)^2+3*A*d^2*n^2*(x^n)^2+B*c^2*m^3*x^n+3*m*B*d^2*(x^n)^3+2*A*c*d*m^3*x ^n+8*A*d^2*m*n*(x^n)^2+5*B*c^2*m^2*n*x^n+6*A*c^2*m^2*n+16*B*c*d*m*n*(x^n)^ 2+20*A*c*d*m*n*x^n+8*B*c*d*m^2*n*(x^n)^2+6*B*c*d*m*n^2*(x^n)^2+2*B*d^2*m*n ^2*(x^n)^3+4*A*d^2*m^2*n*(x^n)^2+3*A*d^2*m*n^2*(x^n)^2+2*B*c*d*m^3*(x^n)^2 +6*B*d^2*m*n*(x^n)^3+3*A*c^2*m+B*d^2*m^3*(x^n)^3+A*d^2*m^3*(x^n)^2+3*B*d^2 *m^2*(x^n)^3+2*B*d^2*n^2*(x^n)^3+11*A*c^2*m*n^2+12*A*c^2*m*n+6*A*c^2*n^3+3 *A*c^2*m^2+11*A*c^2*n^2+A*c^2*m^3+(x^n)^3*B*d^2+A*d^2*(x^n)^2+B*c^2*x^n+A* c^2+12*A*c*d*n^2*x^n+10*B*c^2*m*n*x^n+6*B*c*d*(x^n)^2*m+8*B*c*d*(x^n)^2*n+ 6*A*c*d*x^n*m+10*A*c*d*x^n*n+3*B*d^2*m^2*n*(x^n)^3+6*B*c*d*m^2*(x^n)^2+6*B *c*d*n^2*(x^n)^2+6*A*c*d*m^2*x^n)/(1+m)/(1+m+n)/(1+m+2*n)/(1+m+3*n)*e^m*x^ m*exp(1/2*I*Pi*csgn(I*e*x)*m*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I* e)))
Leaf count of result is larger than twice the leaf count of optimal. 527 vs. \(2 (111) = 222\).
Time = 0.11 (sec) , antiderivative size = 527, normalized size of antiderivative = 4.75 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\frac {{\left (B d^{2} m^{3} + 3 \, B d^{2} m^{2} + 3 \, B d^{2} m + B d^{2} + 2 \, {\left (B d^{2} m + B d^{2}\right )} n^{2} + 3 \, {\left (B d^{2} m^{2} + 2 \, B d^{2} m + B d^{2}\right )} n\right )} x x^{3 \, n} e^{\left (m \log \left (e\right ) + m \log \left (x\right )\right )} + {\left ({\left (2 \, B c d + A d^{2}\right )} m^{3} + 2 \, B c d + A d^{2} + 3 \, {\left (2 \, B c d + A d^{2}\right )} m^{2} + 3 \, {\left (2 \, B c d + A d^{2} + {\left (2 \, B c d + A d^{2}\right )} m\right )} n^{2} + 3 \, {\left (2 \, B c d + A d^{2}\right )} m + 4 \, {\left (2 \, B c d + A d^{2} + {\left (2 \, B c d + A d^{2}\right )} m^{2} + 2 \, {\left (2 \, B c d + A d^{2}\right )} m\right )} n\right )} x x^{2 \, n} e^{\left (m \log \left (e\right ) + m \log \left (x\right )\right )} + {\left ({\left (B c^{2} + 2 \, A c d\right )} m^{3} + B c^{2} + 2 \, A c d + 3 \, {\left (B c^{2} + 2 \, A c d\right )} m^{2} + 6 \, {\left (B c^{2} + 2 \, A c d + {\left (B c^{2} + 2 \, A c d\right )} m\right )} n^{2} + 3 \, {\left (B c^{2} + 2 \, A c d\right )} m + 5 \, {\left (B c^{2} + 2 \, A c d + {\left (B c^{2} + 2 \, A c d\right )} m^{2} + 2 \, {\left (B c^{2} + 2 \, A c d\right )} m\right )} n\right )} x x^{n} e^{\left (m \log \left (e\right ) + m \log \left (x\right )\right )} + {\left (A c^{2} m^{3} + 6 \, A c^{2} n^{3} + 3 \, A c^{2} m^{2} + 3 \, A c^{2} m + A c^{2} + 11 \, {\left (A c^{2} m + A c^{2}\right )} n^{2} + 6 \, {\left (A c^{2} m^{2} + 2 \, A c^{2} m + A c^{2}\right )} n\right )} x e^{\left (m \log \left (e\right ) + m \log \left (x\right )\right )}}{m^{4} + 6 \, {\left (m + 1\right )} n^{3} + 4 \, m^{3} + 11 \, {\left (m^{2} + 2 \, m + 1\right )} n^{2} + 6 \, m^{2} + 6 \, {\left (m^{3} + 3 \, m^{2} + 3 \, m + 1\right )} n + 4 \, m + 1} \] Input:
integrate((e*x)^m*(A+B*x^n)*(c+d*x^n)^2,x, algorithm="fricas")
Output:
((B*d^2*m^3 + 3*B*d^2*m^2 + 3*B*d^2*m + B*d^2 + 2*(B*d^2*m + B*d^2)*n^2 + 3*(B*d^2*m^2 + 2*B*d^2*m + B*d^2)*n)*x*x^(3*n)*e^(m*log(e) + m*log(x)) + ( (2*B*c*d + A*d^2)*m^3 + 2*B*c*d + A*d^2 + 3*(2*B*c*d + A*d^2)*m^2 + 3*(2*B *c*d + A*d^2 + (2*B*c*d + A*d^2)*m)*n^2 + 3*(2*B*c*d + A*d^2)*m + 4*(2*B*c *d + A*d^2 + (2*B*c*d + A*d^2)*m^2 + 2*(2*B*c*d + A*d^2)*m)*n)*x*x^(2*n)*e ^(m*log(e) + m*log(x)) + ((B*c^2 + 2*A*c*d)*m^3 + B*c^2 + 2*A*c*d + 3*(B*c ^2 + 2*A*c*d)*m^2 + 6*(B*c^2 + 2*A*c*d + (B*c^2 + 2*A*c*d)*m)*n^2 + 3*(B*c ^2 + 2*A*c*d)*m + 5*(B*c^2 + 2*A*c*d + (B*c^2 + 2*A*c*d)*m^2 + 2*(B*c^2 + 2*A*c*d)*m)*n)*x*x^n*e^(m*log(e) + m*log(x)) + (A*c^2*m^3 + 6*A*c^2*n^3 + 3*A*c^2*m^2 + 3*A*c^2*m + A*c^2 + 11*(A*c^2*m + A*c^2)*n^2 + 6*(A*c^2*m^2 + 2*A*c^2*m + A*c^2)*n)*x*e^(m*log(e) + m*log(x)))/(m^4 + 6*(m + 1)*n^3 + 4*m^3 + 11*(m^2 + 2*m + 1)*n^2 + 6*m^2 + 6*(m^3 + 3*m^2 + 3*m + 1)*n + 4*m + 1)
Leaf count of result is larger than twice the leaf count of optimal. 5882 vs. \(2 (99) = 198\).
Time = 4.54 (sec) , antiderivative size = 5882, normalized size of antiderivative = 52.99 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\text {Too large to display} \] Input:
integrate((e*x)**m*(A+B*x**n)*(c+d*x**n)**2,x)
Output:
Piecewise(((A + B)*(c + d)**2*log(x)/e, Eq(m, -1) & Eq(n, 0)), ((A*c**2*lo g(x) + 2*A*c*d*x**n/n + A*d**2*x**(2*n)/(2*n) + B*c**2*x**n/n + B*c*d*x**( 2*n)/n + B*d**2*x**(3*n)/(3*n))/e, Eq(m, -1)), (A*c**2*Piecewise((0**(-3*n - 1)*x, Eq(e, 0)), (Piecewise((-1/(3*n*(e*x)**(3*n)), Ne(n, 0)), (log(e*x ), True))/e, True)) + 2*A*c*d*Piecewise((-x*x**n*(e*x)**(-3*n - 1)/(2*n), Ne(n, 0)), (x*x**n*(e*x)**(-3*n - 1)*log(x), True)) + A*d**2*Piecewise((-x *x**(2*n)*(e*x)**(-3*n - 1)/n, Ne(n, 0)), (x*x**(2*n)*(e*x)**(-3*n - 1)*lo g(x), True)) + B*c**2*Piecewise((-x*x**n*(e*x)**(-3*n - 1)/(2*n), Ne(n, 0) ), (x*x**n*(e*x)**(-3*n - 1)*log(x), True)) + 2*B*c*d*Piecewise((-x*x**(2* n)*(e*x)**(-3*n - 1)/n, Ne(n, 0)), (x*x**(2*n)*(e*x)**(-3*n - 1)*log(x), T rue)) + B*d**2*x*x**(3*n)*(e*x)**(-3*n - 1)*log(x), Eq(m, -3*n - 1)), (A*c **2*Piecewise((0**(-2*n - 1)*x, Eq(e, 0)), (Piecewise((-1/(2*n*(e*x)**(2*n )), Ne(n, 0)), (log(e*x), True))/e, True)) + 2*A*c*d*Piecewise((-x*x**n*(e *x)**(-2*n - 1)/n, Ne(n, 0)), (x*x**n*(e*x)**(-2*n - 1)*log(x), True)) + A *d**2*x*x**(2*n)*(e*x)**(-2*n - 1)*log(x) + B*c**2*Piecewise((-x*x**n*(e*x )**(-2*n - 1)/n, Ne(n, 0)), (x*x**n*(e*x)**(-2*n - 1)*log(x), True)) + 2*B *c*d*x*x**(2*n)*(e*x)**(-2*n - 1)*log(x) + B*d**2*Piecewise((x*x**(3*n)*(e *x)**(-2*n - 1)/n, Ne(n, 0)), (x*x**(3*n)*(e*x)**(-2*n - 1)*log(x), True)) , Eq(m, -2*n - 1)), (A*c**2*Piecewise((0**(-n - 1)*x, Eq(e, 0)), (Piecewis e((-1/(n*(e*x)**n), Ne(n, 0)), (log(e*x), True))/e, True)) + 2*A*c*d*x*...
Time = 0.04 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.40 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\frac {B d^{2} e^{m} x e^{\left (m \log \left (x\right ) + 3 \, n \log \left (x\right )\right )}}{m + 3 \, n + 1} + \frac {2 \, B c d e^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )}}{m + 2 \, n + 1} + \frac {A d^{2} e^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )}}{m + 2 \, n + 1} + \frac {B c^{2} e^{m} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{m + n + 1} + \frac {2 \, A c d e^{m} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{m + n + 1} + \frac {\left (e x\right )^{m + 1} A c^{2}}{e {\left (m + 1\right )}} \] Input:
integrate((e*x)^m*(A+B*x^n)*(c+d*x^n)^2,x, algorithm="maxima")
Output:
B*d^2*e^m*x*e^(m*log(x) + 3*n*log(x))/(m + 3*n + 1) + 2*B*c*d*e^m*x*e^(m*l og(x) + 2*n*log(x))/(m + 2*n + 1) + A*d^2*e^m*x*e^(m*log(x) + 2*n*log(x))/ (m + 2*n + 1) + B*c^2*e^m*x*e^(m*log(x) + n*log(x))/(m + n + 1) + 2*A*c*d* e^m*x*e^(m*log(x) + n*log(x))/(m + n + 1) + (e*x)^(m + 1)*A*c^2/(e*(m + 1) )
Leaf count of result is larger than twice the leaf count of optimal. 2951 vs. \(2 (111) = 222\).
Time = 0.15 (sec) , antiderivative size = 2951, normalized size of antiderivative = 26.59 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\text {Too large to display} \] Input:
integrate((e*x)^m*(A+B*x^n)*(c+d*x^n)^2,x, algorithm="giac")
Output:
(B*d^2*m^3*x*x^(3*n)*e^(m*log(e) + m*log(x)) + 3*B*d^2*m^2*n*x*x^(3*n)*e^( m*log(e) + m*log(x)) + 2*B*d^2*m*n^2*x*x^(3*n)*e^(m*log(e) + m*log(x)) + 2 *B*c*d*m^3*x*x^(2*n)*e^(m*log(e) + m*log(x)) + A*d^2*m^3*x*x^(2*n)*e^(m*lo g(e) + m*log(x)) + B*d^2*m^3*x*x^(2*n)*e^(m*log(e) + m*log(x)) + 8*B*c*d*m ^2*n*x*x^(2*n)*e^(m*log(e) + m*log(x)) + 4*A*d^2*m^2*n*x*x^(2*n)*e^(m*log( e) + m*log(x)) + 3*B*d^2*m^2*n*x*x^(2*n)*e^(m*log(e) + m*log(x)) + 6*B*c*d *m*n^2*x*x^(2*n)*e^(m*log(e) + m*log(x)) + 3*A*d^2*m*n^2*x*x^(2*n)*e^(m*lo g(e) + m*log(x)) + 2*B*d^2*m*n^2*x*x^(2*n)*e^(m*log(e) + m*log(x)) + B*c^2 *m^3*x*x^n*e^(m*log(e) + m*log(x)) + 2*A*c*d*m^3*x*x^n*e^(m*log(e) + m*log (x)) + 2*B*c*d*m^3*x*x^n*e^(m*log(e) + m*log(x)) + A*d^2*m^3*x*x^n*e^(m*lo g(e) + m*log(x)) + B*d^2*m^3*x*x^n*e^(m*log(e) + m*log(x)) + 5*B*c^2*m^2*n *x*x^n*e^(m*log(e) + m*log(x)) + 10*A*c*d*m^2*n*x*x^n*e^(m*log(e) + m*log( x)) + 8*B*c*d*m^2*n*x*x^n*e^(m*log(e) + m*log(x)) + 4*A*d^2*m^2*n*x*x^n*e^ (m*log(e) + m*log(x)) + 3*B*d^2*m^2*n*x*x^n*e^(m*log(e) + m*log(x)) + 6*B* c^2*m*n^2*x*x^n*e^(m*log(e) + m*log(x)) + 12*A*c*d*m*n^2*x*x^n*e^(m*log(e) + m*log(x)) + 6*B*c*d*m*n^2*x*x^n*e^(m*log(e) + m*log(x)) + 3*A*d^2*m*n^2 *x*x^n*e^(m*log(e) + m*log(x)) + 2*B*d^2*m*n^2*x*x^n*e^(m*log(e) + m*log(x )) + A*c^2*m^3*x*e^(m*log(e) + m*log(x)) + B*c^2*m^3*x*e^(m*log(e) + m*log (x)) + 2*A*c*d*m^3*x*e^(m*log(e) + m*log(x)) + 2*B*c*d*m^3*x*e^(m*log(e) + m*log(x)) + A*d^2*m^3*x*e^(m*log(e) + m*log(x)) + B*d^2*m^3*x*e^(m*log...
Time = 4.79 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.39 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\frac {A\,c^2\,x\,{\left (e\,x\right )}^m}{m+1}+\frac {c\,x\,x^n\,{\left (e\,x\right )}^m\,\left (2\,A\,d+B\,c\right )\,\left (m^2+5\,m\,n+2\,m+6\,n^2+5\,n+1\right )}{m^3+6\,m^2\,n+3\,m^2+11\,m\,n^2+12\,m\,n+3\,m+6\,n^3+11\,n^2+6\,n+1}+\frac {d\,x\,x^{2\,n}\,{\left (e\,x\right )}^m\,\left (A\,d+2\,B\,c\right )\,\left (m^2+4\,m\,n+2\,m+3\,n^2+4\,n+1\right )}{m^3+6\,m^2\,n+3\,m^2+11\,m\,n^2+12\,m\,n+3\,m+6\,n^3+11\,n^2+6\,n+1}+\frac {B\,d^2\,x\,x^{3\,n}\,{\left (e\,x\right )}^m\,\left (m^2+3\,m\,n+2\,m+2\,n^2+3\,n+1\right )}{m^3+6\,m^2\,n+3\,m^2+11\,m\,n^2+12\,m\,n+3\,m+6\,n^3+11\,n^2+6\,n+1} \] Input:
int((e*x)^m*(A + B*x^n)*(c + d*x^n)^2,x)
Output:
(A*c^2*x*(e*x)^m)/(m + 1) + (c*x*x^n*(e*x)^m*(2*A*d + B*c)*(2*m + 5*n + 5* m*n + m^2 + 6*n^2 + 1))/(3*m + 6*n + 12*m*n + 11*m*n^2 + 6*m^2*n + 3*m^2 + m^3 + 11*n^2 + 6*n^3 + 1) + (d*x*x^(2*n)*(e*x)^m*(A*d + 2*B*c)*(2*m + 4*n + 4*m*n + m^2 + 3*n^2 + 1))/(3*m + 6*n + 12*m*n + 11*m*n^2 + 6*m^2*n + 3* m^2 + m^3 + 11*n^2 + 6*n^3 + 1) + (B*d^2*x*x^(3*n)*(e*x)^m*(2*m + 3*n + 3* m*n + m^2 + 2*n^2 + 1))/(3*m + 6*n + 12*m*n + 11*m*n^2 + 6*m^2*n + 3*m^2 + m^3 + 11*n^2 + 6*n^3 + 1)
Time = 0.21 (sec) , antiderivative size = 700, normalized size of antiderivative = 6.31 \[ \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2 \, dx=\frac {x^{m} e^{m} x \left (8 x^{2 n} b c d \,m^{2} n +6 x^{2 n} b c d m \,n^{2}+16 x^{2 n} b c d m n +10 x^{n} a c d \,m^{2} n +12 x^{n} a c d m \,n^{2}+20 x^{n} a c d m n +3 x^{3 n} b \,d^{2} m^{2} n +2 x^{3 n} b \,d^{2} m \,n^{2}+6 x^{3 n} b \,d^{2} m n +4 x^{2 n} a \,d^{2} m^{2} n +3 x^{2 n} a \,d^{2} m \,n^{2}+8 x^{2 n} a \,d^{2} m n +2 x^{2 n} b c d \,m^{3}+6 x^{2 n} b c d \,m^{2}+6 x^{2 n} b c d m +6 x^{2 n} b c d \,n^{2}+8 x^{2 n} b c d n +a \,c^{2}+3 a \,c^{2} m^{2}+3 a \,c^{2} m +6 a \,c^{2} n^{3}+11 a \,c^{2} n^{2}+6 a \,c^{2} n +2 x^{n} a c d \,m^{3}+6 x^{n} a c d \,m^{2}+6 x^{n} a c d m +12 x^{n} a c d \,n^{2}+10 x^{n} a c d n +5 x^{n} b \,c^{2} m^{2} n +6 x^{n} b \,c^{2} m \,n^{2}+10 x^{n} b \,c^{2} m n +3 x^{3 n} b \,d^{2} m^{2}+x^{3 n} b \,d^{2} m^{3}+x^{3 n} b \,d^{2}+x^{2 n} a \,d^{2} m^{3}+x^{2 n} a \,d^{2}+x^{n} b \,c^{2} m^{3}+x^{n} b \,c^{2}+a \,c^{2} m^{3}+3 x^{3 n} b \,d^{2} m +2 x^{3 n} b \,d^{2} n^{2}+3 x^{3 n} b \,d^{2} n +3 x^{2 n} a \,d^{2} m^{2}+3 x^{2 n} a \,d^{2} m +3 x^{2 n} a \,d^{2} n^{2}+4 x^{2 n} a \,d^{2} n +2 x^{2 n} b c d +2 x^{n} a c d +3 x^{n} b \,c^{2} m^{2}+3 x^{n} b \,c^{2} m +6 x^{n} b \,c^{2} n^{2}+5 x^{n} b \,c^{2} n +6 a \,c^{2} m^{2} n +11 a \,c^{2} m \,n^{2}+12 a \,c^{2} m n \right )}{m^{4}+6 m^{3} n +11 m^{2} n^{2}+6 m \,n^{3}+4 m^{3}+18 m^{2} n +22 m \,n^{2}+6 n^{3}+6 m^{2}+18 m n +11 n^{2}+4 m +6 n +1} \] Input:
int((e*x)^m*(A+B*x^n)*(c+d*x^n)^2,x)
Output:
(x**m*e**m*x*(x**(3*n)*b*d**2*m**3 + 3*x**(3*n)*b*d**2*m**2*n + 3*x**(3*n) *b*d**2*m**2 + 2*x**(3*n)*b*d**2*m*n**2 + 6*x**(3*n)*b*d**2*m*n + 3*x**(3* n)*b*d**2*m + 2*x**(3*n)*b*d**2*n**2 + 3*x**(3*n)*b*d**2*n + x**(3*n)*b*d* *2 + x**(2*n)*a*d**2*m**3 + 4*x**(2*n)*a*d**2*m**2*n + 3*x**(2*n)*a*d**2*m **2 + 3*x**(2*n)*a*d**2*m*n**2 + 8*x**(2*n)*a*d**2*m*n + 3*x**(2*n)*a*d**2 *m + 3*x**(2*n)*a*d**2*n**2 + 4*x**(2*n)*a*d**2*n + x**(2*n)*a*d**2 + 2*x* *(2*n)*b*c*d*m**3 + 8*x**(2*n)*b*c*d*m**2*n + 6*x**(2*n)*b*c*d*m**2 + 6*x* *(2*n)*b*c*d*m*n**2 + 16*x**(2*n)*b*c*d*m*n + 6*x**(2*n)*b*c*d*m + 6*x**(2 *n)*b*c*d*n**2 + 8*x**(2*n)*b*c*d*n + 2*x**(2*n)*b*c*d + 2*x**n*a*c*d*m**3 + 10*x**n*a*c*d*m**2*n + 6*x**n*a*c*d*m**2 + 12*x**n*a*c*d*m*n**2 + 20*x* *n*a*c*d*m*n + 6*x**n*a*c*d*m + 12*x**n*a*c*d*n**2 + 10*x**n*a*c*d*n + 2*x **n*a*c*d + x**n*b*c**2*m**3 + 5*x**n*b*c**2*m**2*n + 3*x**n*b*c**2*m**2 + 6*x**n*b*c**2*m*n**2 + 10*x**n*b*c**2*m*n + 3*x**n*b*c**2*m + 6*x**n*b*c* *2*n**2 + 5*x**n*b*c**2*n + x**n*b*c**2 + a*c**2*m**3 + 6*a*c**2*m**2*n + 3*a*c**2*m**2 + 11*a*c**2*m*n**2 + 12*a*c**2*m*n + 3*a*c**2*m + 6*a*c**2*n **3 + 11*a*c**2*n**2 + 6*a*c**2*n + a*c**2))/(m**4 + 6*m**3*n + 4*m**3 + 1 1*m**2*n**2 + 18*m**2*n + 6*m**2 + 6*m*n**3 + 22*m*n**2 + 18*m*n + 4*m + 6 *n**3 + 11*n**2 + 6*n + 1)