Integrand size = 18, antiderivative size = 77 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=-\frac {b c (c+d x)^{1+n}}{d^2 (1+n)}+\frac {b (c+d x)^{2+n}}{d^2 (2+n)}-\frac {a (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*(d*x+c)^(1+n)/d^2/(1+n)+b*(d*x+c)^(2+n)/d^2/(2+n)-a*(d*x+c)^(1+n)*hyp ergeom([1, 1+n],[2+n],1+d*x/c)/c/(1+n)
Time = 0.02 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.83 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=-\frac {(c+d x)^{1+n} \left (b c (c-d (1+n) x)+a d^2 (2+n) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {d x}{c}\right )\right )}{c d^2 (1+n) (2+n)} \] Input:
Integrate[((c + d*x)^n*(a + b*x^2))/x,x]
Output:
-(((c + d*x)^(1 + n)*(b*c*(c - d*(1 + n)*x) + a*d^2*(2 + n)*Hypergeometric 2F1[1, 1 + n, 2 + n, 1 + (d*x)/c]))/(c*d^2*(1 + n)*(2 + n)))
Time = 0.22 (sec) , antiderivative size = 77, 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.111, 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 ) (c+d x)^n}{x} \, dx\) |
\(\Big \downarrow \) 522 |
\(\displaystyle \int \left (\frac {a (c+d x)^n}{x}-\frac {b c (c+d x)^n}{d}+\frac {b (c+d x)^{n+1}}{d}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a (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 (c+d x)^{n+1}}{d^2 (n+1)}+\frac {b (c+d x)^{n+2}}{d^2 (n+2)}\) |
Input:
Int[((c + d*x)^n*(a + b*x^2))/x,x]
Output:
-((b*c*(c + d*x)^(1 + n))/(d^2*(1 + n))) + (b*(c + d*x)^(2 + n))/(d^2*(2 + n)) - (a*(c + d*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (d*x)/c ])/(c*(1 + n))
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]
\[\int \frac {\left (d x +c \right )^{n} \left (b \,x^{2}+a \right )}{x}d x\]
Input:
int((d*x+c)^n*(b*x^2+a)/x,x)
Output:
int((d*x+c)^n*(b*x^2+a)/x,x)
\[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:
integrate((d*x+c)^n*(b*x^2+a)/x,x, algorithm="fricas")
Output:
integral((b*x^2 + a)*(d*x + c)^n/x, x)
Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (61) = 122\).
Time = 2.22 (sec) , antiderivative size = 279, normalized size of antiderivative = 3.62 \[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=- \frac {a d^{n + 1} n \left (\frac {c}{d} + x\right )^{n + 1} \Phi \left (1 + \frac {d x}{c}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{c \Gamma \left (n + 2\right )} - \frac {a d^{n + 1} \left (\frac {c}{d} + x\right )^{n + 1} \Phi \left (1 + \frac {d x}{c}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{c \Gamma \left (n + 2\right )} + b \left (\begin {cases} \frac {c^{n} x^{2}}{2} & \text {for}\: d = 0 \\\frac {c \log {\left (\frac {c}{d} + x \right )}}{c d^{2} + d^{3} x} + \frac {c}{c d^{2} + d^{3} x} + \frac {d x \log {\left (\frac {c}{d} + x \right )}}{c d^{2} + d^{3} x} & \text {for}\: n = -2 \\- \frac {c \log {\left (\frac {c}{d} + x \right )}}{d^{2}} + \frac {x}{d} & \text {for}\: n = -1 \\- \frac {c^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {c d n x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {d^{2} n x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {d^{2} x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} & \text {otherwise} \end {cases}\right ) \] Input:
integrate((d*x+c)**n*(b*x**2+a)/x,x)
Output:
-a*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*d**(n + 1)*(c/d + x)**(n + 1)*lerchphi(1 + d*x/c, 1, n + 1)*gamma(n + 1)/(c*gamma(n + 2)) + 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))
\[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:
integrate((d*x+c)^n*(b*x^2+a)/x,x, algorithm="maxima")
Output:
integrate((b*x^2 + a)*(d*x + c)^n/x, x)
\[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=\int { \frac {{\left (b x^{2} + a\right )} {\left (d x + c\right )}^{n}}{x} \,d x } \] Input:
integrate((d*x+c)^n*(b*x^2+a)/x,x, algorithm="giac")
Output:
integrate((b*x^2 + a)*(d*x + c)^n/x, x)
Timed out. \[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=\int \frac {\left (b\,x^2+a\right )\,{\left (c+d\,x\right )}^n}{x} \,d x \] Input:
int(((a + b*x^2)*(c + d*x)^n)/x,x)
Output:
int(((a + b*x^2)*(c + d*x)^n)/x, x)
\[ \int \frac {(c+d x)^n \left (a+b x^2\right )}{x} \, dx=\frac {\left (d x +c \right )^{n} a \,d^{2} n^{2}+3 \left (d x +c \right )^{n} a \,d^{2} n +2 \left (d x +c \right )^{n} a \,d^{2}-\left (d x +c \right )^{n} b \,c^{2} n +\left (d x +c \right )^{n} b c d \,n^{2} x +\left (d x +c \right )^{n} b \,d^{2} n^{2} x^{2}+\left (d x +c \right )^{n} b \,d^{2} n \,x^{2}+\left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a c \,d^{2} n^{3}+3 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a c \,d^{2} n^{2}+2 \left (\int \frac {\left (d x +c \right )^{n}}{d \,x^{2}+c x}d x \right ) a c \,d^{2} n}{d^{2} n \left (n^{2}+3 n +2\right )} \] Input:
int((d*x+c)^n*(b*x^2+a)/x,x)
Output:
((c + d*x)**n*a*d**2*n**2 + 3*(c + d*x)**n*a*d**2*n + 2*(c + d*x)**n*a*d** 2 - (c + d*x)**n*b*c**2*n + (c + d*x)**n*b*c*d*n**2*x + (c + d*x)**n*b*d** 2*n**2*x**2 + (c + d*x)**n*b*d**2*n*x**2 + int((c + d*x)**n/(c*x + d*x**2) ,x)*a*c*d**2*n**3 + 3*int((c + d*x)**n/(c*x + d*x**2),x)*a*c*d**2*n**2 + 2 *int((c + d*x)**n/(c*x + d*x**2),x)*a*c*d**2*n)/(d**2*n*(n**2 + 3*n + 2))