\(\int (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^2 \, dx\) [85]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [F]
Fricas [F]
Sympy [F(-2)]
Maxima [F]
Giac [F(-2)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 33, antiderivative size = 336 \[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\frac {e^2 (g x)^{1+m} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} \operatorname {AppellF1}\left (\frac {1+m}{n},-p,-q,\frac {1+m+n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{g (1+m)}+\frac {2 e f x^n (g x)^{1+m} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} \operatorname {AppellF1}\left (\frac {1+m+n}{n},-p,-q,\frac {1+m+2 n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{g (1+m+n)}+\frac {f^2 x^{2 n} (g x)^{1+m} \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} \operatorname {AppellF1}\left (\frac {1+m+2 n}{n},-p,-q,\frac {1+m+3 n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{g (1+m+2 n)} \] Output:

e^2*(g*x)^(1+m)*(a+b*x^n)^p*(c+d*x^n)^q*AppellF1((1+m)/n,-p,-q,(1+m+n)/n,- 
b*x^n/a,-d*x^n/c)/g/(1+m)/((1+b*x^n/a)^p)/((1+d*x^n/c)^q)+2*e*f*x^n*(g*x)^ 
(1+m)*(a+b*x^n)^p*(c+d*x^n)^q*AppellF1((1+m+n)/n,-p,-q,(1+m+2*n)/n,-b*x^n/ 
a,-d*x^n/c)/g/(1+m+n)/((1+b*x^n/a)^p)/((1+d*x^n/c)^q)+f^2*x^(2*n)*(g*x)^(1 
+m)*(a+b*x^n)^p*(c+d*x^n)^q*AppellF1((1+m+2*n)/n,-p,-q,(1+m+3*n)/n,-b*x^n/ 
a,-d*x^n/c)/g/(1+m+2*n)/((1+b*x^n/a)^p)/((1+d*x^n/c)^q)
 

Mathematica [A] (verified)

Time = 1.14 (sec) , antiderivative size = 219, normalized size of antiderivative = 0.65 \[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=x (g x)^m \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} \left (\frac {e^2 \operatorname {AppellF1}\left (\frac {1+m}{n},-p,-q,\frac {1+m+n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{1+m}+f x^n \left (\frac {2 e \operatorname {AppellF1}\left (\frac {1+m+n}{n},-p,-q,\frac {1+m+2 n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{1+m+n}+\frac {f x^n \operatorname {AppellF1}\left (\frac {1+m+2 n}{n},-p,-q,\frac {1+m+3 n}{n},-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{1+m+2 n}\right )\right ) \] Input:

Integrate[(g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^2,x]
 

Output:

(x*(g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*((e^2*AppellF1[(1 + m)/n, -p, -q, ( 
1 + m + n)/n, -((b*x^n)/a), -((d*x^n)/c)])/(1 + m) + f*x^n*((2*e*AppellF1[ 
(1 + m + n)/n, -p, -q, (1 + m + 2*n)/n, -((b*x^n)/a), -((d*x^n)/c)])/(1 + 
m + n) + (f*x^n*AppellF1[(1 + m + 2*n)/n, -p, -q, (1 + m + 3*n)/n, -((b*x^ 
n)/a), -((d*x^n)/c)])/(1 + m + 2*n))))/((1 + (b*x^n)/a)^p*(1 + (d*x^n)/c)^ 
q)
 

Rubi [F]

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 (g x)^m \left (e+f x^n\right )^2 \left (a+b x^n\right )^p \left (c+d x^n\right )^q \, dx\)

\(\Big \downarrow \) 1073

\(\displaystyle \int (g x)^m \left (e+f x^n\right )^2 \left (a+b x^n\right )^p \left (c+d x^n\right )^qdx\)

Input:

Int[(g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^2,x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 1073
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n 
_))^(q_.)*((e_) + (f_.)*(x_)^(n_))^(r_.), x_Symbol] :> Unintegrable[(g*x)^m 
*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^r, x] /; FreeQ[{a, b, c, d, e, f, 
g, m, n, p, q, r}, x]
 
Maple [F]

\[\int \left (g x \right )^{m} \left (a +b \,x^{n}\right )^{p} \left (c +d \,x^{n}\right )^{q} \left (e +f \,x^{n}\right )^{2}d x\]

Input:

int((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x)
 

Output:

int((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x)
 

Fricas [F]

\[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\int { {\left (f x^{n} + e\right )}^{2} {\left (b x^{n} + a\right )}^{p} {\left (d x^{n} + c\right )}^{q} \left (g x\right )^{m} \,d x } \] Input:

integrate((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x, algorithm="fricas 
")
 

Output:

integral((f^2*x^(2*n) + 2*e*f*x^n + e^2)*(b*x^n + a)^p*(d*x^n + c)^q*(g*x) 
^m, x)
 

Sympy [F(-2)]

Exception generated. \[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\text {Exception raised: HeuristicGCDFailed} \] Input:

integrate((g*x)**m*(a+b*x**n)**p*(c+d*x**n)**q*(e+f*x**n)**2,x)
 

Output:

Exception raised: HeuristicGCDFailed >> no luck
 

Maxima [F]

\[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\int { {\left (f x^{n} + e\right )}^{2} {\left (b x^{n} + a\right )}^{p} {\left (d x^{n} + c\right )}^{q} \left (g x\right )^{m} \,d x } \] Input:

integrate((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x, algorithm="maxima 
")
 

Output:

integrate((f*x^n + e)^2*(b*x^n + a)^p*(d*x^n + c)^q*(g*x)^m, x)
 

Giac [F(-2)]

Exception generated. \[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\text {Exception raised: TypeError} \] Input:

integrate((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x, algorithm="giac")
 

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{-1,[1,0,5,3,0,10,3,4,4,10,3,0,2]%%%}+%%%{-4,[1,0,5,3,0,10, 
3,4,3,10,
 

Mupad [F(-1)]

Timed out. \[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\int {\left (g\,x\right )}^m\,{\left (a+b\,x^n\right )}^p\,{\left (c+d\,x^n\right )}^q\,{\left (e+f\,x^n\right )}^2 \,d x \] Input:

int((g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^2,x)
 

Output:

int((g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^2, x)
 

Reduce [F]

\[ \int (g x)^m \left (a+b x^n\right )^p \left (c+d x^n\right )^q \left (e+f x^n\right )^2 \, dx=\int \left (g x \right )^{m} \left (x^{n} b +a \right )^{p} \left (x^{n} d +c \right )^{q} \left (e +f \,x^{n}\right )^{2}d x \] Input:

int((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x)
 

Output:

int((g*x)^m*(a+b*x^n)^p*(c+d*x^n)^q*(e+f*x^n)^2,x)