\(\int \frac {(c+d x)^n (a+b x^2)^2}{x} \, dx\) [197]

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

Optimal result

Integrand size = 20, antiderivative size = 148 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=-\frac {b c \left (b c^2+2 a d^2\right ) (c+d x)^{1+n}}{d^4 (1+n)}+\frac {b \left (3 b c^2+2 a d^2\right ) (c+d x)^{2+n}}{d^4 (2+n)}-\frac {3 b^2 c (c+d x)^{3+n}}{d^4 (3+n)}+\frac {b^2 (c+d x)^{4+n}}{d^4 (4+n)}-\frac {a^2 (c+d x)^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {d x}{c}\right )}{c (1+n)} \] Output:

-b*c*(2*a*d^2+b*c^2)*(d*x+c)^(1+n)/d^4/(1+n)+b*(2*a*d^2+3*b*c^2)*(d*x+c)^( 
2+n)/d^4/(2+n)-3*b^2*c*(d*x+c)^(3+n)/d^4/(3+n)+b^2*(d*x+c)^(4+n)/d^4/(4+n) 
-a^2*(d*x+c)^(1+n)*hypergeom([1, 1+n],[2+n],1+d*x/c)/c/(1+n)
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.89 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=(c+d x)^{1+n} \left (-\frac {b c \left (b c^2+2 a d^2\right )}{d^4 (1+n)}+\frac {b \left (3 b c^2+2 a d^2\right ) (c+d x)}{d^4 (2+n)}-\frac {3 b^2 c (c+d x)^2}{d^4 (3+n)}+\frac {b^2 (c+d x)^3}{d^4 (4+n)}-\frac {a^2 \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {c+d x}{c}\right )}{c+c n}\right ) \] Input:

Integrate[((c + d*x)^n*(a + b*x^2)^2)/x,x]
 

Output:

(c + d*x)^(1 + n)*(-((b*c*(b*c^2 + 2*a*d^2))/(d^4*(1 + n))) + (b*(3*b*c^2 
+ 2*a*d^2)*(c + d*x))/(d^4*(2 + n)) - (3*b^2*c*(c + d*x)^2)/(d^4*(3 + n)) 
+ (b^2*(c + d*x)^3)/(d^4*(4 + n)) - (a^2*Hypergeometric2F1[1, 1 + n, 2 + n 
, (c + d*x)/c])/(c + c*n))
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 148, 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.100, Rules used = {522, 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 \frac {\left (a+b x^2\right )^2 (c+d x)^n}{x} \, dx\)

\(\Big \downarrow \) 522

\(\displaystyle \int \left (\frac {a^2 (c+d x)^n}{x}-\frac {b c \left (2 a d^2+b c^2\right ) (c+d x)^n}{d^3}+\frac {b \left (2 a d^2+3 b c^2\right ) (c+d x)^{n+1}}{d^3}-\frac {3 b^2 c (c+d x)^{n+2}}{d^3}+\frac {b^2 (c+d x)^{n+3}}{d^3}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {a^2 (c+d x)^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {d x}{c}+1\right )}{c (n+1)}-\frac {b c \left (2 a d^2+b c^2\right ) (c+d x)^{n+1}}{d^4 (n+1)}+\frac {b \left (2 a d^2+3 b c^2\right ) (c+d x)^{n+2}}{d^4 (n+2)}-\frac {3 b^2 c (c+d x)^{n+3}}{d^4 (n+3)}+\frac {b^2 (c+d x)^{n+4}}{d^4 (n+4)}\)

Input:

Int[((c + d*x)^n*(a + b*x^2)^2)/x,x]
 

Output:

-((b*c*(b*c^2 + 2*a*d^2)*(c + d*x)^(1 + n))/(d^4*(1 + n))) + (b*(3*b*c^2 + 
 2*a*d^2)*(c + d*x)^(2 + n))/(d^4*(2 + n)) - (3*b^2*c*(c + d*x)^(3 + n))/( 
d^4*(3 + n)) + (b^2*(c + d*x)^(4 + n))/(d^4*(4 + n)) - (a^2*(c + d*x)^(1 + 
 n)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (d*x)/c])/(c*(1 + n))
 

Defintions of rubi rules used

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [F]

\[\int \frac {\left (d x +c \right )^{n} \left (b \,x^{2}+a \right )^{2}}{x}d x\]

Input:

int((d*x+c)^n*(b*x^2+a)^2/x,x)
 

Output:

int((d*x+c)^n*(b*x^2+a)^2/x,x)
 

Fricas [F]

\[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )}^{2} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:

integrate((d*x+c)^n*(b*x^2+a)^2/x,x, algorithm="fricas")
 

Output:

integral((b^2*x^4 + 2*a*b*x^2 + a^2)*(d*x + c)^n/x, x)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1321 vs. \(2 (129) = 258\).

Time = 3.15 (sec) , antiderivative size = 1608, normalized size of antiderivative = 10.86 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)**n*(b*x**2+a)**2/x,x)
 

Output:

-a**2*d**(n + 1)*n*(c/d + x)**(n + 1)*lerchphi(1 + d*x/c, 1, n + 1)*gamma( 
n + 1)/(c*gamma(n + 2)) - a**2*d**(n + 1)*(c/d + x)**(n + 1)*lerchphi(1 + 
d*x/c, 1, n + 1)*gamma(n + 1)/(c*gamma(n + 2)) + 2*a*b*Piecewise((c**n*x** 
2/2, Eq(d, 0)), (c*log(c/d + x)/(c*d**2 + d**3*x) + c/(c*d**2 + d**3*x) + 
d*x*log(c/d + x)/(c*d**2 + d**3*x), Eq(n, -2)), (-c*log(c/d + x)/d**2 + x/ 
d, Eq(n, -1)), (-c**2*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + c*d*n 
*x*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + d**2*n*x**2*(c + d*x)**n 
/(d**2*n**2 + 3*d**2*n + 2*d**2) + d**2*x**2*(c + d*x)**n/(d**2*n**2 + 3*d 
**2*n + 2*d**2), True)) + b**2*Piecewise((c**n*x**4/4, Eq(d, 0)), (6*c**3* 
log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) 
 + 11*c**3/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) + 
 18*c**2*d*x*log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 
 6*d**7*x**3) + 27*c**2*d*x/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 
 + 6*d**7*x**3) + 18*c*d**2*x**2*log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5* 
x + 18*c*d**6*x**2 + 6*d**7*x**3) + 18*c*d**2*x**2/(6*c**3*d**4 + 18*c**2* 
d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) + 6*d**3*x**3*log(c/d + x)/(6*c**3* 
d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3), Eq(n, -4)), (-6*c** 
3*log(c/d + x)/(2*c**2*d**4 + 4*c*d**5*x + 2*d**6*x**2) - 9*c**3/(2*c**2*d 
**4 + 4*c*d**5*x + 2*d**6*x**2) - 12*c**2*d*x*log(c/d + x)/(2*c**2*d**4 + 
4*c*d**5*x + 2*d**6*x**2) - 12*c**2*d*x/(2*c**2*d**4 + 4*c*d**5*x + 2*d...
 

Maxima [F]

\[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )}^{2} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:

integrate((d*x+c)^n*(b*x^2+a)^2/x,x, algorithm="maxima")
 

Output:

integrate((b*x^2 + a)^2*(d*x + c)^n/x, x)
 

Giac [F]

\[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )}^{2} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:

integrate((d*x+c)^n*(b*x^2+a)^2/x,x, algorithm="giac")
 

Output:

integrate((b*x^2 + a)^2*(d*x + c)^n/x, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\int \frac {{\left (b\,x^2+a\right )}^2\,{\left (c+d\,x\right )}^n}{x} \,d x \] Input:

int(((a + b*x^2)^2*(c + d*x)^n)/x,x)
 

Output:

int(((a + b*x^2)^2*(c + d*x)^n)/x, x)
 

Reduce [F]

\[ \int \frac {(c+d x)^n \left (a+b x^2\right )^2}{x} \, dx=\frac {-6 \left (d x +c \right )^{n} b^{2} c^{4} n +\left (d x +c \right )^{n} a^{2} d^{4} n^{4}+10 \left (d x +c \right )^{n} a^{2} d^{4} n^{3}+35 \left (d x +c \right )^{n} a^{2} d^{4} n^{2}+50 \left (d x +c \right )^{n} a^{2} d^{4} n +\left (d x +c \right )^{n} b^{2} c \,d^{3} n^{4} x^{3}+\left (d x +c \right )^{n} b^{2} d^{4} n^{4} x^{4}-2 \left (d x +c \right )^{n} a b \,c^{2} d^{2} n^{3}-14 \left (d x +c \right )^{n} a b \,c^{2} d^{2} n^{2}-24 \left (d x +c \right )^{n} a b \,c^{2} d^{2} n +2 \left (d x +c \right )^{n} a b \,d^{4} n^{4} x^{2}+\left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a^{2} c \,d^{4} n^{5}+10 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a^{2} c \,d^{4} n^{4}+35 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a^{2} c \,d^{4} n^{3}+50 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a^{2} c \,d^{4} n^{2}+2 \left (d x +c \right )^{n} a b c \,d^{3} n^{4} x +6 \left (d x +c \right )^{n} b^{2} d^{4} n^{3} x^{4}+11 \left (d x +c \right )^{n} b^{2} d^{4} n^{2} x^{4}+6 \left (d x +c \right )^{n} b^{2} d^{4} n \,x^{4}+14 \left (d x +c \right )^{n} a b c \,d^{3} n^{3} x +24 \left (d x +c \right )^{n} a b c \,d^{3} n^{2} x +24 \left (d x +c \right )^{n} a^{2} d^{4}+16 \left (d x +c \right )^{n} a b \,d^{4} n^{3} x^{2}+38 \left (d x +c \right )^{n} a b \,d^{4} n^{2} x^{2}+24 \left (d x +c \right )^{n} a b \,d^{4} n \,x^{2}+6 \left (d x +c \right )^{n} b^{2} c^{3} d \,n^{2} x -3 \left (d x +c \right )^{n} b^{2} c^{2} d^{2} n^{3} x^{2}-3 \left (d x +c \right )^{n} b^{2} c^{2} d^{2} n^{2} x^{2}+3 \left (d x +c \right )^{n} b^{2} c \,d^{3} n^{3} x^{3}+2 \left (d x +c \right )^{n} b^{2} c \,d^{3} n^{2} x^{3}+24 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a^{2} c \,d^{4} n}{d^{4} n \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )} \] Input:

int((d*x+c)^n*(b*x^2+a)^2/x,x)
 

Output:

((c + d*x)**n*a**2*d**4*n**4 + 10*(c + d*x)**n*a**2*d**4*n**3 + 35*(c + d* 
x)**n*a**2*d**4*n**2 + 50*(c + d*x)**n*a**2*d**4*n + 24*(c + d*x)**n*a**2* 
d**4 - 2*(c + d*x)**n*a*b*c**2*d**2*n**3 - 14*(c + d*x)**n*a*b*c**2*d**2*n 
**2 - 24*(c + d*x)**n*a*b*c**2*d**2*n + 2*(c + d*x)**n*a*b*c*d**3*n**4*x + 
 14*(c + d*x)**n*a*b*c*d**3*n**3*x + 24*(c + d*x)**n*a*b*c*d**3*n**2*x + 2 
*(c + d*x)**n*a*b*d**4*n**4*x**2 + 16*(c + d*x)**n*a*b*d**4*n**3*x**2 + 38 
*(c + d*x)**n*a*b*d**4*n**2*x**2 + 24*(c + d*x)**n*a*b*d**4*n*x**2 - 6*(c 
+ d*x)**n*b**2*c**4*n + 6*(c + d*x)**n*b**2*c**3*d*n**2*x - 3*(c + d*x)**n 
*b**2*c**2*d**2*n**3*x**2 - 3*(c + d*x)**n*b**2*c**2*d**2*n**2*x**2 + (c + 
 d*x)**n*b**2*c*d**3*n**4*x**3 + 3*(c + d*x)**n*b**2*c*d**3*n**3*x**3 + 2* 
(c + d*x)**n*b**2*c*d**3*n**2*x**3 + (c + d*x)**n*b**2*d**4*n**4*x**4 + 6* 
(c + d*x)**n*b**2*d**4*n**3*x**4 + 11*(c + d*x)**n*b**2*d**4*n**2*x**4 + 6 
*(c + d*x)**n*b**2*d**4*n*x**4 + int((c + d*x)**n/(c*x + d*x**2),x)*a**2*c 
*d**4*n**5 + 10*int((c + d*x)**n/(c*x + d*x**2),x)*a**2*c*d**4*n**4 + 35*i 
nt((c + d*x)**n/(c*x + d*x**2),x)*a**2*c*d**4*n**3 + 50*int((c + d*x)**n/( 
c*x + d*x**2),x)*a**2*c*d**4*n**2 + 24*int((c + d*x)**n/(c*x + d*x**2),x)* 
a**2*c*d**4*n)/(d**4*n*(n**4 + 10*n**3 + 35*n**2 + 50*n + 24))