### 3.149 $$\int \frac{(d+e x^n)^q}{x (a+b x^n+c x^{2 n})} \, dx$$

Optimal. Leaf size=263 $\frac{c \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d-\left (b-\sqrt{b^2-4 a c}\right ) e}\right )}{a n (q+1) \left (2 c d-e \left (b-\sqrt{b^2-4 a c}\right )\right )}+\frac{c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d-\left (b+\sqrt{b^2-4 a c}\right ) e}\right )}{a n (q+1) \left (2 c d-e \left (\sqrt{b^2-4 a c}+b\right )\right )}-\frac{\left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{e x^n}{d}+1\right )}{a d n (q+1)}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.733565, antiderivative size = 263, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 29, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.172, Rules used = {1474, 960, 65, 830, 68} $\frac{c \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d-\left (b-\sqrt{b^2-4 a c}\right ) e}\right )}{a n (q+1) \left (2 c d-e \left (b-\sqrt{b^2-4 a c}\right )\right )}+\frac{c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d-\left (b+\sqrt{b^2-4 a c}\right ) e}\right )}{a n (q+1) \left (2 c d-e \left (\sqrt{b^2-4 a c}+b\right )\right )}-\frac{\left (d+e x^n\right )^{q+1} \, _2F_1\left (1,q+1;q+2;\frac{e x^n}{d}+1\right )}{a d n (q+1)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 1474

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :>
Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a,
b, c, d, e, m, n, p, q}, x] && EqQ[n2, 2*n] && IntegerQ[Simplify[(m + 1)/n]]

Rule 960

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] &&
ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rule 830

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[(d + e*x)^m, (f + g*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] &&  !RationalQ[m]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^n\right )^q}{x \left (a+b x^n+c x^{2 n}\right )} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(d+e x)^q}{x \left (a+b x+c x^2\right )} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{(d+e x)^q}{a x}+\frac{(-b-c x) (d+e x)^q}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(d+e x)^q}{x} \, dx,x,x^n\right )}{a n}+\frac{\operatorname{Subst}\left (\int \frac{(-b-c x) (d+e x)^q}{a+b x+c x^2} \, dx,x,x^n\right )}{a n}\\ &=-\frac{\left (d+e x^n\right )^{1+q} \, _2F_1\left (1,1+q;2+q;1+\frac{e x^n}{d}\right )}{a d n (1+q)}+\frac{\operatorname{Subst}\left (\int \left (\frac{\left (-c-\frac{b c}{\sqrt{b^2-4 a c}}\right ) (d+e x)^q}{b-\sqrt{b^2-4 a c}+2 c x}+\frac{\left (-c+\frac{b c}{\sqrt{b^2-4 a c}}\right ) (d+e x)^q}{b+\sqrt{b^2-4 a c}+2 c x}\right ) \, dx,x,x^n\right )}{a n}\\ &=-\frac{\left (d+e x^n\right )^{1+q} \, _2F_1\left (1,1+q;2+q;1+\frac{e x^n}{d}\right )}{a d n (1+q)}-\frac{\left (c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right )\right ) \operatorname{Subst}\left (\int \frac{(d+e x)^q}{b+\sqrt{b^2-4 a c}+2 c x} \, dx,x,x^n\right )}{a n}-\frac{\left (c \left (1+\frac{b}{\sqrt{b^2-4 a c}}\right )\right ) \operatorname{Subst}\left (\int \frac{(d+e x)^q}{b-\sqrt{b^2-4 a c}+2 c x} \, dx,x,x^n\right )}{a n}\\ &=\frac{c \left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \left (d+e x^n\right )^{1+q} \, _2F_1\left (1,1+q;2+q;\frac{2 c \left (d+e x^n\right )}{2 c d-\left (b-\sqrt{b^2-4 a c}\right ) e}\right )}{a \left (2 c d-\left (b-\sqrt{b^2-4 a c}\right ) e\right ) n (1+q)}+\frac{c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \left (d+e x^n\right )^{1+q} \, _2F_1\left (1,1+q;2+q;\frac{2 c \left (d+e x^n\right )}{2 c d-\left (b+\sqrt{b^2-4 a c}\right ) e}\right )}{a \left (2 c d-\left (b+\sqrt{b^2-4 a c}\right ) e\right ) n (1+q)}-\frac{\left (d+e x^n\right )^{1+q} \, _2F_1\left (1,1+q;2+q;1+\frac{e x^n}{d}\right )}{a d n (1+q)}\\ \end{align*}

Mathematica [A]  time = 0.727833, size = 218, normalized size = 0.83 $\frac{\left (d+e x^n\right )^{q+1} \left (\frac{c \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d+\left (\sqrt{b^2-4 a c}-b\right ) e}\right )}{e \left (\sqrt{b^2-4 a c}-b\right )+2 c d}+\frac{c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \, _2F_1\left (1,q+1;q+2;\frac{2 c \left (e x^n+d\right )}{2 c d-\left (b+\sqrt{b^2-4 a c}\right ) e}\right )}{2 c d-e \left (\sqrt{b^2-4 a c}+b\right )}-\frac{\, _2F_1\left (1,q+1;q+2;\frac{e x^n}{d}+1\right )}{d}\right )}{a n (q+1)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((d + e*x^n)^(1 + q)*((c*(1 + b/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + q, 2 + q, (2*c*(d + e*x^n))/(2*c*d
+ (-b + Sqrt[b^2 - 4*a*c])*e)])/(2*c*d + (-b + Sqrt[b^2 - 4*a*c])*e) + (c*(1 - b/Sqrt[b^2 - 4*a*c])*Hypergeom
etric2F1[1, 1 + q, 2 + q, (2*c*(d + e*x^n))/(2*c*d - (b + Sqrt[b^2 - 4*a*c])*e)])/(2*c*d - (b + Sqrt[b^2 - 4*a
*c])*e) - Hypergeometric2F1[1, 1 + q, 2 + q, 1 + (e*x^n)/d]/d))/(a*n*(1 + q))

________________________________________________________________________________________

Maple [F]  time = 0.079, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d+e{x}^{n} \right ) ^{q}}{x \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) }}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{n} + d\right )}^{q}}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (e x^{n} + d\right )}^{q}}{c x x^{2 \, n} + b x x^{n} + a x}, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{n} + d\right )}^{q}}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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